2012-06-30 00:37:48 +03:00
|
|
|
<?php
|
|
|
|
|
// Init
|
|
|
|
|
error_reporting(NULL);
|
|
|
|
|
ob_start();
|
|
|
|
|
session_start();
|
|
|
|
|
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
|
|
|
|
|
|
|
|
|
|
if ($_SESSION['user'] == 'admin') {
|
|
|
|
|
if (!empty($_GET['ip'])) {
|
|
|
|
|
$v_ip = escapeshellarg($_GET['ip']);
|
2012-11-09 18:26:32 +02:00
|
|
|
exec (VESTA_CMD."v-delete-sys-ip ".$v_ip, $output, $return_var);
|
2012-06-30 00:37:48 +03:00
|
|
|
}
|
2012-08-02 10:57:04 +03:00
|
|
|
if ($return_var != 0) {
|
|
|
|
|
$error = implode('<br>', $output);
|
|
|
|
|
if (empty($error)) $error = 'Error: vesta did not return any output.';
|
|
|
|
|
$_SESSION['error_msg'] = $error;
|
|
|
|
|
}
|
|
|
|
|
unset($output);
|
|
|
|
|
|
2012-06-30 00:37:48 +03:00
|
|
|
}
|
|
|
|
|
|
2012-10-01 17:29:49 +03:00
|
|
|
$back = $_SESSION['back'];
|
2012-09-29 01:55:51 +03:00
|
|
|
if (!empty($back)) {
|
|
|
|
|
header("Location: ".$back);
|
|
|
|
|
exit;
|
|
|
|
|
}
|
2012-10-01 17:29:49 +03:00
|
|
|
|
2012-06-30 00:37:48 +03:00
|
|
|
header("Location: /list/ip/");
|
2012-09-29 01:55:51 +03:00
|
|
|
exit;
|