changed tranlsate function name from _() to __()

This commit is contained in:
Serghey Rodin 2013-04-25 21:33:43 +03:00
commit 25c2b5c4cb
104 changed files with 1277 additions and 1277 deletions

View file

@ -28,7 +28,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 code:',$return_var);
if (empty($error)) $error = __('Error code:',$return_var);
$_SESSION['error_msg'] = $error;
} else {
$data = json_decode(implode('', $output), true);
@ -64,14 +64,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 code:',$return_var);
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'] = _("Changes has been saved.");
$_SESSION['ok_msg'] = __("Changes has been saved.");
}
}
}

View file

@ -27,7 +27,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 code:',$return_var);
if (empty($error)) $error = __('Error code:',$return_var);
$_SESSION['error_msg'] = $error;
} else {
$data = json_decode(implode('', $output), true);
@ -57,14 +57,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 code:',$return_var);
if (empty($error)) $error = __('Error code:',$return_var);
$_SESSION['error_msg'] = $error;
}
$v_password = "••••••••";
unset($output);
}
if (empty($_SESSION['error_msg'])) {
$_SESSION['ok_msg'] = _('Changes has been saved.');
$_SESSION['ok_msg'] = __('Changes has been saved.');
}
}
}

View file

@ -30,7 +30,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 code:',$return_var);
if (empty($error)) $error = __('Error code:',$return_var);
$_SESSION['error_msg'] = $error;
} else {
$data = json_decode(implode('', $output), true);
@ -67,7 +67,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 code:',$return_var);
if (empty($error)) $error = __('Error code:',$return_var);
$_SESSION['error_msg'] = $error;
}
$restart_dns = 'yes';
@ -80,7 +80,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 code:',$return_var);
if (empty($error)) $error = __('Error code:',$return_var);
$_SESSION['error_msg'] = $error;
}
unset($output);
@ -93,7 +93,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 code:',$return_var);
if (empty($error)) $error = __('Error code:',$return_var);
$_SESSION['error_msg'] = $error;
}
unset($output);
@ -106,7 +106,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 code:',$return_var);
if (empty($error)) $error = __('Error code:',$return_var);
$_SESSION['error_msg'] = $error;
}
unset($output);
@ -119,7 +119,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 code:',$return_var);
if (empty($error)) $error = __('Error code:',$return_var);
$_SESSION['error_msg'] = $error;
}
unset($output);
@ -131,13 +131,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 code:',$return_var);
if (empty($error)) $error = __('Error code:',$return_var);
$_SESSION['error_msg'] = $error;
}
}
if (empty($_SESSION['error_msg'])) {
$_SESSION['ok_msg'] = _('Changes has been saved.');
$_SESSION['ok_msg'] = __('Changes has been saved.');
}
}
@ -155,7 +155,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 code:',$return_var);
if (empty($error)) $error = __('Error code:',$return_var);
$_SESSION['error_msg'] = $error;
} else {
$data = json_decode(implode('', $output), true);
@ -187,7 +187,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 code:',$return_var);
if (empty($error)) $error = __('Error code:',$return_var);
$_SESSION['error_msg'] = $error;
}
@ -196,7 +196,7 @@ if ((!empty($_GET['domain'])) && (empty($_GET['record_id']))) {
unset($output);
}
if (empty($_SESSION['error_msg'])) {
$_SESSION['ok_msg'] = _('Changes has been saved.');
$_SESSION['ok_msg'] = __('Changes has been saved.');
}
}

View file

@ -26,7 +26,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 code:',$return_var);
if (empty($error)) $error = __('Error code:',$return_var);
$_SESSION['error_msg'] = $error;
} else {
$data = json_decode(implode('', $output), true);
@ -63,7 +63,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 code:',$return_var);
if (empty($error)) $error = __('Error code:',$return_var);
$_SESSION['error_msg'] = $error;
}
unset($output);
@ -73,7 +73,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 code:',$return_var);
if (empty($error)) $error = __('Error code:',$return_var);
$_SESSION['error_msg'] = $error;
}
unset($output);
@ -86,7 +86,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 code:',$return_var);
if (empty($error)) $error = __('Error code:',$return_var);
$_SESSION['error_msg'] = $error;
}
$v_owner = $_POST['v_owner'];
@ -99,7 +99,7 @@ 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 code:',$return_var);
if (empty($error)) $error = __('Error code:',$return_var);
$_SESSION['error_msg'] = $error;
}
unset($output);
@ -111,14 +111,14 @@ if ($_SESSION['user'] == 'admin') {
exec (VESTA_CMD."v-change-sys-ip-nat ".$v_ip." ".$v_nat, $output, $return_var);
if ($return_var != 0) {
$error = implode('<br>', $output);
if (empty($error)) $error = _('Error code:',$return_var);
if (empty($error)) $error = __('Error code:',$return_var);
$_SESSION['error_msg'] = $error;
}
unset($output);
}
if (empty($_SESSION['error_msg'])) {
$_SESSION['ok_msg'] = _('Changes has been saved.');
$_SESSION['ok_msg'] = __('Changes has been saved.');
}
}
}

View file

@ -30,7 +30,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 code:',$return_var);
if (empty($error)) $error = __('Error code:',$return_var);
$_SESSION['error_msg'] = $error;
} else {
$data = json_decode(implode('', $output), true);
@ -59,7 +59,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 code:',$return_var);
if (empty($error)) $error = __('Error code:',$return_var);
$_SESSION['error_msg'] = $error;
}
$v_antispam = 'no';
@ -69,7 +69,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 code:',$return_var);
if (empty($error)) $error = __('Error code:',$return_var);
$_SESSION['error_msg'] = $error;
}
$v_antispam = 'yes';
@ -80,7 +80,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 code:',$return_var);
if (empty($error)) $error = __('Error code:',$return_var);
$_SESSION['error_msg'] = $error;
}
$v_antivirus = 'no';
@ -90,14 +90,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 code:',$return_var);
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'] = _('Changes has been saved.');
$_SESSION['ok_msg'] = __('Changes has been saved.');
}
// DKIM
@ -105,7 +105,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 code:',$return_var);
if (empty($error)) $error = __('Error code:',$return_var);
$_SESSION['error_msg'] = $error;
}
$v_dkim = 'no';
@ -115,7 +115,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 code:',$return_var);
if (empty($error)) $error = __('Error code:',$return_var);
$_SESSION['error_msg'] = $error;
}
$v_dkim = 'yes';
@ -127,7 +127,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 code:',$return_var);
if (empty($error)) $error = __('Error code:',$return_var);
$_SESSION['error_msg'] = $error;
}
$v_catchall = '';
@ -139,7 +139,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 code:',$return_var);
if (empty($error)) $error = __('Error code:',$return_var);
$_SESSION['error_msg'] = $error;
}
unset($output);
@ -150,13 +150,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 code:',$return_var);
if (empty($error)) $error = __('Error code:',$return_var);
$_SESSION['error_msg'] = $error;
}
unset($output);
}
if (empty($_SESSION['error_msg'])) {
$_SESSION['ok_msg'] = _('Changes has been saved.');
$_SESSION['ok_msg'] = __('Changes has been saved.');
}
}
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/edit_mail.html');
@ -169,7 +169,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 code:',$return_var);
if (empty($error)) $error = __('Error code:',$return_var);
$_SESSION['error_msg'] = $error;
} else {
$data = json_decode(implode('', $output), true);
@ -210,7 +210,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 code:',$return_var);
if (empty($error)) $error = __('Error code:',$return_var);
$_SESSION['error_msg'] = $error;
}
$v_password = "••••••••";
@ -227,7 +227,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 code:',$return_var);
if (empty($error)) $error = __('Error code:',$return_var);
$_SESSION['error_msg'] = $error;
}
unset($output);
@ -247,7 +247,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 code:',$return_var);
if (empty($error)) $error = __('Error code:',$return_var);
$_SESSION['error_msg'] = $error;
}
unset($output);
@ -259,7 +259,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 code:',$return_var);
if (empty($error)) $error = __('Error code:',$return_var);
$_SESSION['error_msg'] = $error;
}
unset($output);
@ -280,7 +280,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 code:',$return_var);
if (empty($error)) $error = __('Error code:',$return_var);
$_SESSION['error_msg'] = $error;
}
unset($output);
@ -292,7 +292,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 code:',$return_var);
if (empty($error)) $error = __('Error code:',$return_var);
$_SESSION['error_msg'] = $error;
}
unset($output);
@ -305,7 +305,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 code:',$return_var);
if (empty($error)) $error = __('Error code:',$return_var);
$_SESSION['error_msg'] = $error;
}
unset($output);
@ -319,7 +319,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 code:',$return_var);
if (empty($error)) $error = __('Error code:',$return_var);
$_SESSION['error_msg'] = $error;
}
unset($output);
@ -327,14 +327,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'] = $_SESSION['error_msg'] = _('Field "%s" can not be blank.','atoreply');
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 code:',$return_var);
if (empty($error)) $error = __('Error code:',$return_var);
$_SESSION['error_msg'] = $error;
}
unset($output);
@ -344,7 +344,7 @@ if ((!empty($_GET['domain'])) && (empty($_GET['account']))) {
}
if (empty($_SESSION['error_msg'])) {
$_SESSION['ok_msg'] = _('Changes has been saved.');
$_SESSION['ok_msg'] = __('Changes has been saved.');
}
}
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/edit_mail_acc.html');

View file

@ -26,7 +26,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 code:',$return_var);
if (empty($error)) $error = __('Error code:',$return_var);
$_SESSION['error_msg'] = $error;
} else {
$data = json_decode(implode('', $output), true);
@ -70,22 +70,22 @@ if ($_SESSION['user'] == 'admin') {
// Action
if (!empty($_POST['save'])) {
// Check input
if (empty($_POST['v_package'])) $errors[] = _('package');
if (empty($_POST['v_template'])) $errors[] = _('template');
if (empty($_POST['v_shell'])) $errrors[] = _('shell');
if (!isset($_POST['v_web_domains'])) $errors[] = _('web domains');
if (!isset($_POST['v_web_aliases'])) $errors[] = _('web aliases');
if (!isset($_POST['v_dns_domains'])) $errors[] = _('dns domains');
if (!isset($_POST['v_dns_records'])) $errors[] = _('dns records');
if (!isset($_POST['v_mail_domains'])) $errors[] = _('mail domains');
if (!isset($_POST['v_mail_accounts'])) $errors[] = _('mail accounts');
if (!isset($_POST['v_databases'])) $errors[] = _('databases');
if (!isset($_POST['v_cron_jobs'])) $errors[] = _('cron jobs');
if (!isset($_POST['v_backups'])) $errors[] = _('backups');
if (!isset($_POST['v_disk_quota'])) $errors[] = _('quota');
if (!isset($_POST['v_bandwidth'])) $errors[] = _('bandwidth');
if (empty($_POST['v_ns1'])) $errors[] = _('ns1');
if (empty($_POST['v_ns2'])) $errors[] = _('ns2');
if (empty($_POST['v_package'])) $errors[] = __('package');
if (empty($_POST['v_template'])) $errors[] = __('template');
if (empty($_POST['v_shell'])) $errrors[] = __('shell');
if (!isset($_POST['v_web_domains'])) $errors[] = __('web domains');
if (!isset($_POST['v_web_aliases'])) $errors[] = __('web aliases');
if (!isset($_POST['v_dns_domains'])) $errors[] = __('dns domains');
if (!isset($_POST['v_dns_records'])) $errors[] = __('dns records');
if (!isset($_POST['v_mail_domains'])) $errors[] = __('mail domains');
if (!isset($_POST['v_mail_accounts'])) $errors[] = __('mail accounts');
if (!isset($_POST['v_databases'])) $errors[] = __('databases');
if (!isset($_POST['v_cron_jobs'])) $errors[] = __('cron jobs');
if (!isset($_POST['v_backups'])) $errors[] = __('backups');
if (!isset($_POST['v_disk_quota'])) $errors[] = __('quota');
if (!isset($_POST['v_bandwidth'])) $errors[] = __('bandwidth');
if (empty($_POST['v_ns1'])) $errors[] = __('ns1');
if (empty($_POST['v_ns2'])) $errors[] = __('ns2');
// Protect input
$v_package = escapeshellarg($_POST['v_package']);
@ -122,7 +122,7 @@ if ($_SESSION['user'] == 'admin') {
$error_msg = $error_msg.", ".$error;
}
}
$_SESSION['error_msg'] = _('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];
@ -156,7 +156,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 code:',$return_var);
if (empty($error)) $error = __('Error code:',$return_var);
$_SESSION['error_msg'] = $error;
}
unset($output);
@ -170,12 +170,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 code:',$return_var);
if (empty($error)) $error = __('Error code:',$return_var);
$_SESSION['error_msg'] = $error;
}
if (empty($_SESSION['error_msg'])) {
$_SESSION['ok_msg'] = _('Changes has been saved.');
$_SESSION['ok_msg'] = __('Changes has been saved.');
}
}
}

View file

@ -24,7 +24,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 code:',$return_var);
if (empty($error)) $error = __('Error code:',$return_var);
$_SESSION['error_msg'] = $error;
} else {
$data = json_decode(implode('', $output), true);
@ -80,7 +80,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 code:',$return_var);
if (empty($error)) $error = __('Error code:',$return_var);
$_SESSION['error_msg'] = $error;
}
$v_password = "••••••••";
@ -93,7 +93,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 code:',$return_var);
if (empty($error)) $error = __('Error code:',$return_var);
$_SESSION['error_msg'] = $error;
}
unset($output);
@ -105,7 +105,7 @@ 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 code:',$return_var);
if (empty($error)) $error = __('Error code:',$return_var);
$_SESSION['error_msg'] = $error;
} else {
if ($_GET['user'] == 'admin') $_SESSION['language'] = $_POST['v_language'];
@ -119,7 +119,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 code:',$return_var);
if (empty($error)) $error = __('Error code:',$return_var);
$_SESSION['error_msg'] = $error;
}
unset($output);
@ -131,7 +131,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 code:',$return_var);
if (empty($error)) $error = __('Error code:',$return_var);
$_SESSION['error_msg'] = $error;
}
unset($output);
@ -141,13 +141,13 @@ if ($_SESSION['user'] == 'admin') {
if (($v_email != $_POST['v_email']) && (empty($_SESSION['error_msg']))) {
// Validate email
if (!filter_var($_POST['v_email'], FILTER_VALIDATE_EMAIL)) {
$_SESSION['error_msg'] = _('Please enter valid email address.');
$_SESSION['error_msg'] = __('Please enter valid email address.');
} else {
$v_email = escapeshellarg($_POST['v_email']);
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 code:',$return_var);
if (empty($error)) $error = __('Error code:',$return_var);
$_SESSION['error_msg'] = $error;
}
}
@ -161,7 +161,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 code:',$return_var);
if (empty($error)) $error = __('Error code:',$return_var);
$_SESSION['error_msg'] = $error;
}
unset($output);
@ -179,14 +179,14 @@ if ($_SESSION['user'] == 'admin') {
exec ($ns_cmd, $output, $return_var);
if ($return_var != 0) {
$error = implode('<br>', $output);
if (empty($error)) $error = _('Error code:',$return_var);
if (empty($error)) $error = __('Error code:',$return_var);
$_SESSION['error_msg'] = $error;
}
unset($output);
}
if (empty($_SESSION['error_msg'])) {
$_SESSION['ok_msg'] = _('Changes has been saved.');
$_SESSION['ok_msg'] = __('Changes has been saved.');
}
}
// Panel
@ -207,7 +207,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 code:',$return_var);
if (empty($error)) $error = __('Error code:',$return_var);
$_SESSION['error_msg'] = $error;
} else {
$data = json_decode(implode('', $output), true);
@ -249,7 +249,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 code:',$return_var);
if (empty($error)) $error = __('Error code:',$return_var);
$_SESSION['error_msg'] = $error;
}
$v_password = "••••••••";
@ -262,7 +262,7 @@ 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 code:',$return_var);
if (empty($error)) $error = __('Error code:',$return_var);
$_SESSION['error_msg'] = $error;
} else {
$_SESSION['language'] = $_POST['v_language'];
@ -276,7 +276,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 code:',$return_var);
if (empty($error)) $error = __('Error code:',$return_var);
$_SESSION['error_msg'] = $error;
}
unset($output);
@ -294,14 +294,14 @@ if ($_SESSION['user'] == 'admin') {
exec ($ns_cmd, $output, $return_var);
if ($return_var != 0) {
$error = implode('<br>', $output);
if (empty($error)) $error = _('Error code:',$return_var);
if (empty($error)) $error = __('Error code:',$return_var);
$_SESSION['error_msg'] = $error;
}
unset($output);
}
if (empty($_SESSION['error_msg'])) {
$_SESSION['ok_msg'] = _('Changes has been saved.');
$_SESSION['ok_msg'] = __('Changes has been saved.');
}
}
// Panel

View file

@ -30,7 +30,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 code:',$return_var);
if (empty($error)) $error = __('Error code:',$return_var);
$_SESSION['error_msg'] = $error;
} else {
$data = json_decode(implode('', $output), true);
@ -95,7 +95,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 code:',$return_var);
if (empty($error)) $error = __('Error code:',$return_var);
$_SESSION['error_msg'] = $error;
}
$restart_web = 'yes';
@ -106,7 +106,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 code:',$return_var);
if (empty($error)) $error = __('Error code:',$return_var);
$_SESSION['error_msg'] = $error;
}
$restart_dns = 'yes';
@ -118,7 +118,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 code:',$return_var);
if (empty($error)) $error = __('Error code:',$return_var);
$_SESSION['error_msg'] = $error;
}
$restart_dns = 'yes';
@ -133,7 +133,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 code:',$return_var);
if (empty($error)) $error = __('Error code:',$return_var);
$_SESSION['error_msg'] = $error;
}
unset($output);
@ -156,7 +156,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 code:',$return_var);
if (empty($error)) $error = __('Error code:',$return_var);
$_SESSION['error_msg'] = $error;
}
unset($output);
@ -165,7 +165,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 code:',$return_var);
if (empty($error)) $error = __('Error code:',$return_var);
$_SESSION['error_msg'] = $error;
}
$restart_dns = 'yes';
@ -182,7 +182,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 code:',$return_var);
if (empty($error)) $error = __('Error code:',$return_var);
$_SESSION['error_msg'] = $error;
}
unset($output);
@ -190,7 +190,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 code:',$return_var);
if (empty($error)) $error = __('Error code:',$return_var);
$_SESSION['error_msg'] = $error;
}
$restart_dns = 'yes';
@ -205,7 +205,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 code:',$return_var);
if (empty($error)) $error = __('Error code:',$return_var);
$_SESSION['error_msg'] = $error;
}
unset($output);
@ -223,7 +223,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 code:',$return_var);
if (empty($error)) $error = __('Error code:',$return_var);
$_SESSION['error_msg'] = $error;
}
$v_nginx_ext = str_replace(',', ', ', $ext);
@ -244,7 +244,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 code:',$return_var);
if (empty($error)) $error = __('Error code:',$return_var);
$_SESSION['error_msg'] = $error;
}
unset($output);
@ -257,7 +257,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 code:',$return_var);
if (empty($error)) $error = __('Error code:',$return_var);
$_SESSION['error_msg'] = $error;
}
unset($output);
@ -296,7 +296,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 code:',$return_var);
if (empty($error)) $error = __('Error code:',$return_var);
$_SESSION['error_msg'] = $error;
}
unset($output);
@ -312,7 +312,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 code:',$return_var);
if (empty($error)) $error = __('Error code:',$return_var);
$_SESSION['error_msg'] = $error;
}
$v_ssl_home = $_POST['v_ssl_home'];
@ -332,7 +332,7 @@ if (!empty($_POST['save'])) {
$error_msg = $error_msg.", ".$error;
}
}
$_SESSION['error_msg'] = _('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];
@ -360,7 +360,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 code:',$return_var);
if (empty($error)) $error = __('Error code:',$return_var);
$_SESSION['error_msg'] = $error;
}
unset($output);
@ -378,7 +378,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 code:',$return_var);
if (empty($error)) $error = __('Error code:',$return_var);
$_SESSION['error_msg'] = $error;
}
unset($output);
@ -389,7 +389,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 code:',$return_var);
if (empty($error)) $error = __('Error code:',$return_var);
$_SESSION['error_msg'] = $error;
}
unset($output);
@ -399,7 +399,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 code:',$return_var);
if (empty($error)) $error = __('Error code:',$return_var);
$_SESSION['error_msg'] = $error;
}
unset($output);
@ -410,7 +410,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 code:',$return_var);
if (empty($error)) $error = __('Error code:',$return_var);
$_SESSION['error_msg'] = $error;
}
unset($output);
@ -418,8 +418,8 @@ if (!empty($_POST['save'])) {
$v_stats_password = '';
}
if ((empty($v_stats_user)) && (!empty($_POST['v_stats_auth'])) && (empty($_SESSION['error_msg']))) {
if (empty($_POST['v_stats_user'])) $errors[] = _('stats username');
if (empty($_POST['v_stats_password'])) $errors[] = _('stats password');
if (empty($_POST['v_stats_user'])) $errors[] = __('stats username');
if (empty($_POST['v_stats_password'])) $errors[] = __('stats password');
if (!empty($errors[0])) {
foreach ($errors as $i => $error) {
if ( $i == 0 ) {
@ -428,14 +428,14 @@ if (!empty($_POST['save'])) {
$error_msg = $error_msg.", ".$error;
}
}
$_SESSION['error_msg'] = _('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 code:',$return_var);
if (empty($error)) $error = __('Error code:',$return_var);
$_SESSION['error_msg'] = $error;
}
unset($output);
@ -443,8 +443,8 @@ if (!empty($_POST['save'])) {
}
}
if ((!empty($v_stats_user)) && (!empty($_POST['v_stats_auth'])) && (empty($_SESSION['error_msg']))) {
if (empty($_POST['v_stats_user'])) $errors[] = _('stats user');
if (empty($_POST['v_stats_password'])) $errors[] = _('stats password');
if (empty($_POST['v_stats_user'])) $errors[] = __('stats user');
if (empty($_POST['v_stats_password'])) $errors[] = __('stats password');
if (!empty($errors[0])) {
foreach ($errors as $i => $error) {
if ( $i == 0 ) {
@ -453,7 +453,7 @@ if (!empty($_POST['save'])) {
$error_msg = $error_msg.", ".$error;
}
}
$_SESSION['error_msg'] = _('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']);
@ -461,7 +461,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 code:',$return_var);
if (empty($error)) $error = __('Error code:',$return_var);
$_SESSION['error_msg'] = $error;
}
unset($output);
@ -474,7 +474,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 code:',$return_var);
if (empty($error)) $error = __('Error code:',$return_var);
$_SESSION['error_msg'] = $error;
}
unset($output);
@ -485,8 +485,8 @@ if (!empty($_POST['save'])) {
// Change FTP Account
if ((!empty($v_ftp_user)) && (!empty($_POST['v_ftp'])) && (empty($_SESSION['error_msg']))) {
if (empty($_POST['v_ftp_user'])) $errors[] = _('ftp user');
if (empty($_POST['v_ftp_password'])) $errors[] = _('ftp user password');
if (empty($_POST['v_ftp_user'])) $errors[] = __('ftp user');
if (empty($_POST['v_ftp_password'])) $errors[] = __('ftp user password');
if (!empty($errors[0])) {
foreach ($errors as $i => $error) {
if ( $i == 0 ) {
@ -495,7 +495,7 @@ if (!empty($_POST['save'])) {
$error_msg = $error_msg.", ".$error;
}
}
$_SESSION['error_msg'] = _('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']);
@ -504,7 +504,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 code:',$return_var);
if (empty($error)) $error = __('Error code:',$return_var);
$_SESSION['error_msg'] = $error;
}
unset($output);
@ -516,7 +516,7 @@ if (!empty($_POST['save'])) {
// Add FTP Account
if ((empty($v_ftp_user)) && (!empty($_POST['v_ftp'])) && (empty($_SESSION['error_msg']))) {
if ((!empty($_POST['v_ftp_email'])) && (!filter_var($_POST['v_ftp_email'], FILTER_VALIDATE_EMAIL))) $_SESSION['error_msg'] = _('Please enter valid email address.');
if ((!empty($_POST['v_ftp_email'])) && (!filter_var($_POST['v_ftp_email'], FILTER_VALIDATE_EMAIL))) $_SESSION['error_msg'] = __('Please enter valid email address.');
if (empty($_POST['v_ftp_user'])) $errors[] = 'ftp user';
if (empty($_POST['v_ftp_password'])) $errors[] = 'ftp user password';
if (!empty($errors[0])) {
@ -527,7 +527,7 @@ if (!empty($_POST['save'])) {
$error_msg = $error_msg.", ".$error;
}
}
$_SESSION['error_msg'] = _('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']);
@ -535,15 +535,15 @@ 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 code:',$return_var);
if (empty($error)) $error = __('Error code:',$return_var);
$_SESSION['error_msg'] = $error;
} else {
if (!empty($_POST['v_ftp_email'])) {
$to = $_POST['v_ftp_email'];
$subject = _("FTP login credentials");
$subject = __("FTP login credentials");
$hostname = exec('hostname');
$from = _('MAIL_FROM',$hostname);
$mailtext .= _('FTP_ACCOUNT_READY',$_GET['domain'],$user,$_POST['v_ftp_user'],$_POST['v_ftp_password']);
$from = __('MAIL_FROM',$hostname);
$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);
}
@ -560,7 +560,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 code:',$return_var);
if (empty($error)) $error = __('Error code:',$return_var);
$_SESSION['error_msg'] = $error;
}
}
@ -570,13 +570,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 code:',$return_var);
if (empty($error)) $error = __('Error code:',$return_var);
$_SESSION['error_msg'] = $error;
}
}
if (empty($_SESSION['error_msg'])) {
$_SESSION['ok_msg'] = _('Changes has been saved.');
$_SESSION['ok_msg'] = __('Changes has been saved.');
}
}