diff --git a/web/delete/dns/index.php b/web/delete/dns/index.php
index 92e0ff5e4..e267f8711 100644
--- a/web/delete/dns/index.php
+++ b/web/delete/dns/index.php
@@ -1,44 +1,19 @@
', $output);
- if (empty($error)) $error = 'Error: vesta did not return any output.';
- $_SESSION['error_msg'] = $error;
- } else {
- $_SESSION['ok_msg'] = "OK: dns domain ".$_GET['domain']." has been deleted.";
- unset($v_lname);
- }
unset($output);
-
- include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/menu_delete_dns.html');
- include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/delete_dns.html');
- unset($_SESSION['error_msg']);
- unset($_SESSION['ok_msg']);
+ header("Location: /list/dns/");
+ exit;
}
// DNS record
@@ -47,23 +22,10 @@ if ($_SESSION['user'] == 'admin') {
$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('
', $output);
- if (empty($error)) $error = 'Error: vesta did not return any output.';
- $_SESSION['error_msg'] = $error;
- } else {
- $_SESSION['ok_msg'] = "OK: dns record has been deleted.";
- unset($v_lname);
- }
unset($output);
-
- include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/menu_delete_dns_rec.html');
- include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/delete_dns_rec.html');
- unset($_SESSION['error_msg']);
- unset($_SESSION['ok_msg']);
+ header("Location: /list/dns/?domain=".$_GET['domain']);
+ exit;
}
-
}
-// Footer
-include($_SERVER['DOCUMENT_ROOT'].'/templates/footer.html');
+header("Location: /list/dns/");
diff --git a/web/delete/mail/index.php b/web/delete/mail/index.php
new file mode 100644
index 000000000..07eee68b9
--- /dev/null
+++ b/web/delete/mail/index.php
@@ -0,0 +1,31 @@
+', $output);
- if (empty($error)) $error = 'Error: vesta did not return any output.';
- $_SESSION['error_msg'] = $error;
- } else {
- $_SESSION['ok_msg'] = "OK: user ".$_GET[user]." has been deleted.";
- unset($v_lname);
- }
unset($output);
-
- include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/menu_delete_user.html');
- include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/delete_user.html');
- unset($_SESSION['error_msg']);
- unset($_SESSION['ok_msg']);
-
- } else {
- header("Location: /list/user/");
}
}
-// Footer
-include($_SERVER['DOCUMENT_ROOT'].'/templates/footer.html');
+header("Location: /list/user/");
diff --git a/web/delete/web/index.php b/web/delete/web/index.php
index f55f76561..3130aa646 100644
--- a/web/delete/web/index.php
+++ b/web/delete/web/index.php
@@ -1,78 +1,34 @@
', $output);
- if (empty($error)) $error = 'Error: vesta did not return any output.';
- $_SESSION['error_msg'] = $error;
- }
+ unset($output);
// DNS
- unset($output);
- exec (VESTA_CMD."v_list_dns_domain ".$v_username." ".$v_domain." json", $output, $return_var);
- if ((empty($_SESSION['error_msg'])) && ($return_var == 0 )) {
- exec (VESTA_CMD."v_delete_dns_domain ".$v_username." ".$v_domain, $output, $return_var);
- if ($return_var != 0) {
- $error = implode('
', $output);
- if (empty($error)) $error = 'Error: vesta did not return any output.';
- $_SESSION['error_msg'] = $error;
+ if ($return_var == 0) {
+ 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);
+ unset($output);
}
}
// Mail
- unset($output);
- exec (VESTA_CMD."v_list_mail_domain ".$v_username." ".$v_domain." json", $output, $return_var);
- if ((empty($_SESSION['error_msg'])) && ($return_var == 0 )) {
- exec (VESTA_CMD."v_delete_mail_domain ".$v_username." ".$v_domain, $output, $return_var);
- if ($return_var != 0) {
- $error = implode('
', $output);
- if (empty($error)) $error = 'Error: vesta did not return any output.';
- $_SESSION['error_msg'] = $error;
+ if ($return_var == 0) {
+ 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 (empty($_SESSION['error_msg'])) {
- $_SESSION['ok_msg'] = "OK: domain ".$_GET['domain']." has been deleted.";
- unset($v_lname);
- }
-
-
-
- include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/menu_delete_web.html');
- include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/delete_web.html');
- unset($_SESSION['error_msg']);
- unset($_SESSION['ok_msg']);
-
- } else {
- header("Location: /list/web/");
}
-
}
-// Footer
-include($_SERVER['DOCUMENT_ROOT'].'/templates/footer.html');
+header("Location: /list/web/");
diff --git a/web/suspend/dns/index.php b/web/suspend/dns/index.php
index aa4bb4819..f77b1df47 100644
--- a/web/suspend/dns/index.php
+++ b/web/suspend/dns/index.php
@@ -3,42 +3,17 @@
//error_reporting(NULL);
ob_start();
session_start();
-$TAB = 'DNS';
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
-// Header
-include($_SERVER['DOCUMENT_ROOT'].'/templates/header.html');
-
-// Panel
-top_panel($user,$TAB);
-
-// Are you admin?
if ($_SESSION['user'] == 'admin') {
-
- // Cancel
- if (!empty($_POST['back'])) {
- header("Location: /list/dns/");
- }
-
// DNS domain
if ((!empty($_GET['domain'])) && (empty($_GET['record_id']))) {
$v_username = escapeshellarg($user);
$v_domain = escapeshellarg($_GET['domain']);
exec (VESTA_CMD."v_suspend_dns_domain ".$v_username." ".$v_domain, $output, $return_var);
- if ($return_var != 0) {
- $error = implode('
', $output);
- if (empty($error)) $error = 'Error: vesta did not return any output.';
- $_SESSION['error_msg'] = $error;
- } else {
- $_SESSION['ok_msg'] = "OK: dns domain ".$_GET['domain']." has been suspended.";
- unset($v_lname);
- }
unset($output);
-
- include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/menu_suspend_dns.html');
- include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/suspend_dns.html');
- unset($_SESSION['error_msg']);
- unset($_SESSION['ok_msg']);
+ header("Location: /list/dns/");
+ exit;
}
// DNS record
@@ -47,23 +22,10 @@ if ($_SESSION['user'] == 'admin') {
$v_domain = escapeshellarg($_GET['domain']);
$v_record_id = escapeshellarg($_GET['record_id']);
exec (VESTA_CMD."v_suspend_dns_domain_record ".$v_username." ".$v_domain." ".$v_record_id, $output, $return_var);
- if ($return_var != 0) {
- $error = implode('
', $output);
- if (empty($error)) $error = 'Error: vesta did not return any output.';
- $_SESSION['error_msg'] = $error;
- } else {
- $_SESSION['ok_msg'] = "OK: dns record has been suspended.";
- unset($v_lname);
- }
unset($output);
-
- include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/menu_suspend_dns_rec.html');
- include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/suspend_dns_rec.html');
- unset($_SESSION['error_msg']);
- unset($_SESSION['ok_msg']);
+ header("Location: /list/dns/?domain=".$_GET['domain']);
+ exit;
}
}
-
-// Footer
-include($_SERVER['DOCUMENT_ROOT'].'/templates/footer.html');
+header("Location: /list/dns/");
diff --git a/web/suspend/mail/index.php b/web/suspend/mail/index.php
new file mode 100644
index 000000000..082dc9bf3
--- /dev/null
+++ b/web/suspend/mail/index.php
@@ -0,0 +1,31 @@
+', $output);
- if (empty($error)) $error = 'Error: vesta did not return any output.';
- $_SESSION['error_msg'] = $error;
- } else {
- $_SESSION['ok_msg'] = "OK: user ".$_GET[user]." has been suspended.";
- unset($v_lname);
- }
unset($output);
-
- include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/menu_suspend_user.html');
- include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/suspend_user.html');
- unset($_SESSION['error_msg']);
- unset($_SESSION['ok_msg']);
-
- } else {
- header("Location: /list/user/");
}
-
}
-// Footer
-include($_SERVER['DOCUMENT_ROOT'].'/templates/footer.html');
+header("Location: /list/user/");
diff --git a/web/suspend/web/index.php b/web/suspend/web/index.php
index 20b4845ce..2cc737ecf 100644
--- a/web/suspend/web/index.php
+++ b/web/suspend/web/index.php
@@ -1,50 +1,17 @@
', $output);
- if (empty($error)) $error = 'Error: vesta did not return any output.';
- $_SESSION['error_msg'] = $error;
- } else {
- $_SESSION['ok_msg'] = "OK: web domain ".$_GET['domain']." has been suspended.";
- unset($v_lname);
- }
unset($output);
-
- include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/menu_suspend_web.html');
- include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/suspend_web.html');
- unset($_SESSION['error_msg']);
- unset($_SESSION['ok_msg']);
-
- } else {
- header("Location: /list/web/");
}
-
}
-// Footer
-include($_SERVER['DOCUMENT_ROOT'].'/templates/footer.html');
+header("Location: /list/web/");
diff --git a/web/templates/admin/delete_dns.html b/web/templates/admin/delete_dns.html
deleted file mode 100644
index c87840fbd..000000000
--- a/web/templates/admin/delete_dns.html
+++ /dev/null
@@ -1,26 +0,0 @@
-
diff --git a/web/templates/admin/delete_dns_rec.html b/web/templates/admin/delete_dns_rec.html
deleted file mode 100644
index 77e35aee4..000000000
--- a/web/templates/admin/delete_dns_rec.html
+++ /dev/null
@@ -1,26 +0,0 @@
-
diff --git a/web/templates/admin/delete_user.html b/web/templates/admin/delete_user.html
deleted file mode 100644
index 243a65ca2..000000000
--- a/web/templates/admin/delete_user.html
+++ /dev/null
@@ -1,24 +0,0 @@
-
diff --git a/web/templates/admin/delete_web.html b/web/templates/admin/delete_web.html
deleted file mode 100644
index 60cfed357..000000000
--- a/web/templates/admin/delete_web.html
+++ /dev/null
@@ -1,24 +0,0 @@
-
diff --git a/web/templates/admin/list_dns.html b/web/templates/admin/list_dns.html
index edb6fce44..8c2be4e65 100644
--- a/web/templates/admin/list_dns.html
+++ b/web/templates/admin/list_dns.html
@@ -70,14 +70,14 @@ foreach ($data as $key => $value) {
">
" title="Confirmation">
-
Are you sure you want to domain?
+
Are you sure you want to domain?
delete
- Are you sure you want to delete domain?
+ Are you sure you want to delete domain?
|
diff --git a/web/templates/admin/list_dns_rec.html b/web/templates/admin/list_dns_rec.html
index fde585e5d..01f6f9f13 100644
--- a/web/templates/admin/list_dns_rec.html
+++ b/web/templates/admin/list_dns_rec.html
@@ -70,8 +70,14 @@ foreach ($data as $key => $value) {
Are you sure you want to record?
+
+
+ "> delete
+ " title="Confirmation">
+ Are you sure you want to delete record?
+
+ |
- delete |
diff --git a/web/templates/admin/list_mail.html b/web/templates/admin/list_mail.html
index 11d510125..8f6784597 100644
--- a/web/templates/admin/list_mail.html
+++ b/web/templates/admin/list_mail.html
@@ -5,7 +5,7 @@ foreach ($data as $key => $value) {
++$i;
if ($data[$key]['SUSPENDED'] == 'yes') {
$status = 'suspended';
- $spnd_action = 'ususpend' ;
+ $spnd_action = 'unsuspend' ;
} else {
$status = 'active';
$spnd_action = 'suspend' ;
@@ -15,6 +15,45 @@ foreach ($data as $key => $value) {
$data[$key]['CATCHALL'] = '/dev/null';
}
?>
+
@@ -31,8 +70,20 @@ foreach ($data as $key => $value) {
| list accounts |
add account |
edit |
- |
- delete |
+
+
+ ">
+ " title="Confirmation">
+ Are you sure you want to domain?
+
+ |
+
+
+ delete
+
+ Are you sure you want to delete domain?
+
+ |
diff --git a/web/templates/admin/list_mail_acc.html b/web/templates/admin/list_mail_acc.html
index 95a1d5de0..5b2750491 100644
--- a/web/templates/admin/list_mail_acc.html
+++ b/web/templates/admin/list_mail_acc.html
@@ -5,12 +5,51 @@ foreach ($data as $key => $value) {
++$i;
if ($data[$key]['SUSPENDED'] == 'yes') {
$status = 'suspended';
- $spnd_action = 'ususpend' ;
+ $spnd_action = 'unsuspend' ;
} else {
$status = 'active';
- $spnd_action = 'suspend' ;
+ $spnd_action = 'suspend';
}
?>
+
@@ -25,8 +64,20 @@ foreach ($data as $key => $value) {
|
edit |
- |
- delete |
+
+
+ ">
+ " title="Confirmation">
+ Are you sure you want to account?
+
+ |
+
+
+ "> delete
+ " title="Confirmation">
+ Are you sure you want to delete account?
+
+ |
diff --git a/web/templates/admin/list_user.html b/web/templates/admin/list_user.html
index bb9e06ca2..d17227425 100644
--- a/web/templates/admin/list_user.html
+++ b/web/templates/admin/list_user.html
@@ -96,14 +96,14 @@ foreach ($data as $key => $value) {
- Are you sure you want to user account?
+ Are you sure you want to user account?
delete
- Are you sure you want to delete user account?
+ Are you sure you want to delete user account?
|
diff --git a/web/templates/admin/list_web.html b/web/templates/admin/list_web.html
index 8897c6f4e..9da04aa42 100644
--- a/web/templates/admin/list_web.html
+++ b/web/templates/admin/list_web.html
@@ -88,14 +88,14 @@ foreach ($data as $key => $value) {
">
" title="Confirmation">
- Are you sure you want to domain?
+ Are you sure you want to domain?
|
delete
- Are you sure you want to delete domain?
+ Are you sure you want to delete domain?
|
diff --git a/web/templates/admin/menu_delete_dns.html b/web/templates/admin/menu_delete_dns.html
deleted file mode 100644
index 199a7e01f..000000000
--- a/web/templates/admin/menu_delete_dns.html
+++ /dev/null
@@ -1,15 +0,0 @@
-
diff --git a/web/templates/admin/menu_delete_dns_rec.html b/web/templates/admin/menu_delete_dns_rec.html
deleted file mode 100644
index 199a7e01f..000000000
--- a/web/templates/admin/menu_delete_dns_rec.html
+++ /dev/null
@@ -1,15 +0,0 @@
-
diff --git a/web/templates/admin/menu_delete_user.html b/web/templates/admin/menu_delete_user.html
deleted file mode 100644
index 199a7e01f..000000000
--- a/web/templates/admin/menu_delete_user.html
+++ /dev/null
@@ -1,15 +0,0 @@
-
diff --git a/web/templates/admin/menu_delete_web.html b/web/templates/admin/menu_delete_web.html
deleted file mode 100644
index 199a7e01f..000000000
--- a/web/templates/admin/menu_delete_web.html
+++ /dev/null
@@ -1,15 +0,0 @@
-
diff --git a/web/templates/admin/menu_suspend_dns.html b/web/templates/admin/menu_suspend_dns.html
deleted file mode 100644
index 199a7e01f..000000000
--- a/web/templates/admin/menu_suspend_dns.html
+++ /dev/null
@@ -1,15 +0,0 @@
-
diff --git a/web/templates/admin/menu_suspend_dns_rec.html b/web/templates/admin/menu_suspend_dns_rec.html
deleted file mode 100644
index 199a7e01f..000000000
--- a/web/templates/admin/menu_suspend_dns_rec.html
+++ /dev/null
@@ -1,15 +0,0 @@
-
diff --git a/web/templates/admin/menu_suspend_user.html b/web/templates/admin/menu_suspend_user.html
deleted file mode 100644
index 199a7e01f..000000000
--- a/web/templates/admin/menu_suspend_user.html
+++ /dev/null
@@ -1,15 +0,0 @@
-
diff --git a/web/templates/admin/menu_suspend_web.html b/web/templates/admin/menu_suspend_web.html
deleted file mode 100644
index 199a7e01f..000000000
--- a/web/templates/admin/menu_suspend_web.html
+++ /dev/null
@@ -1,15 +0,0 @@
-
diff --git a/web/templates/admin/menu_unsuspend_dns.html b/web/templates/admin/menu_unsuspend_dns.html
deleted file mode 100644
index 199a7e01f..000000000
--- a/web/templates/admin/menu_unsuspend_dns.html
+++ /dev/null
@@ -1,15 +0,0 @@
-
diff --git a/web/templates/admin/menu_unsuspend_dns_rec.html b/web/templates/admin/menu_unsuspend_dns_rec.html
deleted file mode 100644
index 199a7e01f..000000000
--- a/web/templates/admin/menu_unsuspend_dns_rec.html
+++ /dev/null
@@ -1,15 +0,0 @@
-
diff --git a/web/templates/admin/menu_unsuspend_user.html b/web/templates/admin/menu_unsuspend_user.html
deleted file mode 100644
index 1c60a06ba..000000000
--- a/web/templates/admin/menu_unsuspend_user.html
+++ /dev/null
@@ -1,15 +0,0 @@
-
diff --git a/web/templates/admin/menu_unsuspend_web.html b/web/templates/admin/menu_unsuspend_web.html
deleted file mode 100644
index 199a7e01f..000000000
--- a/web/templates/admin/menu_unsuspend_web.html
+++ /dev/null
@@ -1,15 +0,0 @@
-
diff --git a/web/templates/admin/menu_user.html b/web/templates/admin/menu_user.html
deleted file mode 100644
index 2de7ab491..000000000
--- a/web/templates/admin/menu_user.html
+++ /dev/null
@@ -1,19 +0,0 @@
-
-