added error message dialog

This commit is contained in:
Serghey Rodin 2012-08-02 10:57:04 +03:00
parent 25a2926881
commit 3f5617c0a6
36 changed files with 494 additions and 18 deletions

View file

@ -10,8 +10,14 @@ include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
$v_username = escapeshellarg($user);
$v_backup = escapeshellarg($_GET['backup']);
exec (VESTA_CMD."v_delete_user_backup ".$v_username." ".$v_backup, $output, $return_var);
unset($output);
}
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);
//}
header("Location: /list/backup/");

View file

@ -10,8 +10,14 @@ include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
$v_username = escapeshellarg($user);
$v_job = escapeshellarg($_GET['job']);
exec (VESTA_CMD."v_delete_cron_job ".$v_username." ".$v_job, $output, $return_var);
unset($output);
}
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);
//}
header("Location: /list/cron/");

View file

@ -10,8 +10,14 @@ include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
$v_username = escapeshellarg($user);
$v_database = escapeshellarg($_GET['database']);
exec (VESTA_CMD."v_delete_database ".$v_username." ".$v_database, $output, $return_var);
unset($output);
}
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);
//}
header("Location: /list/db/");

View file

@ -11,6 +11,11 @@ include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
$v_username = escapeshellarg($user);
$v_domain = escapeshellarg($_GET['domain']);
exec (VESTA_CMD."v_delete_dns_domain ".$v_username." ".$v_domain, $output, $return_var);
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);
header("Location: /list/dns/");
exit;
@ -22,6 +27,13 @@ include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
$v_domain = escapeshellarg($_GET['domain']);
$v_record_id = escapeshellarg($_GET['record_id']);
exec (VESTA_CMD."v_delete_dns_domain_record ".$v_username." ".$v_domain." ".$v_record_id, $output, $return_var);
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);
unset($output);
header("Location: /list/dns/?domain=".$_GET['domain']);
exit;

View file

@ -9,8 +9,14 @@ if ($_SESSION['user'] == 'admin') {
if (!empty($_GET['ip'])) {
$v_ip = escapeshellarg($_GET['ip']);
exec (VESTA_CMD."v_delete_sys_ip ".$v_ip, $output, $return_var);
unset($output);
}
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);
}
header("Location: /list/ip/");

View file

@ -11,6 +11,11 @@ include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
$v_username = escapeshellarg($user);
$v_domain = escapeshellarg($_GET['domain']);
exec (VESTA_CMD."v_delete_mail_domain ".$v_username." ".$v_domain, $output, $return_var);
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);
header("Location: /list/mail/");
exit;
@ -22,6 +27,11 @@ include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
$v_domain = escapeshellarg($_GET['domain']);
$v_account = escapeshellarg($_GET['account']);
exec (VESTA_CMD."v_delete_mail_account ".$v_username." ".$v_domain." ".$v_account, $output, $return_var);
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);
header("Location: /list/mail/?domain=".$_GET['domain']);
exit;

View file

@ -9,8 +9,13 @@ if ($_SESSION['user'] == 'admin') {
if (!empty($_GET['package'])) {
$v_package = escapeshellarg($_GET['package']);
exec (VESTA_CMD."v_delete_user_package ".$v_package, $output, $return_var);
unset($output);
}
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);
}
header("Location: /list/package/");

View file

@ -9,8 +9,13 @@ if ($_SESSION['user'] == 'admin') {
if (!empty($_GET['user'])) {
$v_username = escapeshellarg($_GET['user']);
exec (VESTA_CMD."v_delete_user ".$v_username, $output, $return_var);
unset($output);
}
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);
}
header("Location: /list/user/");

View file

@ -9,6 +9,11 @@ if (!empty($_GET['domain'])) {
$v_username = escapeshellarg($user);
$v_domain = escapeshellarg($_GET['domain']);
exec (VESTA_CMD."v_delete_web_domain ".$v_username." ".$v_domain, $output, $return_var);
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);
// DNS
@ -16,6 +21,11 @@ if (!empty($_GET['domain'])) {
exec (VESTA_CMD."v_list_dns_domain ".$v_username." ".$v_domain." json", $output, $lreturn_var);
if ($lreturn_var == 0 ) {
exec (VESTA_CMD."v_delete_dns_domain ".$v_username." ".$v_domain, $output, $return_var);
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);
}
}
@ -25,6 +35,12 @@ if (!empty($_GET['domain'])) {
exec (VESTA_CMD."v_list_mail_domain ".$v_username." ".$v_domain." json", $output, $lreturn_var);
if ($lreturn_var == 0 ) {
exec (VESTA_CMD."v_delete_mail_domain ".$v_username." ".$v_domain, $output, $return_var);
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);
}
}
}