mirror of
https://github.com/myvesta/vesta
synced 2025-08-14 18:49:21 -07:00
i18n + service manager + web updater
This commit is contained in:
parent
3612d08933
commit
6e631c32a1
84 changed files with 1806 additions and 1458 deletions
|
@ -31,7 +31,7 @@ $v_job = escapeshellarg($_GET['job']);
|
|||
exec (VESTA_CMD."v-list-cron-job ".$user." ".$v_job." 'json'", $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
if (empty($error)) $error = _('Error code:',$return_var);
|
||||
$_SESSION['error_msg'] = $error;
|
||||
} else {
|
||||
$data = json_decode(implode('', $output), true);
|
||||
|
@ -67,14 +67,14 @@ if ($return_var != 0) {
|
|||
exec (VESTA_CMD."v-change-cron-job ".$v_username." ".$v_job." ".$v_min." ".$v_hour." ".$v_day." ".$v_month." ".$v_wday." ".$v_cmd, $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
if (empty($error)) $error = _('Error code:',$return_var);
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
$v_cmd = $_POST['v_cmd'];
|
||||
}
|
||||
if (empty($_SESSION['error_msg'])) {
|
||||
$_SESSION['ok_msg'] = _("OK: changes has been saved.");
|
||||
$_SESSION['ok_msg'] = _("Changes has been saved.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ $v_database = escapeshellarg($_GET['database']);
|
|||
exec (VESTA_CMD."v-list-database ".$user." ".$v_database." 'json'", $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
if (empty($error)) $error = _('Error code:',$return_var);
|
||||
$_SESSION['error_msg'] = $error;
|
||||
} else {
|
||||
$data = json_decode(implode('', $output), true);
|
||||
|
@ -60,14 +60,14 @@ if ($return_var != 0) {
|
|||
exec (VESTA_CMD."v-change-database-password ".$v_username." ".$v_database." ".$v_password, $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
if (empty($error)) $error = _('Error code:',$return_var);
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
$v_password = "••••••••";
|
||||
unset($output);
|
||||
}
|
||||
if (empty($_SESSION['error_msg'])) {
|
||||
$_SESSION['ok_msg'] = _('OK: changes has been saved.');
|
||||
$_SESSION['ok_msg'] = _('Changes has been saved.');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ if ((!empty($_GET['domain'])) && (empty($_GET['record_id']))) {
|
|||
exec (VESTA_CMD."v-list-dns-domain ".$user." ".$v_domain." json", $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
if (empty($error)) $error = _('Error code:',$return_var);
|
||||
$_SESSION['error_msg'] = $error;
|
||||
} else {
|
||||
$data = json_decode(implode('', $output), true);
|
||||
|
@ -70,7 +70,7 @@ if ((!empty($_GET['domain'])) && (empty($_GET['record_id']))) {
|
|||
exec (VESTA_CMD."v-change-dns-domain-ip ".$v_username." ".$v_domain." ".$v_ip." 'no'", $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
if (empty($error)) $error = _('Error code:',$return_var);
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
$restart_dns = 'yes';
|
||||
|
@ -83,7 +83,7 @@ if ((!empty($_GET['domain'])) && (empty($_GET['record_id']))) {
|
|||
exec (VESTA_CMD."v-change-dns-domain-tpl ".$v_username." ".$v_domain." ".$v_template." 'no'", $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
if (empty($error)) $error = _('Error code:',$return_var);
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
@ -96,7 +96,7 @@ if ((!empty($_GET['domain'])) && (empty($_GET['record_id']))) {
|
|||
exec (VESTA_CMD."v-change-dns-domain-soa ".$v_username." ".$v_domain." ".$v_soa." 'no'", $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
if (empty($error)) $error = _('Error code:',$return_var);
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
@ -109,7 +109,7 @@ if ((!empty($_GET['domain'])) && (empty($_GET['record_id']))) {
|
|||
exec (VESTA_CMD."v-change-dns-domain-exp ".$v_username." ".$v_domain." ".$v_exp." 'no'", $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
if (empty($error)) $error = _('Error code:',$return_var);
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
@ -122,7 +122,7 @@ if ((!empty($_GET['domain'])) && (empty($_GET['record_id']))) {
|
|||
exec (VESTA_CMD."v-change-dns-domain-ttl ".$v_username." ".$v_domain." ".$v_ttl." 'no'", $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
if (empty($error)) $error = _('Error code:',$return_var);
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
@ -134,13 +134,13 @@ if ((!empty($_GET['domain'])) && (empty($_GET['record_id']))) {
|
|||
exec (VESTA_CMD."v-restart-dns", $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
if (empty($error)) $error = _('Error code:',$return_var);
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
}
|
||||
|
||||
if (empty($_SESSION['error_msg'])) {
|
||||
$_SESSION['ok_msg'] = _('OK: changes has been saved.');
|
||||
$_SESSION['ok_msg'] = _('Changes has been saved.');
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -158,7 +158,7 @@ if ((!empty($_GET['domain'])) && (empty($_GET['record_id']))) {
|
|||
exec (VESTA_CMD."v-list-dns-domain-records ".$user." ".$v_domain." 'json'", $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
if (empty($error)) $error = _('Error code:',$return_var);
|
||||
$_SESSION['error_msg'] = $error;
|
||||
} else {
|
||||
$data = json_decode(implode('', $output), true);
|
||||
|
@ -190,7 +190,7 @@ if ((!empty($_GET['domain'])) && (empty($_GET['record_id']))) {
|
|||
exec (VESTA_CMD."v-change-dns-domain-record ".$v_username." ".$v_domain." ".$v_record_id." ".$v_val." ".$v_priority, $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
if (empty($error)) $error = _('Error code:',$return_var);
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
|
||||
|
@ -199,7 +199,7 @@ if ((!empty($_GET['domain'])) && (empty($_GET['record_id']))) {
|
|||
unset($output);
|
||||
}
|
||||
if (empty($_SESSION['error_msg'])) {
|
||||
$_SESSION['ok_msg'] = _('OK: changes has been saved.');
|
||||
$_SESSION['ok_msg'] = _('Changes has been saved.');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ if ($_SESSION['user'] == 'admin') {
|
|||
exec (VESTA_CMD."v-list-sys-ip ".$v_ip." 'json'", $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
if (empty($error)) $error = _('Error code:',$return_var);
|
||||
$_SESSION['error_msg'] = $error;
|
||||
} else {
|
||||
$data = json_decode(implode('', $output), true);
|
||||
|
@ -65,7 +65,7 @@ if ($_SESSION['user'] == 'admin') {
|
|||
exec (VESTA_CMD."v-change-sys-ip-status ".$v_ip." 'dedicated'", $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
if (empty($error)) $error = _('Error code:',$return_var);
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
@ -75,7 +75,7 @@ if ($_SESSION['user'] == 'admin') {
|
|||
exec (VESTA_CMD."v-change-sys-ip-status ".$v_ip." 'shared'", $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
if (empty($error)) $error = _('Error code:',$return_var);
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
@ -88,7 +88,7 @@ if ($_SESSION['user'] == 'admin') {
|
|||
exec (VESTA_CMD."v-change-sys-ip-owner ".$v_ip." ".$v_owner, $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
if (empty($error)) $error = _('Error code:',$return_var);
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
$v_owner = $_POST['v_owner'];
|
||||
|
@ -101,14 +101,14 @@ if ($_SESSION['user'] == 'admin') {
|
|||
exec (VESTA_CMD."v-change-sys-ip-name ".$v_ip." ".$v_name, $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
if (empty($error)) $error = _('Error code:',$return_var);
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
}
|
||||
|
||||
if (empty($_SESSION['error_msg'])) {
|
||||
$_SESSION['ok_msg'] = _('OK: changes has been saved.');
|
||||
$_SESSION['ok_msg'] = _('Changes has been saved.');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ if ((!empty($_GET['domain'])) && (empty($_GET['account']))) {
|
|||
exec (VESTA_CMD."v-list-mail-domain ".$user." ".$v_domain." json", $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
if (empty($error)) $error = _('Error code:',$return_var);
|
||||
$_SESSION['error_msg'] = $error;
|
||||
} else {
|
||||
$data = json_decode(implode('', $output), true);
|
||||
|
@ -62,7 +62,7 @@ if ((!empty($_GET['domain'])) && (empty($_GET['account']))) {
|
|||
exec (VESTA_CMD."v-delete-mail-domain-antispam ".$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.');
|
||||
if (empty($error)) $error = _('Error code:',$return_var);
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
$v_antispam = 'no';
|
||||
|
@ -72,7 +72,7 @@ if ((!empty($_GET['domain'])) && (empty($_GET['account']))) {
|
|||
exec (VESTA_CMD."v-add-mail-domain-antispam ".$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.');
|
||||
if (empty($error)) $error = _('Error code:',$return_var);
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
$v_antispam = 'yes';
|
||||
|
@ -83,7 +83,7 @@ if ((!empty($_GET['domain'])) && (empty($_GET['account']))) {
|
|||
exec (VESTA_CMD."v-delete-mail-domain-antivirus ".$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.');
|
||||
if (empty($error)) $error = _('Error code:',$return_var);
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
$v_antivirus = 'no';
|
||||
|
@ -93,14 +93,14 @@ if ((!empty($_GET['domain'])) && (empty($_GET['account']))) {
|
|||
exec (VESTA_CMD."v-add-mail-domain-antivirus ".$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.');
|
||||
if (empty($error)) $error = _('Error code:',$return_var);
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
$v_antivirus = 'yes';
|
||||
unset($output);
|
||||
}
|
||||
if (empty($_SESSION['error_msg'])) {
|
||||
$_SESSION['ok_msg'] = _('OK: changes has been saved.');
|
||||
$_SESSION['ok_msg'] = _('Changes has been saved.');
|
||||
}
|
||||
|
||||
// DKIM
|
||||
|
@ -108,7 +108,7 @@ if ((!empty($_GET['domain'])) && (empty($_GET['account']))) {
|
|||
exec (VESTA_CMD."v-delete-mail-domain-dkim ".$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.');
|
||||
if (empty($error)) $error = _('Error code:',$return_var);
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
$v_dkim = 'no';
|
||||
|
@ -118,7 +118,7 @@ if ((!empty($_GET['domain'])) && (empty($_GET['account']))) {
|
|||
exec (VESTA_CMD."v-add-mail-domain-dkim ".$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.');
|
||||
if (empty($error)) $error = _('Error code:',$return_var);
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
$v_dkim = 'yes';
|
||||
|
@ -130,7 +130,7 @@ if ((!empty($_GET['domain'])) && (empty($_GET['account']))) {
|
|||
exec (VESTA_CMD."v-delete-mail-domain-catchall ".$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.');
|
||||
if (empty($error)) $error = _('Error code:',$return_var);
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
$v_catchall = '';
|
||||
|
@ -142,7 +142,7 @@ if ((!empty($_GET['domain'])) && (empty($_GET['account']))) {
|
|||
exec (VESTA_CMD."v-change-mail-domain-catchall ".$v_username." ".$v_domain." ".$v_catchall, $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
if (empty($error)) $error = _('Error code:',$return_var);
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
@ -153,13 +153,13 @@ if ((!empty($_GET['domain'])) && (empty($_GET['account']))) {
|
|||
exec (VESTA_CMD."v-add-mail-domain-catchall ".$v_username." ".$v_domain." ".$v_catchall, $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
if (empty($error)) $error = _('Error code:',$return_var);
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
}
|
||||
if (empty($_SESSION['error_msg'])) {
|
||||
$_SESSION['ok_msg'] = _('OK: changes has been saved.');
|
||||
$_SESSION['ok_msg'] = _('Changes has been saved.');
|
||||
}
|
||||
}
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/edit_mail.html');
|
||||
|
@ -172,7 +172,7 @@ if ((!empty($_GET['domain'])) && (empty($_GET['account']))) {
|
|||
exec (VESTA_CMD."v-list-mail-account ".$user." ".$v_domain." ".$v_account." 'json'", $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
if (empty($error)) $error = _('Error code:',$return_var);
|
||||
$_SESSION['error_msg'] = $error;
|
||||
} else {
|
||||
$data = json_decode(implode('', $output), true);
|
||||
|
@ -213,7 +213,7 @@ if ((!empty($_GET['domain'])) && (empty($_GET['account']))) {
|
|||
exec (VESTA_CMD."v-change-mail-account-password ".$v_username." ".$v_domain." ".$v_account." ".$v_password, $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
if (empty($error)) $error = _('Error code:',$return_var);
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
$v_password = "••••••••";
|
||||
|
@ -230,7 +230,7 @@ if ((!empty($_GET['domain'])) && (empty($_GET['account']))) {
|
|||
exec (VESTA_CMD."v-change-mail-account-quota ".$v_username." ".$v_domain." ".$v_account." ".$v_quota, $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
if (empty($error)) $error = _('Error code:',$return_var);
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
@ -250,7 +250,7 @@ if ((!empty($_GET['domain'])) && (empty($_GET['account']))) {
|
|||
exec (VESTA_CMD."v-delete-mail-account-alias ".$v_username." ".$v_domain." ".$v_account." '".$alias."'", $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
if (empty($error)) $error = _('Error code:',$return_var);
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
@ -262,7 +262,7 @@ if ((!empty($_GET['domain'])) && (empty($_GET['account']))) {
|
|||
exec (VESTA_CMD."v-add-mail-account-alias ".$v_username." ".$v_domain." ".$v_account." '".$alias."'", $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
if (empty($error)) $error = _('Error code:',$return_var);
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
@ -283,7 +283,7 @@ if ((!empty($_GET['domain'])) && (empty($_GET['account']))) {
|
|||
exec (VESTA_CMD."v-delete-mail-account-forward ".$v_username." ".$v_domain." ".$v_account." '".$forward."'", $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
if (empty($error)) $error = _('Error code:',$return_var);
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
@ -295,7 +295,7 @@ if ((!empty($_GET['domain'])) && (empty($_GET['account']))) {
|
|||
exec (VESTA_CMD."v-add-mail-account-forward ".$v_username." ".$v_domain." ".$v_account." '".$forward."'", $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
if (empty($error)) $error = _('Error code:',$return_var);
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
@ -308,7 +308,7 @@ if ((!empty($_GET['domain'])) && (empty($_GET['account']))) {
|
|||
exec (VESTA_CMD."v-delete-mail-account-autoreply ".$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.');
|
||||
if (empty($error)) $error = _('Error code:',$return_var);
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
@ -322,7 +322,7 @@ if ((!empty($_GET['domain'])) && (empty($_GET['account']))) {
|
|||
exec (VESTA_CMD."v-add-mail-account-autoreply ".$v_username." ".$v_domain." ".$v_account." ".$v_autoreply_message, $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
if (empty($error)) $error = _('Error code:',$return_var);
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
@ -330,14 +330,14 @@ if ((!empty($_GET['domain'])) && (empty($_GET['account']))) {
|
|||
}
|
||||
}
|
||||
if (($v_autoreply == 'no') && (!empty($_POST['v_autoreply'])) && (empty($_SESSION['error_msg']))) {
|
||||
if (empty($_POST['v_autoreply_message'])) $_SESSION['error_msg'] = "Error: field atoreply message can not be blank.";
|
||||
if (empty($_POST['v_autoreply_message'])) $_SESSION['error_msg'] = $_SESSION['error_msg'] = _('Field "%s" can not be blank.','atoreply');
|
||||
if (empty($_SESSION['error_msg'])) {
|
||||
$v_autoreply_message = str_replace("\r\n", "\n", $_POST['v_autoreply_message']);
|
||||
$v_autoreply_message = escapeshellarg($v_autoreply_message);
|
||||
exec (VESTA_CMD."v-add-mail-account-autoreply ".$v_username." ".$v_domain." ".$v_account." ".$v_autoreply_message, $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
if (empty($error)) $error = _('Error code:',$return_var);
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
@ -347,7 +347,7 @@ if ((!empty($_GET['domain'])) && (empty($_GET['account']))) {
|
|||
}
|
||||
|
||||
if (empty($_SESSION['error_msg'])) {
|
||||
$_SESSION['ok_msg'] = _('OK: changes has been saved.');
|
||||
$_SESSION['ok_msg'] = _('Changes has been saved.');
|
||||
}
|
||||
}
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/edit_mail_acc.html');
|
||||
|
|
|
@ -29,7 +29,7 @@ if ($_SESSION['user'] == 'admin') {
|
|||
exec (VESTA_CMD."v-list-user-package ".$v_package." 'json'", $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
if (empty($error)) $error = _('Error code:',$return_var);
|
||||
$_SESSION['error_msg'] = $error;
|
||||
} else {
|
||||
$data = json_decode(implode('', $output), true);
|
||||
|
@ -125,7 +125,7 @@ if ($_SESSION['user'] == 'admin') {
|
|||
$error_msg = $error_msg.", ".$error;
|
||||
}
|
||||
}
|
||||
$_SESSION['error_msg'] = _('Error: field "%s" can not be blank.',$error_msg);
|
||||
$_SESSION['error_msg'] = _('Field "%s" can not be blank.',$error_msg);
|
||||
} else {
|
||||
exec ('mktemp -d', $output, $return_var);
|
||||
$tmpdir = $output[0];
|
||||
|
@ -159,7 +159,7 @@ if ($_SESSION['user'] == 'admin') {
|
|||
exec (VESTA_CMD."v-add-user-package ".$tmpdir." ".$v_package." 'yes'", $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
if (empty($error)) $error = _('Error code:',$return_var);
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
@ -173,12 +173,12 @@ if ($_SESSION['user'] == 'admin') {
|
|||
exec (VESTA_CMD."v-update-user-package ".$v_package." 'json'", $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
if (empty($error)) $error = _('Error code:',$return_var);
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
|
||||
if (empty($_SESSION['error_msg'])) {
|
||||
$_SESSION['ok_msg'] = _('OK: changes has been saved.');
|
||||
$_SESSION['ok_msg'] = _('Changes has been saved.');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,8 +10,6 @@ include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
|
|||
// Header
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/header.html');
|
||||
|
||||
// Panel
|
||||
top_panel($user,$TAB);
|
||||
|
||||
$lang = 'ru_RU.utf8';
|
||||
setlocale(LC_ALL, $lang);
|
||||
|
@ -30,7 +28,7 @@ if ($_SESSION['user'] == 'admin') {
|
|||
exec (VESTA_CMD."v-list-user ".$v_username." json", $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
if (empty($error)) $error = _('Error code:',$return_var);
|
||||
$_SESSION['error_msg'] = $error;
|
||||
} else {
|
||||
$data = json_decode(implode('', $output), true);
|
||||
|
@ -86,7 +84,7 @@ if ($_SESSION['user'] == 'admin') {
|
|||
exec (VESTA_CMD."v-change-user-password ".$v_username." ".$v_password, $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
if (empty($error)) $error = _('Error code:',$return_var);
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
$v_password = "••••••••";
|
||||
|
@ -99,7 +97,7 @@ if ($_SESSION['user'] == 'admin') {
|
|||
exec (VESTA_CMD."v-change-user-package ".$v_username." ".$v_package, $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
if (empty($error)) $error = _('Error code:',$return_var);
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
@ -111,8 +109,10 @@ if ($_SESSION['user'] == 'admin') {
|
|||
exec (VESTA_CMD."v-change-user-language ".$v_username." ".$v_language, $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
if (empty($error)) $error = _('Error code:',$return_var);
|
||||
$_SESSION['error_msg'] = $error;
|
||||
} else {
|
||||
if ($_GET['user'] == 'admin') $_SESSION['language'] = $_POST['v_language'];
|
||||
}
|
||||
unset($output);
|
||||
}
|
||||
|
@ -123,7 +123,7 @@ if ($_SESSION['user'] == 'admin') {
|
|||
exec (VESTA_CMD."v-change-user-template ".$v_username." ".$v_template, $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
if (empty($error)) $error = _('Error code:',$return_var);
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
@ -135,7 +135,7 @@ if ($_SESSION['user'] == 'admin') {
|
|||
exec (VESTA_CMD."v-change-user-shell ".$v_username." ".$v_shell, $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
if (empty($error)) $error = _('Error code:',$return_var);
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
@ -151,7 +151,7 @@ if ($_SESSION['user'] == 'admin') {
|
|||
exec (VESTA_CMD."v-change-user-contact ".$v_username." ".$v_email, $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
if (empty($error)) $error = _('Error code:',$return_var);
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
}
|
||||
|
@ -165,7 +165,7 @@ if ($_SESSION['user'] == 'admin') {
|
|||
exec (VESTA_CMD."v-change-user-name ".$v_username." ".$v_fname." ".$v_lname, $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
if (empty($error)) $error = _('Error code:',$return_var);
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
@ -183,16 +183,19 @@ if ($_SESSION['user'] == 'admin') {
|
|||
exec ($ns_cmd, $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
if (empty($error)) $error = _('Error code:',$return_var);
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
}
|
||||
|
||||
if (empty($_SESSION['error_msg'])) {
|
||||
$_SESSION['ok_msg'] = _('OK: changes has been saved.');
|
||||
$_SESSION['ok_msg'] = _('Changes has been saved.');
|
||||
}
|
||||
}
|
||||
// Panel
|
||||
top_panel($user,$TAB);
|
||||
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/edit_user.html');
|
||||
unset($_SESSION['error_msg']);
|
||||
unset($_SESSION['ok_msg']);
|
||||
|
@ -208,7 +211,7 @@ if ($_SESSION['user'] == 'admin') {
|
|||
exec (VESTA_CMD."v-list-user ".$v_username." json", $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
if (empty($error)) $error = _('Error code:',$return_var);
|
||||
$_SESSION['error_msg'] = $error;
|
||||
} else {
|
||||
$data = json_decode(implode('', $output), true);
|
||||
|
@ -250,7 +253,7 @@ if ($_SESSION['user'] == 'admin') {
|
|||
exec (VESTA_CMD."v-change-user-password ".$v_username." ".$v_password, $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
if (empty($error)) $error = _('Error code:',$return_var);
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
$v_password = "••••••••";
|
||||
|
@ -263,8 +266,10 @@ if ($_SESSION['user'] == 'admin') {
|
|||
exec (VESTA_CMD."v-change-user-language ".$v_username." ".$v_language, $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
if (empty($error)) $error = _('Error code:',$return_var);
|
||||
$_SESSION['error_msg'] = $error;
|
||||
} else {
|
||||
$_SESSION['language'] = $_POST['v_language'];
|
||||
}
|
||||
unset($output);
|
||||
}
|
||||
|
@ -275,7 +280,7 @@ if ($_SESSION['user'] == 'admin') {
|
|||
exec (VESTA_CMD."v-change-user-contact ".$v_username." ".$v_email, $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
if (empty($error)) $error = _('Error code:',$return_var);
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
@ -293,16 +298,19 @@ if ($_SESSION['user'] == 'admin') {
|
|||
exec ($ns_cmd, $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
if (empty($error)) $error = _('Error code:',$return_var);
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
}
|
||||
|
||||
if (empty($_SESSION['error_msg'])) {
|
||||
$_SESSION['ok_msg'] = _('OK: changes has been saved.');
|
||||
$_SESSION['ok_msg'] = _('Changes has been saved.');
|
||||
}
|
||||
}
|
||||
// Panel
|
||||
top_panel($user,$TAB);
|
||||
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/user/edit_user.html');
|
||||
unset($_SESSION['error_msg']);
|
||||
unset($_SESSION['ok_msg']);
|
||||
|
|
|
@ -34,7 +34,7 @@ $v_domain = escapeshellarg($_GET['domain']);
|
|||
exec (VESTA_CMD."v-list-web-domain ".$user." ".$v_domain." json", $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
if (empty($error)) $error = _('Error code:',$return_var);
|
||||
$_SESSION['error_msg'] = $error;
|
||||
} else {
|
||||
$data = json_decode(implode('', $output), true);
|
||||
|
@ -99,7 +99,7 @@ if (!empty($_POST['save'])) {
|
|||
exec (VESTA_CMD."v-change-web-domain-ip ".$v_username." ".$v_domain." ".$v_ip." 'no'", $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
if (empty($error)) $error = _('Error code:',$return_var);
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
$restart_web = 'yes';
|
||||
|
@ -109,7 +109,7 @@ if (!empty($_POST['save'])) {
|
|||
exec (VESTA_CMD."v-change-dns-domain-ip ".$v_username." ".$v_domain." ".$v_ip." 'no'", $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
if (empty($error)) $error = _('Error code:',$return_var);
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
$restart_dns = 'yes';
|
||||
|
@ -121,7 +121,7 @@ if (!empty($_POST['save'])) {
|
|||
exec (VESTA_CMD."v-change-dns-domain-ip ".$v_username." '".$v_alias."' ".$v_ip, $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
if (empty($error)) $error = _('Error code:',$return_var);
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
$restart_dns = 'yes';
|
||||
|
@ -136,7 +136,7 @@ if (!empty($_POST['save'])) {
|
|||
exec (VESTA_CMD."v-change-web-domain-tpl ".$v_username." ".$v_domain." ".$v_template." 'no'", $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
if (empty($error)) $error = _('Error code:',$return_var);
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
@ -159,7 +159,7 @@ if (!empty($_POST['save'])) {
|
|||
exec (VESTA_CMD."v-delete-web-domain-alias ".$v_username." ".$v_domain." '".$alias."' 'no'", $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
if (empty($error)) $error = _('Error code:',$return_var);
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
@ -168,7 +168,7 @@ if (!empty($_POST['save'])) {
|
|||
exec (VESTA_CMD."v-delete-dns-on-web-alias ".$v_username." ".$v_domain." '".$alias."' 'no'", $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
if (empty($error)) $error = _('Error code:',$return_var);
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
$restart_dns = 'yes';
|
||||
|
@ -185,7 +185,7 @@ if (!empty($_POST['save'])) {
|
|||
exec (VESTA_CMD."v-add-web-domain-alias ".$v_username." ".$v_domain." '".$alias."' 'no'", $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
if (empty($error)) $error = _('Error code:',$return_var);
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
@ -193,7 +193,7 @@ if (!empty($_POST['save'])) {
|
|||
exec (VESTA_CMD."v-add-dns-on-web-alias ".$v_username." ".$v_domain." '".$alias."' 'no'", $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
if (empty($error)) $error = _('Error code:',$return_var);
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
$restart_dns = 'yes';
|
||||
|
@ -208,7 +208,7 @@ if (!empty($_POST['save'])) {
|
|||
exec (VESTA_CMD."v-delete-web-domain-nginx ".$v_username." ".$v_domain." 'no'", $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
if (empty($error)) $error = _('Error code:',$return_var);
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
@ -226,7 +226,7 @@ if (!empty($_POST['save'])) {
|
|||
exec (VESTA_CMD."v-change-web-domain-nginx-tpl ".$v_username." ".$v_domain." 'default' ".escapeshellarg($ext)." 'no'", $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
if (empty($error)) $error = _('Error code:',$return_var);
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
$v_nginx_ext = str_replace(',', ', ', $ext);
|
||||
|
@ -247,7 +247,7 @@ if (!empty($_POST['save'])) {
|
|||
exec (VESTA_CMD."v-add-web-domain-nginx ".$v_username." ".$v_domain." 'default' ".escapeshellarg($ext)." 'no'", $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
if (empty($error)) $error = _('Error code:',$return_var);
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
@ -260,7 +260,7 @@ if (!empty($_POST['save'])) {
|
|||
exec (VESTA_CMD."v-delete-web-domain-ssl ".$v_username." ".$v_domain." 'no'", $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
if (empty($error)) $error = _('Error code:',$return_var);
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
@ -299,7 +299,7 @@ if (!empty($_POST['save'])) {
|
|||
exec (VESTA_CMD."v-change-web-domain-sslcert ".$user." ".$v_domain." ".$tmpdir." 'no'", $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
if (empty($error)) $error = _('Error code:',$return_var);
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
@ -315,7 +315,7 @@ if (!empty($_POST['save'])) {
|
|||
exec (VESTA_CMD."v-change-web-domain-sslhome ".$user." ".$v_domain." ".$v_ssl_home." 'no'", $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
if (empty($error)) $error = _('Error code:',$return_var);
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
$v_ssl_home = $_POST['v_ssl_home'];
|
||||
|
@ -335,7 +335,7 @@ if (!empty($_POST['save'])) {
|
|||
$error_msg = $error_msg.", ".$error;
|
||||
}
|
||||
}
|
||||
$_SESSION['error_msg'] = _('Error: field "%s" can not be blank.',$error_msg);
|
||||
$_SESSION['error_msg'] = _('Field "%s" can not be blank.',$error_msg);
|
||||
} else {
|
||||
exec ('mktemp -d', $mktemp_output, $return_var);
|
||||
$tmpdir = $mktemp_output[0];
|
||||
|
@ -363,7 +363,7 @@ if (!empty($_POST['save'])) {
|
|||
exec (VESTA_CMD."v-add-web-domain-ssl ".$user." ".$v_domain." ".$tmpdir." ".$v_ssl_home." 'no'", $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
if (empty($error)) $error = _('Error code:',$return_var);
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
@ -381,7 +381,7 @@ if (!empty($_POST['save'])) {
|
|||
exec (VESTA_CMD."v-delete-web-domain-stats ".$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.');
|
||||
if (empty($error)) $error = _('Error code:',$return_var);
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
@ -392,7 +392,7 @@ if (!empty($_POST['save'])) {
|
|||
exec (VESTA_CMD."v-change-web-domain-stats ".$v_username." ".$v_domain." ".$v_stats, $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
if (empty($error)) $error = _('Error code:',$return_var);
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
@ -402,7 +402,7 @@ if (!empty($_POST['save'])) {
|
|||
exec (VESTA_CMD."v-add-web-domain-stats ".$v_username." ".$v_domain." ".$v_stats, $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
if (empty($error)) $error = _('Error code:',$return_var);
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
@ -413,7 +413,7 @@ if (!empty($_POST['save'])) {
|
|||
exec (VESTA_CMD."v-delete-web-domain-stats-user ".$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.');
|
||||
if (empty($error)) $error = _('Error code:',$return_var);
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
@ -431,14 +431,14 @@ if (!empty($_POST['save'])) {
|
|||
$error_msg = $error_msg.", ".$error;
|
||||
}
|
||||
}
|
||||
$_SESSION['error_msg'] = _('Error: field "%s" can not be blank.',$error_msg);
|
||||
$_SESSION['error_msg'] = _('Field "%s" can not be blank.',$error_msg);
|
||||
} else {
|
||||
$v_stats_user = escapeshellarg($_POST['v_stats_user']);
|
||||
$v_stats_password = escapeshellarg($_POST['v_stats_password']);
|
||||
exec (VESTA_CMD."v-add-web-domain-stats-user ".$v_username." ".$v_domain." ".$v_stats_user." ".$v_stats_password, $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
if (empty($error)) $error = _('Error code:',$return_var);
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
@ -456,7 +456,7 @@ if (!empty($_POST['save'])) {
|
|||
$error_msg = $error_msg.", ".$error;
|
||||
}
|
||||
}
|
||||
$_SESSION['error_msg'] = _('Error: field "%s" can not be blank.',$error_msg);
|
||||
$_SESSION['error_msg'] = _('Field "%s" can not be blank.',$error_msg);
|
||||
}
|
||||
if (($v_stats_user != $_POST['v_stats_user']) || ($_POST['v_stats_password'] != "••••••••" ) && (empty($_SESSION['error_msg']))) {
|
||||
$v_stats_user = escapeshellarg($_POST['v_stats_user']);
|
||||
|
@ -464,7 +464,7 @@ if (!empty($_POST['save'])) {
|
|||
exec (VESTA_CMD."v-add-web-domain-stats-user ".$v_username." ".$v_domain." ".$v_stats_user." ".$v_stats_password, $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
if (empty($error)) $error = _('Error code:',$return_var);
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
@ -477,7 +477,7 @@ if (!empty($_POST['save'])) {
|
|||
exec (VESTA_CMD."v-delete-web-domain-ftp ".$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.');
|
||||
if (empty($error)) $error = _('Error code:',$return_var);
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
@ -496,7 +496,7 @@ if (!empty($_POST['save'])) {
|
|||
$error_msg = $error_msg.", ".$error;
|
||||
}
|
||||
}
|
||||
$_SESSION['error_msg'] = _('Error: field "%s" can not be blank.',$error_msg);
|
||||
$_SESSION['error_msg'] = _('Field "%s" can not be blank.',$error_msg);
|
||||
}
|
||||
if (($v_ftp_user != $_POST['v_ftp_user']) || ($_POST['v_ftp_password'] != "••••••••" ) && (empty($_SESSION['error_msg']))) {
|
||||
$v_ftp_user = preg_replace("/^".$user."_/", "", $_POST['v_ftp_user']);
|
||||
|
@ -505,7 +505,7 @@ if (!empty($_POST['save'])) {
|
|||
exec (VESTA_CMD."v-add-web-domain-ftp ".$v_username." ".$v_domain." ".$v_ftp_user." ".$v_ftp_password, $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
if (empty($error)) $error = _('Error code:',$return_var);
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
@ -524,7 +524,7 @@ if (!empty($_POST['save'])) {
|
|||
$error_msg = $error_msg.", ".$error;
|
||||
}
|
||||
}
|
||||
$_SESSION['error_msg'] = _('Error: field "%s" can not be blank.',$error_msg);
|
||||
$_SESSION['error_msg'] = _('Field "%s" can not be blank.',$error_msg);
|
||||
}
|
||||
if (($v_ftp_user != $_POST['v_ftp_user']) || ($_POST['v_ftp_password'] != "••••••••" ) && (empty($_SESSION['error_msg']))) {
|
||||
$v_ftp_user = preg_replace("/^".$user."_/", "", $_POST['v_ftp_user']);
|
||||
|
@ -533,7 +533,7 @@ if (!empty($_POST['save'])) {
|
|||
exec (VESTA_CMD."v-add-web-domain-ftp ".$v_username." ".$v_domain." ".$v_ftp_user." ".$v_ftp_password, $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
if (empty($error)) $error = _('Error code:',$return_var);
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
@ -555,7 +555,7 @@ if (!empty($_POST['save'])) {
|
|||
$error_msg = $error_msg.", ".$error;
|
||||
}
|
||||
}
|
||||
$_SESSION['error_msg'] = _('Error: field "%s" can not be blank.',$error_msg);
|
||||
$_SESSION['error_msg'] = _('Field "%s" can not be blank.',$error_msg);
|
||||
}
|
||||
if (empty($_SESSION['error_msg'])) {
|
||||
$v_ftp_user = escapeshellarg($_POST['v_ftp_user']);
|
||||
|
@ -563,7 +563,7 @@ if (!empty($_POST['save'])) {
|
|||
exec (VESTA_CMD."v-add-web-domain-ftp ".$v_username." ".$v_domain." ".$v_ftp_user." ".$v_ftp_password, $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
if (empty($error)) $error = _('Error code:',$return_var);
|
||||
$_SESSION['error_msg'] = $error;
|
||||
} else {
|
||||
if (!empty($_POST['v_ftp_email'])) {
|
||||
|
@ -571,7 +571,7 @@ if (!empty($_POST['save'])) {
|
|||
$subject = _("FTP login credentials");
|
||||
$hostname = exec('hostname');
|
||||
$from = _('MAIL_FROM',$hostname);
|
||||
$mailtext .= _('FTP_ACCOUNT_READY',$_GET['v_domain'],$user,$_POST['v_ftp_user'],$_POST['v_ftp_password']);
|
||||
$mailtext .= _('FTP_ACCOUNT_READY',$_GET['domain'],$user,$_POST['v_ftp_user'],$_POST['v_ftp_password']);
|
||||
send_email($to, $subject, $mailtext, $from);
|
||||
unset($v_ftp_email);
|
||||
}
|
||||
|
@ -587,7 +587,7 @@ if (!empty($_POST['save'])) {
|
|||
exec (VESTA_CMD."v-restart-web", $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
if (empty($error)) $error = _('Error code:',$return_var);
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
}
|
||||
|
@ -597,13 +597,13 @@ if (!empty($_POST['save'])) {
|
|||
exec (VESTA_CMD."v-restart-dns", $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
if (empty($error)) $error = _('Error code:',$return_var);
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
}
|
||||
|
||||
if (empty($_SESSION['error_msg'])) {
|
||||
$_SESSION['ok_msg'] = _('OK: changes has been saved.');
|
||||
$_SESSION['ok_msg'] = _('Changes has been saved.');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue