mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-14 10:37:39 -07:00
mail pages completed
This commit is contained in:
parent
dd249d8e60
commit
5d0c09e363
44 changed files with 253 additions and 955 deletions
|
@ -3,41 +3,18 @@
|
|||
//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_unsuspend_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;
|
||||
} else {
|
||||
$_SESSION['ok_msg'] = "OK: dns domain <b>".$_GET['domain']."</b> has been unsuspended.";
|
||||
}
|
||||
unset($output);
|
||||
header("Location: /list/dns/");
|
||||
exit;
|
||||
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/menu_unsuspend_dns.html');
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/unsuspend_dns.html');
|
||||
unset($_SESSION['error_msg']);
|
||||
unset($_SESSION['ok_msg']);
|
||||
}
|
||||
|
||||
// DNS record
|
||||
|
@ -46,22 +23,11 @@ if ($_SESSION['user'] == 'admin') {
|
|||
$v_domain = escapeshellarg($_GET['domain']);
|
||||
$v_record_id = escapeshellarg($_GET['record_id']);
|
||||
exec (VESTA_CMD."v_unsuspend_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;
|
||||
} else {
|
||||
$_SESSION['ok_msg'] = "OK: dns record has been unsuspended.";
|
||||
}
|
||||
unset($output);
|
||||
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/menu_unsuspend_dns_rec.html');
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/unsuspend_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/");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue