mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-19 21:04:06 -07:00
Translation begins...
This commit is contained in:
parent
8b74eb9179
commit
43d7825b68
39 changed files with 4188 additions and 4079 deletions
|
@ -16,12 +16,12 @@ top_panel($user,$TAB);
|
|||
//if ($_SESSION['user'] == 'admin') {
|
||||
if (!empty($_POST['ok'])) {
|
||||
// Check input
|
||||
if (empty($_POST['v_min'])) $errors[] = 'minute';
|
||||
if (empty($_POST['v_hour'])) $errors[] = 'hour';
|
||||
if (empty($_POST['v_day'])) $errors[] = 'day';
|
||||
if (empty($_POST['v_month'])) $errors[] = 'month';
|
||||
if (empty($_POST['v_wday'])) $errors[] = 'day of week';
|
||||
if (empty($_POST['v_cmd'])) $errors[] = 'cmd';
|
||||
if (empty($_POST['v_min'])) $errors[] = _('minute');
|
||||
if (empty($_POST['v_hour'])) $errors[] = _('hour');
|
||||
if (empty($_POST['v_day'])) $errors[] = _('day');
|
||||
if (empty($_POST['v_month'])) $errors[] = _('month');
|
||||
if (empty($_POST['v_wday'])) $errors[] = _('day of week');
|
||||
if (empty($_POST['v_cmd'])) $errors[] = _('cmd');
|
||||
|
||||
// Protect input
|
||||
$v_min = escapeshellarg($_POST['v_min']);
|
||||
|
@ -40,7 +40,7 @@ top_panel($user,$TAB);
|
|||
$error_msg = $error_msg.", ".$error;
|
||||
}
|
||||
}
|
||||
$_SESSION['error_msg'] = "Error: field ".$error_msg." can not be blank.";
|
||||
$_SESSION['error_msg'] = _('Error: field "%s" can not be blank.',$error_msg);
|
||||
} else {
|
||||
// Add Cron Job
|
||||
exec (VESTA_CMD."v-add-cron-job ".$user." ".$v_min." ".$v_hour." ".$v_day." ".$v_month." ".$v_wday." ".$v_cmd, $output, $return_var);
|
||||
|
@ -48,12 +48,12 @@ top_panel($user,$TAB);
|
|||
$v_charset = $_POST['v_charset'];
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = 'Error: vesta did not return any output.';
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
unset($v_password);
|
||||
unset($output);
|
||||
} else {
|
||||
$_SESSION['ok_msg'] = "OK: cron job has been created successfully.";
|
||||
$_SESSION['ok_msg'] = _("OK: cron job has been created successfully.");
|
||||
unset($v_min);
|
||||
unset($v_hour);
|
||||
unset($v_day);
|
||||
|
|
|
@ -16,11 +16,11 @@ top_panel($user,$TAB);
|
|||
//if ($_SESSION['user'] == 'admin') {
|
||||
if (!empty($_POST['ok'])) {
|
||||
// Check input
|
||||
if (empty($_POST['v_database'])) $errors[] = 'database';
|
||||
if (empty($_POST['v_dbuser'])) $errors[] = 'username';
|
||||
if (empty($_POST['v_password'])) $errors[] = 'password';
|
||||
if (empty($_POST['v_type'])) $errors[] = 'type';
|
||||
if (empty($_POST['v_charset'])) $errors[] = 'charset';
|
||||
if (empty($_POST['v_database'])) $errors[] = _('database');
|
||||
if (empty($_POST['v_dbuser'])) $errors[] = _('username');
|
||||
if (empty($_POST['v_password'])) $errors[] = _('password');
|
||||
if (empty($_POST['v_type'])) $errors[] = _('type');
|
||||
if (empty($_POST['v_charset'])) $errors[] = _('charset');
|
||||
|
||||
// Protect input
|
||||
$v_database = escapeshellarg($_POST['v_database']);
|
||||
|
@ -38,7 +38,7 @@ top_panel($user,$TAB);
|
|||
$error_msg = $error_msg.", ".$error;
|
||||
}
|
||||
}
|
||||
$_SESSION['error_msg'] = "Error: field ".$error_msg." can not be blank.";
|
||||
$_SESSION['error_msg'] = _('Error: field "%s" can not be blank.',$error_msg);
|
||||
} else {
|
||||
// Add Database
|
||||
$v_type = escapeshellarg($_POST['v_type']);
|
||||
|
@ -48,12 +48,12 @@ top_panel($user,$TAB);
|
|||
$v_charset = $_POST['v_charset'];
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = 'Error: vesta did not return any output.';
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
unset($v_password);
|
||||
unset($output);
|
||||
} else {
|
||||
$_SESSION['ok_msg'] = "OK: database <a href='/edit/db/?database=".$user."_".$_POST['v_database']."'><b>".$user."_".$_POST['v_database']."</b></a> has been created successfully.";
|
||||
$_SESSION['ok_msg'] = _('DATABASE_CREATED_OK',$user."_".$_POST['v_database'],$user."_".$_POST['v_database']);
|
||||
unset($v_database);
|
||||
unset($v_dbuser);
|
||||
unset($v_password);
|
||||
|
|
|
@ -16,8 +16,8 @@ top_panel($user,$TAB);
|
|||
//if ($_SESSION['user'] == 'admin') {
|
||||
if (!empty($_POST['ok'])) {
|
||||
// Check input
|
||||
if (empty($_POST['v_domain'])) $errors[] = 'domain';
|
||||
if (empty($_POST['v_ip'])) $errors[] = 'ip';
|
||||
if (empty($_POST['v_domain'])) $errors[] = _('domain');
|
||||
if (empty($_POST['v_ip'])) $errors[] = _('ip');
|
||||
|
||||
// Protect input
|
||||
$v_domain = preg_replace("/^www./i", "", $_POST['v_domain']);
|
||||
|
@ -42,14 +42,14 @@ top_panel($user,$TAB);
|
|||
$error_msg = $error_msg.", ".$error;
|
||||
}
|
||||
}
|
||||
$_SESSION['error_msg'] = "Error: field ".$error_msg." can not be blank.";
|
||||
$_SESSION['error_msg'] = _('Error: field "%s" can not be blank.',$error_msg);
|
||||
} else {
|
||||
|
||||
// Add DNS
|
||||
exec (VESTA_CMD."v-add-dns-domain ".$user." ".$v_domain." ".$v_ip." ".$v_template." ".$v_ns1." ".$v_ns2." ".$v_ns3." ".$ns4, $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: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
@ -60,7 +60,7 @@ top_panel($user,$TAB);
|
|||
exec (VESTA_CMD."v-change-dns-domain-exp ".$user." ".$v_domain." ".$v_exp, $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: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
@ -72,14 +72,14 @@ top_panel($user,$TAB);
|
|||
exec (VESTA_CMD."v-change-dns-domain-ttl ".$user." ".$v_domain." ".$v_ttl, $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: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
}
|
||||
|
||||
if (empty($_SESSION['error_msg'])) {
|
||||
$_SESSION['ok_msg'] = "OK: domain <a href='/list/dns/?domain=".$_POST[v_domain]."'><b>".$_POST[v_domain]."</b></a> has been created successfully.";
|
||||
$_SESSION['ok_msg'] = _('DOMAIN_CREATED_OK',$_POST[v_domain],$_POST[v_domain]);
|
||||
unset($v_domain);
|
||||
}
|
||||
}
|
||||
|
@ -110,19 +110,19 @@ top_panel($user,$TAB);
|
|||
$error_msg = $error_msg.", ".$error;
|
||||
}
|
||||
}
|
||||
$_SESSION['error_msg'] = "Error: field ".$error_msg." can not be blank.";
|
||||
$_SESSION['error_msg'] = _('Error: field "%s" can not be blank.',$error_msg);
|
||||
} else {
|
||||
// Add DNS Record
|
||||
exec (VESTA_CMD."v-add-dns-domain-record ".$user." ".$v_domain." ".$v_rec." ".$v_type." ".$v_val." ".$v_priority, $output, $return_var);
|
||||
$v_type = $_POST['v_type'];
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = 'Error: vesta did not return any output.';
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
if (empty($_SESSION['error_msg'])) {
|
||||
$_SESSION['ok_msg'] = "OK: record <b>".$_POST[v_rec].".".$_POST[v_domain]."</b> has been created successfully.";
|
||||
$_SESSION['ok_msg'] = _('RECORD_CREATED_OK',$_POST[v_rec],$_POST[v_domain]);
|
||||
unset($v_domain);
|
||||
unset($v_rec);
|
||||
unset($v_val);
|
||||
|
|
|
@ -16,11 +16,10 @@ top_panel($user,$TAB);
|
|||
if ($_SESSION['user'] == 'admin') {
|
||||
if (!empty($_POST['ok'])) {
|
||||
// Check input
|
||||
if (empty($_POST['v_ip'])) $errors[] = 'ip address';
|
||||
if (empty($_POST['v_netmask'])) $errors[] = 'netmask';
|
||||
if (empty($_POST['v_interface'])) $errors[] = 'interface';
|
||||
if (empty($_POST['v_owner'])) $errors[] = 'assigned used';
|
||||
if (empty($_POST['v_interface'])) $errors[] = 'interface';
|
||||
if (empty($_POST['v_ip'])) $errors[] = _('ip address');
|
||||
if (empty($_POST['v_netmask'])) $errors[] = _('netmask');
|
||||
if (empty($_POST['v_interface'])) $errors[] = _('interface');
|
||||
if (empty($_POST['v_owner'])) $errors[] = _('assigned user');
|
||||
|
||||
// Protect input
|
||||
$v_ip = escapeshellarg($_POST['v_ip']);
|
||||
|
@ -47,7 +46,7 @@ if ($_SESSION['user'] == 'admin') {
|
|||
$error_msg = $error_msg.", ".$error;
|
||||
}
|
||||
}
|
||||
$_SESSION['error_msg'] = "Error: field ".$error_msg." can not be blank.";
|
||||
$_SESSION['error_msg'] = _('Error: field "%s" can not be blank.',$error_msg);
|
||||
} else {
|
||||
// Add IP
|
||||
$v_interface = escapeshellarg($_POST['v_interface']);
|
||||
|
@ -57,12 +56,12 @@ if ($_SESSION['user'] == 'admin') {
|
|||
$v_interface = $_POST['v_interface'];
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = 'Error: vesta did not return any output.';
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
unset($v_password);
|
||||
unset($output);
|
||||
} else {
|
||||
$_SESSION['ok_msg'] = "OK: ip <a href='/edit/ip/?ip=".$_POST['v_ip']."'><b>".$_POST['v_ip']."</b></a> has been created successfully.";
|
||||
$_SESSION['ok_msg'] = _('IP_CREATED_OK',$_POST['v_ip'],$_POST['v_ip']);
|
||||
unset($v_ip);
|
||||
unset($v_netmask);
|
||||
unset($v_name);
|
||||
|
|
|
@ -16,7 +16,7 @@ top_panel($user,$TAB);
|
|||
//if ($_SESSION['user'] == 'admin') {
|
||||
// Mail Domain
|
||||
if (!empty($_POST['ok'])) {
|
||||
if (empty($_POST['v_domain'])) $errors[] = 'domain';
|
||||
if (empty($_POST['v_domain'])) $errors[] = _('domain');
|
||||
if (!empty($_POST['v_antispam'])) {
|
||||
$v_antispam = 'yes';
|
||||
} else {
|
||||
|
@ -48,20 +48,20 @@ top_panel($user,$TAB);
|
|||
$error_msg = $error_msg.", ".$error;
|
||||
}
|
||||
}
|
||||
$_SESSION['error_msg'] = "Error: field ".$error_msg." can not be blank.";
|
||||
$_SESSION['error_msg'] = _('Error: field "%s" can not be blank.',$error_msg);
|
||||
} else {
|
||||
|
||||
// Add mail domain
|
||||
exec (VESTA_CMD."v-add-mail-domain ".$user." ".$v_domain." ".$v_antispam." ".$v_antivirus." ".$v_dkim, $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: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
||||
if (empty($_SESSION['error_msg'])) {
|
||||
$_SESSION['ok_msg'] = "OK: domain <a href='/list/mail/?domain=".$_POST[v_domain]."'><b>".$_POST[v_domain]."</b></a> has been created successfully.";
|
||||
$_SESSION['ok_msg'] = _("DOMAIN_MAIL_CREATED_OK",$_POST[v_domain],$_POST[v_domain]);
|
||||
unset($v_domain);
|
||||
}
|
||||
}
|
||||
|
@ -71,9 +71,9 @@ top_panel($user,$TAB);
|
|||
// Mail Account
|
||||
if (!empty($_POST['ok_acc'])) {
|
||||
// Check input
|
||||
if (empty($_POST['v_domain'])) $errors[] = 'domain';
|
||||
if (empty($_POST['v_account'])) $errors[] = 'account';
|
||||
if (empty($_POST['v_password'])) $errors[] = 'password';
|
||||
if (empty($_POST['v_domain'])) $errors[] = _('domain');
|
||||
if (empty($_POST['v_account'])) $errors[] = _('account');
|
||||
if (empty($_POST['v_password'])) $errors[] = _('password');
|
||||
|
||||
// Protect input
|
||||
$v_domain = escapeshellarg($_POST['v_domain']);
|
||||
|
@ -95,13 +95,13 @@ top_panel($user,$TAB);
|
|||
$error_msg = $error_msg.", ".$error;
|
||||
}
|
||||
}
|
||||
$_SESSION['error_msg'] = "Error: field ".$error_msg." can not be blank.";
|
||||
$_SESSION['error_msg'] = _('Error: field "%s" can not be blank.',$error_msg);
|
||||
} else {
|
||||
// Add Mail Account
|
||||
exec (VESTA_CMD."v-add-mail-account ".$user." ".$v_domain." ".$v_account." ".$v_password." ".$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: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
|
||||
|
@ -118,7 +118,7 @@ top_panel($user,$TAB);
|
|||
exec (VESTA_CMD."v-add-mail-account-alias ".$user." ".$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: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
}
|
||||
|
@ -139,7 +139,7 @@ top_panel($user,$TAB);
|
|||
exec (VESTA_CMD."v-add-mail-account-forward ".$user." ".$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: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
}
|
||||
|
@ -149,7 +149,7 @@ top_panel($user,$TAB);
|
|||
|
||||
unset($output);
|
||||
if (empty($_SESSION['error_msg'])) {
|
||||
$_SESSION['ok_msg'] = "OK: account <a href='/edit/mail/?account=".$_POST['v_account']."&domain=".$_POST[v_domain]."'><b>".$_POST['v_account']."@".$_POST[v_domain]."</b></a> has been created successfully.";
|
||||
$_SESSION['ok_msg'] = _('MAIL_ACCOUNT_CREATED_OK',$_POST['v_account'],$_POST[v_domain],$_POST['v_account'],$_POST[v_domain]);
|
||||
unset($v_account);
|
||||
unset($v_password);
|
||||
unset($v_password);
|
||||
|
|
|
@ -20,22 +20,22 @@ top_panel($user,$TAB);
|
|||
if ($_SESSION['user'] == 'admin') {
|
||||
if (!empty($_POST['ok'])) {
|
||||
// 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
|
||||
|
@ -73,7 +73,7 @@ if ($_SESSION['user'] == 'admin') {
|
|||
$error_msg = $error_msg.", ".$error;
|
||||
}
|
||||
}
|
||||
$_SESSION['error_msg'] = "Error: field ".$error_msg." can not be blank.";
|
||||
$_SESSION['error_msg'] = _('Error: field "%s" can not be blank.',$error_msg);
|
||||
} else {
|
||||
exec ('mktemp -d', $output, $return_var);
|
||||
$tmpdir = $output[0];
|
||||
|
@ -107,7 +107,7 @@ if ($_SESSION['user'] == 'admin') {
|
|||
exec (VESTA_CMD."v-add-user-package ".$tmpdir." ".$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: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
@ -119,7 +119,7 @@ if ($_SESSION['user'] == 'admin') {
|
|||
|
||||
// Check output
|
||||
if (empty($_SESSION['error_msg'])) {
|
||||
$_SESSION['ok_msg'] = "OK: package <a href='/edit/package/?package=".$_POST['v_package']."'><b>".$_POST['v_package']."</b></a> has been created successfully.";
|
||||
$_SESSION['ok_msg'] = _('PACKAGE_CREATED_OK',$_POST['v_package'],$_POST['v_package']);
|
||||
unset($v_package);
|
||||
}
|
||||
|
||||
|
|
|
@ -20,12 +20,12 @@ top_panel($user,$TAB);
|
|||
if ($_SESSION['user'] == 'admin') {
|
||||
if (!empty($_POST['ok'])) {
|
||||
// Check input
|
||||
if (empty($_POST['v_username'])) $errors[] = 'user';
|
||||
if (empty($_POST['v_password'])) $errors[] = 'password';
|
||||
if (empty($_POST['v_package'])) $errrors[] = 'package';
|
||||
if (empty($_POST['v_email'])) $errors[] = 'email';
|
||||
if (empty($_POST['v_fname'])) $errors[] = 'first name';
|
||||
if (empty($_POST['v_lname'])) $errors[] = 'last name';
|
||||
if (empty($_POST['v_username'])) $errors[] = _('user');
|
||||
if (empty($_POST['v_password'])) $errors[] = _('password');
|
||||
if (empty($_POST['v_package'])) $errrors[] = _('package');
|
||||
if (empty($_POST['v_email'])) $errors[] = _('email');
|
||||
if (empty($_POST['v_fname'])) $errors[] = _('first name');
|
||||
if (empty($_POST['v_lname'])) $errors[] = _('last name');
|
||||
|
||||
// Protect input
|
||||
$v_username = escapeshellarg($_POST['v_username']);
|
||||
|
@ -38,7 +38,7 @@ if ($_SESSION['user'] == 'admin') {
|
|||
|
||||
// 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.');
|
||||
}
|
||||
|
||||
// Check for errors
|
||||
|
@ -50,35 +50,31 @@ if ($_SESSION['user'] == 'admin') {
|
|||
$error_msg = $error_msg.", ".$error;
|
||||
}
|
||||
}
|
||||
$_SESSION['error_msg'] = "Error: field ".$error_msg." can not be blank.";
|
||||
$_SESSION['error_msg'] = _('Error: field "%s" can not be blank.',$error_msg);
|
||||
}
|
||||
|
||||
if (empty($_SESSION['error_msg'])) {
|
||||
exec (VESTA_CMD."v-add-user ".$v_username." ".$v_password." ".$v_email." ".$v_package." ".$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: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
} else {
|
||||
if (empty($v_notify)) {
|
||||
$to = $_POST['v_email'];
|
||||
$subject = "Welcome to Vesta Control Panel";
|
||||
$subject = _("Welcome to Vesta Control Panel");
|
||||
$hostname = exec('hostname');
|
||||
$from = "Vesta Control Panel <noreply@".$hostname.">";
|
||||
$from = _('MAIL_FROM',$hostname);
|
||||
if (!empty($_POST['v_fname'])) {
|
||||
$mailtext = "Hello ".$_POST['v_fname']." ".$_POST['v_lname'].",\n";
|
||||
$mailtext = _('GREETINGS_GORDON_FREEMAN',$_POST['v_fname'],$_POST['v_lname']);
|
||||
} else {
|
||||
$mailtext = "Hello,\n";
|
||||
$mailtext = _('GREETINGS');
|
||||
}
|
||||
$mailtext .= "Your account has been created successfully and is ready to use.\n\n";
|
||||
$mailtext .= "https://".$_SERVER['HTTP_HOST']."/login/\n";
|
||||
$mailtext .= "username: ".$_POST['v_username']."\n";
|
||||
$mailtext .= "password: ".$_POST['v_password']."\n\n";
|
||||
$mailtext .= "--\nVesta Control Panel\n";
|
||||
$mailtext .= _('ACCOUNT_READY',$_SERVER['HTTP_HOST'],$_POST['v_username'],$_POST['v_password']);
|
||||
send_email($to, $subject, $mailtext, $from);
|
||||
}
|
||||
|
||||
$_SESSION['ok_msg'] = "OK: user <a href='/edit/user/?user=".$_POST[v_username]."'><b>".$_POST[v_username]."</b></a> has been created successfully.";
|
||||
$_SESSION['ok_msg'] = _('ACCOUNT_CREATED_OK',$_POST[v_username],$_POST[v_username]);
|
||||
unset($v_username);
|
||||
unset($v_password);
|
||||
unset($v_email);
|
||||
|
|
|
@ -14,12 +14,12 @@ top_panel($user,$TAB);
|
|||
|
||||
if (!empty($_POST['ok'])) {
|
||||
// Check input
|
||||
if (empty($_POST['v_domain'])) $errors[] = 'domain';
|
||||
if (empty($_POST['v_ip'])) $errors[] = 'ip';
|
||||
if ((!empty($_POST['v_ssl'])) && (empty($_POST['v_ssl_crt']))) $errors[] = 'ssl certificate';
|
||||
if ((!empty($_POST['v_ssl'])) && (empty($_POST['v_ssl_key']))) $errors[] = 'ssl key';
|
||||
if ((!empty($_POST['v_stats_user'])) && (empty($_POST['v_stats_password']))) $errors[] = 'stats user password';
|
||||
if ((!empty($_POST['v_ftp_user'])) && (empty($_POST['v_ftp_password']))) $errors[] = 'ftp user password';
|
||||
if (empty($_POST['v_domain'])) $errors[] = _('domain');
|
||||
if (empty($_POST['v_ip'])) $errors[] = _('ip');
|
||||
if ((!empty($_POST['v_ssl'])) && (empty($_POST['v_ssl_crt']))) $errors[] = _('ssl certificate');
|
||||
if ((!empty($_POST['v_ssl'])) && (empty($_POST['v_ssl_key']))) $errors[] = _('ssl key');
|
||||
if ((!empty($_POST['v_stats_user'])) && (empty($_POST['v_stats_password']))) $errors[] = _('stats user password');
|
||||
if ((!empty($_POST['v_ftp_user'])) && (empty($_POST['v_ftp_password']))) $errors[] = _('ftp user password');
|
||||
|
||||
if ((!empty($_POST['v_aliases'])) && ($_POST['v_aliases'] != 'www.'.$_POST['v_domain'])) $v_adv = 'yes';
|
||||
if ((!empty($_POST['v_ssl'])) || (!empty($_POST['v_elog']))) $v_adv = 'yes';
|
||||
|
@ -67,7 +67,7 @@ top_panel($user,$TAB);
|
|||
|
||||
// Validate email
|
||||
if ((!empty($_POST['v_ftp_email'])) && (!filter_var($_POST['v_ftp_email'], FILTER_VALIDATE_EMAIL))) {
|
||||
$_SESSION['error_msg'] = 'Please enter valid email address.';
|
||||
$_SESSION['error_msg'] = _('Please enter valid email address.');
|
||||
}
|
||||
|
||||
// Check for errors
|
||||
|
@ -79,7 +79,7 @@ top_panel($user,$TAB);
|
|||
$error_msg = $error_msg.", ".$error;
|
||||
}
|
||||
}
|
||||
$_SESSION['error_msg'] = "Error: field ".$error_msg." can not be blank.";
|
||||
$_SESSION['error_msg'] = _('Error: field "%s" can not be blank.',$error_msg);
|
||||
}
|
||||
|
||||
if (empty($_SESSION['error_msg'])) {
|
||||
|
@ -87,7 +87,7 @@ top_panel($user,$TAB);
|
|||
exec (VESTA_CMD."v-add-web-domain ".$user." ".$v_domain." ".$v_ip." ".$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: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
@ -97,7 +97,7 @@ top_panel($user,$TAB);
|
|||
exec (VESTA_CMD."v-add-dns-domain ".$user." ".$v_domain." ".$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: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
@ -108,7 +108,7 @@ top_panel($user,$TAB);
|
|||
exec (VESTA_CMD."v-add-mail-domain ".$user." ".$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: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
@ -130,7 +130,7 @@ top_panel($user,$TAB);
|
|||
exec (VESTA_CMD."v-add-web-domain-alias ".$user." ".$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: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
}
|
||||
|
@ -139,7 +139,7 @@ top_panel($user,$TAB);
|
|||
exec (VESTA_CMD."v-add-dns-on-web-alias ".$user." ".$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: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
@ -154,7 +154,7 @@ top_panel($user,$TAB);
|
|||
exec (VESTA_CMD."v-delete-web-domain-alias ".$user." ".$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: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
}
|
||||
|
@ -167,7 +167,7 @@ top_panel($user,$TAB);
|
|||
exec (VESTA_CMD."v-add-web-domain-nginx ".$user." ".$v_domain." 'default' ".$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: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
@ -206,7 +206,7 @@ top_panel($user,$TAB);
|
|||
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: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
@ -218,7 +218,7 @@ top_panel($user,$TAB);
|
|||
exec (VESTA_CMD."v-add-web-domain-stats ".$user." ".$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: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
@ -229,7 +229,7 @@ top_panel($user,$TAB);
|
|||
exec (VESTA_CMD."v-add-web-domain-stats-user ".$user." ".$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: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($v_stats_user);
|
||||
|
@ -246,19 +246,15 @@ top_panel($user,$TAB);
|
|||
exec (VESTA_CMD."v-add-web-domain-ftp ".$user." ".$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: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
} else {
|
||||
if (!empty($v_ftp_email)) {
|
||||
$to = $_POST['v_ftp_email'];
|
||||
$subject = "FTP login credentials";
|
||||
$subject = _("FTP login credentials");
|
||||
$hostname = exec('hostname');
|
||||
$from = "Vesta Control Panel <noreply@".$hostname.">";
|
||||
$mailtext .= "Your ftp account has been created successfully and is ready to use.\n\n";
|
||||
$mailtext .= "hostname: ".$_POST['v_domain']."\n";
|
||||
$mailtext .= "username: ".$user."_".$_POST['v_ftp_user']."\n";
|
||||
$mailtext .= "password: ".$_POST['v_ftp_password']."\n\n";
|
||||
$mailtext .= "--\nVesta Control Panel\n";
|
||||
$from = _('MAIL_FROM',$hostname);
|
||||
$mailtext .= _('FTP_ACCOUNT_READY',$_POST['v_domain'],$user,$_POST['v_ftp_user'],$_POST['v_ftp_password']);
|
||||
send_email($to, $subject, $mailtext, $from);
|
||||
unset($v_ftp_email);
|
||||
}
|
||||
|
@ -273,7 +269,7 @@ top_panel($user,$TAB);
|
|||
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: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
@ -283,11 +279,11 @@ top_panel($user,$TAB);
|
|||
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: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
$_SESSION['ok_msg'] = "OK: domain <a href='/edit/web/?domain=".$_POST[v_domain]."'><b>".$_POST[v_domain]."</b></a> has been created successfully.";
|
||||
$_SESSION['ok_msg'] = _('HOSTING_DOMAIN_CREATED_OK',$_POST[v_domain],$_POST[v_domain]);
|
||||
unset($v_domain);
|
||||
unset($v_aliases);
|
||||
unset($v_ssl);
|
||||
|
|
|
@ -17,7 +17,7 @@ include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
|
|||
}
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = 'Error: vesta did not return any output.';
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
|
|
@ -17,7 +17,7 @@ include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
|
|||
}
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = 'Error: vesta did not return any output.';
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
|
|
@ -17,7 +17,7 @@ include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
|
|||
}
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = 'Error: vesta did not return any output.';
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
|
|
@ -17,7 +17,7 @@ include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
|
|||
exec (VESTA_CMD."v-delete-dns-domain ".$v_username." ".$v_domain, $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = 'Error: vesta did not return any output.';
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
@ -39,7 +39,7 @@ include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
|
|||
exec (VESTA_CMD."v-delete-dns-domain-record ".$v_username." ".$v_domain." ".$v_record_id, $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = 'Error: vesta did not return any output.';
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
|
|
@ -12,7 +12,7 @@ if ($_SESSION['user'] == 'admin') {
|
|||
}
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = 'Error: vesta did not return any output.';
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
|
|
@ -17,7 +17,7 @@ include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
|
|||
exec (VESTA_CMD."v-delete-mail-domain ".$v_username." ".$v_domain, $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = 'Error: vesta did not return any output.';
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
@ -38,7 +38,7 @@ include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
|
|||
exec (VESTA_CMD."v-delete-mail-account ".$v_username." ".$v_domain." ".$v_account, $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = 'Error: vesta did not return any output.';
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
|
|
@ -12,7 +12,7 @@ if ($_SESSION['user'] == 'admin') {
|
|||
}
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = 'Error: vesta did not return any output.';
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
|
|
@ -12,7 +12,7 @@ if ($_SESSION['user'] == 'admin') {
|
|||
}
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = 'Error: vesta did not return any output.';
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
|
|
@ -16,7 +16,7 @@ if (!empty($_GET['domain'])) {
|
|||
exec (VESTA_CMD."v-delete-web-domain ".$v_username." ".$v_domain, $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = 'Error: vesta did not return any output.';
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
@ -28,7 +28,7 @@ if (!empty($_GET['domain'])) {
|
|||
exec (VESTA_CMD."v-delete-dns-domain ".$v_username." ".$v_domain, $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = 'Error: vesta did not return any output.';
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
@ -42,7 +42,7 @@ if (!empty($_GET['domain'])) {
|
|||
exec (VESTA_CMD."v-delete-mail-domain ".$v_username." ".$v_domain, $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = 'Error: vesta did not return any output.';
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
|
|
@ -28,7 +28,7 @@ top_panel($user,$TAB);
|
|||
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: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
} else {
|
||||
$data = json_decode(implode('', $output), true);
|
||||
|
@ -64,7 +64,7 @@ top_panel($user,$TAB);
|
|||
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: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
|
|
@ -28,7 +28,7 @@ top_panel($user,$TAB);
|
|||
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: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
} else {
|
||||
$data = json_decode(implode('', $output), true);
|
||||
|
@ -58,7 +58,7 @@ top_panel($user,$TAB);
|
|||
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: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
$v_password = "••••••••";
|
||||
|
|
|
@ -30,7 +30,7 @@ top_panel($user,$TAB);
|
|||
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: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
} else {
|
||||
$data = json_decode(implode('', $output), true);
|
||||
|
@ -67,7 +67,7 @@ top_panel($user,$TAB);
|
|||
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: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
$restart_dns = 'yes';
|
||||
|
@ -80,7 +80,7 @@ top_panel($user,$TAB);
|
|||
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: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
@ -93,7 +93,7 @@ top_panel($user,$TAB);
|
|||
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: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
@ -106,7 +106,7 @@ top_panel($user,$TAB);
|
|||
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: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
@ -119,7 +119,7 @@ top_panel($user,$TAB);
|
|||
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: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
@ -131,7 +131,7 @@ top_panel($user,$TAB);
|
|||
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: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
}
|
||||
|
@ -154,7 +154,7 @@ top_panel($user,$TAB);
|
|||
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: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
} else {
|
||||
$data = json_decode(implode('', $output), true);
|
||||
|
@ -187,7 +187,7 @@ top_panel($user,$TAB);
|
|||
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: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
$v_val = $_POST['v_val'];
|
||||
|
|
|
@ -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: vesta did not return any output.';
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
} else {
|
||||
$data = json_decode(implode('', $output), true);
|
||||
|
@ -62,7 +62,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: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
@ -72,7 +72,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: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
@ -85,7 +85,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: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
$v_owner = $_POST['v_owner'];
|
||||
|
@ -98,7 +98,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: vesta did not return any output.';
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
|
|
@ -30,7 +30,7 @@ top_panel($user,$TAB);
|
|||
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: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
} else {
|
||||
$data = json_decode(implode('', $output), true);
|
||||
|
@ -60,7 +60,7 @@ top_panel($user,$TAB);
|
|||
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: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
$v_antispam = 'no';
|
||||
|
@ -70,7 +70,7 @@ top_panel($user,$TAB);
|
|||
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: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
$v_antispam = 'yes';
|
||||
|
@ -82,7 +82,7 @@ top_panel($user,$TAB);
|
|||
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: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
$v_antivirus = 'no';
|
||||
|
@ -92,7 +92,7 @@ top_panel($user,$TAB);
|
|||
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: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
$v_antivirus = 'yes';
|
||||
|
@ -108,7 +108,7 @@ top_panel($user,$TAB);
|
|||
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: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
$v_dkim = 'no';
|
||||
|
@ -118,7 +118,7 @@ top_panel($user,$TAB);
|
|||
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: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
$v_dkim = 'yes';
|
||||
|
@ -130,7 +130,7 @@ top_panel($user,$TAB);
|
|||
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: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
$v_catchall = '';
|
||||
|
@ -143,7 +143,7 @@ top_panel($user,$TAB);
|
|||
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: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
@ -155,7 +155,7 @@ top_panel($user,$TAB);
|
|||
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: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
@ -176,7 +176,7 @@ top_panel($user,$TAB);
|
|||
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: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
} else {
|
||||
$data = json_decode(implode('', $output), true);
|
||||
|
@ -218,7 +218,7 @@ top_panel($user,$TAB);
|
|||
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: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
$v_password = "••••••••";
|
||||
|
@ -235,7 +235,7 @@ top_panel($user,$TAB);
|
|||
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: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
@ -256,7 +256,7 @@ top_panel($user,$TAB);
|
|||
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: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
@ -268,7 +268,7 @@ top_panel($user,$TAB);
|
|||
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: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
@ -290,7 +290,7 @@ top_panel($user,$TAB);
|
|||
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: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
@ -302,7 +302,7 @@ top_panel($user,$TAB);
|
|||
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: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
@ -315,7 +315,7 @@ top_panel($user,$TAB);
|
|||
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: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
@ -329,7 +329,7 @@ top_panel($user,$TAB);
|
|||
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: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
@ -345,7 +345,7 @@ top_panel($user,$TAB);
|
|||
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: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
|
|
@ -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: vesta did not return any output.';
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
} else {
|
||||
$data = json_decode(implode('', $output), true);
|
||||
|
@ -122,7 +122,7 @@ if ($_SESSION['user'] == 'admin') {
|
|||
$error_msg = $error_msg.", ".$error;
|
||||
}
|
||||
}
|
||||
$_SESSION['error_msg'] = "Error: field ".$error_msg." can not be blank.";
|
||||
$_SESSION['error_msg'] = _('Error: 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: vesta did not return any output.';
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
@ -170,7 +170,7 @@ 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: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
|
||||
|
|
|
@ -27,7 +27,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: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
} else {
|
||||
$data = json_decode(implode('', $output), true);
|
||||
|
@ -78,7 +78,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: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
$v_password = "••••••••";
|
||||
|
@ -91,7 +91,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: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
@ -103,7 +103,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: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
@ -115,7 +115,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: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
@ -125,13 +125,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: vesta did not return any output.';
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
}
|
||||
|
@ -145,7 +145,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: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
@ -163,7 +163,7 @@ 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: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
@ -188,7 +188,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: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
} else {
|
||||
$data = json_decode(implode('', $output), true);
|
||||
|
@ -225,7 +225,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: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
$v_password = "••••••••";
|
||||
|
@ -238,7 +238,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: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
@ -256,7 +256,7 @@ 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: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
|
|
@ -32,7 +32,7 @@ top_panel($user,$TAB);
|
|||
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: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
} else {
|
||||
$data = json_decode(implode('', $output), true);
|
||||
|
@ -95,7 +95,7 @@ top_panel($user,$TAB);
|
|||
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: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
$restart_web = 'yes';
|
||||
|
@ -105,7 +105,7 @@ top_panel($user,$TAB);
|
|||
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: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
$restart_dns = 'yes';
|
||||
|
@ -117,7 +117,7 @@ top_panel($user,$TAB);
|
|||
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: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
$restart_dns = 'yes';
|
||||
|
@ -132,7 +132,7 @@ top_panel($user,$TAB);
|
|||
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: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
@ -155,7 +155,7 @@ top_panel($user,$TAB);
|
|||
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: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
@ -164,7 +164,7 @@ top_panel($user,$TAB);
|
|||
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: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
$restart_dns = 'yes';
|
||||
|
@ -181,7 +181,7 @@ top_panel($user,$TAB);
|
|||
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: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
@ -189,7 +189,7 @@ top_panel($user,$TAB);
|
|||
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: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
$restart_dns = 'yes';
|
||||
|
@ -204,7 +204,7 @@ top_panel($user,$TAB);
|
|||
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: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
@ -222,7 +222,7 @@ top_panel($user,$TAB);
|
|||
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: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
$v_nginx_ext = str_replace(',', ', ', $ext);
|
||||
|
@ -243,7 +243,7 @@ top_panel($user,$TAB);
|
|||
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: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
@ -256,7 +256,7 @@ top_panel($user,$TAB);
|
|||
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: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
@ -295,7 +295,7 @@ top_panel($user,$TAB);
|
|||
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: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
@ -311,7 +311,7 @@ top_panel($user,$TAB);
|
|||
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: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
$v_ssl_home = $_POST['v_ssl_home'];
|
||||
|
@ -331,7 +331,7 @@ top_panel($user,$TAB);
|
|||
$error_msg = $error_msg.", ".$error;
|
||||
}
|
||||
}
|
||||
$_SESSION['error_msg'] = "Error: field ".$error_msg." can not be blank.";
|
||||
$_SESSION['error_msg'] = _('Error: field "%s" can not be blank.',$error_msg);
|
||||
} else {
|
||||
exec ('mktemp -d', $mktemp_output, $return_var);
|
||||
$tmpdir = $mktemp_output[0];
|
||||
|
@ -359,7 +359,7 @@ top_panel($user,$TAB);
|
|||
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: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
@ -377,7 +377,7 @@ top_panel($user,$TAB);
|
|||
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: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
@ -388,7 +388,7 @@ top_panel($user,$TAB);
|
|||
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: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
@ -398,7 +398,7 @@ top_panel($user,$TAB);
|
|||
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: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
@ -409,7 +409,7 @@ top_panel($user,$TAB);
|
|||
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: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
@ -427,14 +427,14 @@ top_panel($user,$TAB);
|
|||
$error_msg = $error_msg.", ".$error;
|
||||
}
|
||||
}
|
||||
$_SESSION['error_msg'] = "Error: field ".$error_msg." can not be blank.";
|
||||
$_SESSION['error_msg'] = _('Error: 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: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
@ -452,7 +452,7 @@ top_panel($user,$TAB);
|
|||
$error_msg = $error_msg.", ".$error;
|
||||
}
|
||||
}
|
||||
$_SESSION['error_msg'] = "Error: field ".$error_msg." can not be blank.";
|
||||
$_SESSION['error_msg'] = _('Error: 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']);
|
||||
|
@ -460,7 +460,7 @@ top_panel($user,$TAB);
|
|||
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: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
@ -473,7 +473,7 @@ top_panel($user,$TAB);
|
|||
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: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
@ -492,7 +492,7 @@ top_panel($user,$TAB);
|
|||
$error_msg = $error_msg.", ".$error;
|
||||
}
|
||||
}
|
||||
$_SESSION['error_msg'] = "Error: field ".$error_msg." can not be blank.";
|
||||
$_SESSION['error_msg'] = _('Error: 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']);
|
||||
|
@ -501,7 +501,7 @@ top_panel($user,$TAB);
|
|||
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: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
@ -511,7 +511,7 @@ top_panel($user,$TAB);
|
|||
}
|
||||
|
||||
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 username';
|
||||
if (empty($_POST['v_ftp_password'])) $errors[] = 'ftp password';
|
||||
if (!empty($errors[0])) {
|
||||
|
@ -522,7 +522,7 @@ top_panel($user,$TAB);
|
|||
$error_msg = $error_msg.", ".$error;
|
||||
}
|
||||
}
|
||||
$_SESSION['error_msg'] = "Error: field ".$error_msg." can not be blank.";
|
||||
$_SESSION['error_msg'] = _('Error: field "%s" can not be blank.',$error_msg);
|
||||
}
|
||||
if (empty($_SESSION['error_msg'])) {
|
||||
$v_ftp_user = escapeshellarg($_POST['v_ftp_user']);
|
||||
|
@ -530,7 +530,7 @@ top_panel($user,$TAB);
|
|||
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: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
} else {
|
||||
if (!empty($_POST['v_ftp_email'])) {
|
||||
|
@ -558,7 +558,7 @@ top_panel($user,$TAB);
|
|||
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: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
}
|
||||
|
@ -568,7 +568,7 @@ top_panel($user,$TAB);
|
|||
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: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
}
|
||||
|
|
15
web/inc/i18n/en.php
Normal file
15
web/inc/i18n/en.php
Normal file
|
@ -0,0 +1,15 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Vesta CP language file
|
||||
* Translated by ZonD80 (zond80@gmail.com)
|
||||
*/
|
||||
|
||||
if (!defined('LANGUAGE')) die('Direct access not allowed');
|
||||
|
||||
$LANG = array(
|
||||
'Hour'=>'Hour',
|
||||
'Min'=>'Min',
|
||||
'pb'=>'pb',
|
||||
|
||||
);
|
82
web/inc/i18n/ru.php
Normal file
82
web/inc/i18n/ru.php
Normal file
|
@ -0,0 +1,82 @@
|
|||
<?php
|
||||
/**
|
||||
* Vesta CP language file
|
||||
* Translated by ZonD80 (zond80@gmail.com)
|
||||
*/
|
||||
|
||||
if (!defined('LANGUAGE')) die('Direct access not allowed');
|
||||
|
||||
$LANG = array(
|
||||
'Hour'=>'Час',
|
||||
'Min'=>'Мин',
|
||||
'pb'=>'пб',
|
||||
'tb'=>'тб',
|
||||
'gb'=>'гб',
|
||||
'mb'=>'мб',
|
||||
'Error'=>'Ошибка',
|
||||
'minute'=>'минута',
|
||||
'hour'=>'час',
|
||||
'day'=>'день',
|
||||
'month'=>'месяц',
|
||||
'day of week'=>'день недели',
|
||||
'cmd'=>'командная строка',
|
||||
'Error: field "%s" can not be blank.'=>'Ошибка: Поле "%s" не может быть пустым.',
|
||||
_('Error: vesta did not return any output.')=>'Ошибка: Vesta не отвечает',
|
||||
'OK: cron job has been created successfully.'=>'Успех: Задание Cron успешно создано',
|
||||
'database'=>'база данных',
|
||||
'username'=>'имя пользователя',
|
||||
'password'=>'пароль',
|
||||
'type'=>'тип',
|
||||
'charset'=>'кодировка',
|
||||
'DATABASE_CREATED_OK'=>'Успех: База данных <a href="/edit/db/?database=%s"><b>%s</b></a> успешно создана.',
|
||||
'domain'=>'домен',
|
||||
'ip'=>'IP',
|
||||
'DOMAIN_CREATED_OK'=>'Успех: Домен <a href="/list/dns/?domain=%s"><b>%s</b></a> успешно создан.',
|
||||
'RECORD_CREATED_OK'=>'Успех: Запись <b>%s.%s</b> успешно создана.',
|
||||
'ip address'=>'IP-адрес',
|
||||
'netmask'=>'маска подсети',
|
||||
'interface'=>'интерфейс',
|
||||
'assigned user'=>'назначенный пользователь',
|
||||
'IP_CREATED_OK'=>'"Успех: ip-адрес <a href="/edit/ip/?ip=%s"><b>%s</b></a> успешно создан.',
|
||||
'DOMAIN_MAIL_CREATED_OK'=>'Успех: почта для домена <a href="/list/mail/?domain=%s"><b>%s</b></a> подключена успешно',
|
||||
'account'=>'аккаунт',
|
||||
'password'=>'пароль',
|
||||
'MAIL_ACCOUNT_CREATED_OK'=>'Успех: почтовый аккаунт <a href="/edit/mail/?account=%s&domain=%s"><b>%s@%s</b></a> успешно создан.',
|
||||
'package'=>'пакет',
|
||||
'template'=>'шаблон',
|
||||
'shell'=>'SSH',
|
||||
'web domains'=>'хосты',
|
||||
'web aliases'=>'перенаправления хостов',
|
||||
'dns records'=>'DNS записи',
|
||||
'mail domains'=>'домены с почтой',
|
||||
'mail accounts'=>'почтовые аккаунты',
|
||||
'databases'=>'базы данных',
|
||||
'cron jobs'=>'cron задания',
|
||||
'backups'=>'бэкапы',
|
||||
'quota'=>'квота диска',
|
||||
'bandwidth'=>'ширина канала',
|
||||
'ns1'=>'DNS-сервер #1',
|
||||
'ns2'=>'DNS-сервер #2',
|
||||
'PACKAGE_CREATED_OK'=>'Успех: Пакет <a href="/edit/package/?package=%s"><b>%s</b></a> успешно создан.',
|
||||
'user'=>'пользователь',
|
||||
'email'=>'Email',
|
||||
'first name'=>'Имя',
|
||||
'last name'=>'Фамилия',
|
||||
'Please enter valid email address.'=>'Пожалуйста, введите реальный email адрес.',
|
||||
'Welcome to Vesta Control Panel'=>'Добро пожаловать в панель управления Vesta',
|
||||
'MAIL_FROM'=>'Vesta Control Panel <noreply@%s>',
|
||||
'GREETINGS_GORDON_FREEMAN'=>"Здравствуйте, %s %s,\n",
|
||||
'GREETINGS'=>"Здравствуйте,\n",
|
||||
'ACCOUNT_READY'=>"Ваш аккаунт успешно создан и готов к использованию.\n\nhttps://%s/login/\nИмя пользователя: %s\nПароль: %s\n\n--\nПанель управления Vesta\n",
|
||||
'ACCOUNT_CREATED_OK'=>'Успех: Пользователь <a href="/edit/user/?user=%s"><b>%s</b></a> успешно создан.',
|
||||
'ssl certificate'=>'SSL сертификат',
|
||||
'ssl key'=>'ключ SSL сертификата',
|
||||
'stats user password'=>'пароль для доступа к статистике',
|
||||
'ftp user password'=>'пароль для доступа к FTP',
|
||||
'FTP login credentials'=>'Данные для доступа к FTP',
|
||||
'FTP_ACCOUNT_READY'=>"Ваш FTP аккаунт успешно создан и готов к использованию.\n\nХост: %s\nИмя пользователя: %s_%s\nПароль: %s\n\n--\nПанель управления Vesta\n",
|
||||
'HOSTING_DOMAIN_CREATED_OK'=>'Успешно: хостинг для домена <a href="/edit/web/?domain=%s"><b>%s</b></a> был успешно создан.',
|
||||
|
||||
|
||||
|
||||
);
|
|
@ -1,4 +1,25 @@
|
|||
<?php
|
||||
|
||||
// need to be moved to user settings
|
||||
define('LANGUAGE','ru');
|
||||
|
||||
require_once($_SERVER['DOCUMENT_ROOT'].'/inc/i18n/'.LANGUAGE.'.php');
|
||||
|
||||
|
||||
// works like sprintf if more than one arguments called
|
||||
function _() {
|
||||
global $LANG;
|
||||
$args = func_get_args();
|
||||
$key = $args[0];
|
||||
if (!isset($LANG[$key])) $text=$key; else
|
||||
$text=$LANG[$key];
|
||||
|
||||
if (count($args)>1) { $args[0] = $text;
|
||||
return call_user_func_array("sprintf",$args);
|
||||
}
|
||||
else return $text;
|
||||
}
|
||||
|
||||
// Check user session
|
||||
if (!isset($_SESSION['user'])) {
|
||||
$_SESSION['request_uri'] = $_SERVER['REQUEST_URI'];
|
||||
|
@ -45,9 +66,9 @@ function humanize_time($usage) {
|
|||
if ( $usage > 60 ) {
|
||||
$usage = $usage / 60;
|
||||
$usage = number_format($usage, 2);
|
||||
$usage = $usage." Hour.";
|
||||
$usage = $usage." "._('Hour').".";
|
||||
} else {
|
||||
$usage = $usage." Min.";
|
||||
$usage = $usage." "._('Min').".";
|
||||
}
|
||||
return $usage;
|
||||
}
|
||||
|
@ -60,17 +81,17 @@ function humanize_usage($usage) {
|
|||
if ( $usage > 1000 ) {
|
||||
$usage = $usage / 1000 ;
|
||||
$usage = number_format($usage, 2);
|
||||
$usage = $usage." pb";
|
||||
$usage = $usage." "._('pb');
|
||||
} else {
|
||||
$usage = number_format($usage, 2);
|
||||
$usage = $usage." tb";
|
||||
$usage = $usage." "._('tb');
|
||||
}
|
||||
} else {
|
||||
$usage = number_format($usage, 2);
|
||||
$usage = $usage." gb";
|
||||
$usage = $usage." "._('gb');
|
||||
}
|
||||
} else {
|
||||
$usage = $usage." mb";
|
||||
$usage = $usage." "._('mb');
|
||||
}
|
||||
return $usage;
|
||||
}
|
||||
|
@ -128,7 +149,7 @@ function display_error_block() {
|
|||
});
|
||||
});
|
||||
</script>
|
||||
<div id="dialog-message" title="Error">
|
||||
<div id="dialog-message" title="'._('Error').'">
|
||||
<p>';
|
||||
echo $_SESSION['error_msg'];
|
||||
echo "</p>\n </div>\n";
|
||||
|
|
|
@ -16,7 +16,7 @@ if ($_SESSION['user'] == 'admin') {
|
|||
}
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = 'Error: vesta did not return any output.';
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
|
|
@ -17,7 +17,7 @@ if ($_SESSION['user'] == 'admin') {
|
|||
}
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = 'Error: vesta did not return any output.';
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
|
|
@ -17,7 +17,7 @@ if ($_SESSION['user'] == 'admin') {
|
|||
exec (VESTA_CMD."v-suspend-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.';
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
@ -38,7 +38,7 @@ if ($_SESSION['user'] == 'admin') {
|
|||
exec (VESTA_CMD."v-suspend-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.';
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
|
|
@ -17,7 +17,7 @@ if ($_SESSION['user'] == 'admin') {
|
|||
exec (VESTA_CMD."v-suspend-mail-domain ".$v_username." ".$v_domain, $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = 'Error: vesta did not return any output.';
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
@ -38,7 +38,7 @@ if ($_SESSION['user'] == 'admin') {
|
|||
exec (VESTA_CMD."v-suspend-mail-account ".$v_username." ".$v_domain." ".$v_account, $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = 'Error: vesta did not return any output.';
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
|
|
@ -13,7 +13,7 @@ if ($_SESSION['user'] == 'admin') {
|
|||
}
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = 'Error: vesta did not return any output.';
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
|
|
@ -17,7 +17,7 @@ if ($_SESSION['user'] == 'admin') {
|
|||
}
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = 'Error: vesta did not return any output.';
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
|
|
@ -16,7 +16,7 @@ if ($_SESSION['user'] == 'admin') {
|
|||
}
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = 'Error: vesta did not return any output.';
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
|
|
@ -16,7 +16,7 @@ if ($_SESSION['user'] == 'admin') {
|
|||
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.';
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
@ -38,7 +38,7 @@ if ($_SESSION['user'] == 'admin') {
|
|||
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.';
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
|
|
@ -16,7 +16,7 @@ if ($_SESSION['user'] == 'admin') {
|
|||
exec (VESTA_CMD."v-unsuspend-mail-domain ".$v_username." ".$v_domain, $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = 'Error: vesta did not return any output.';
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
@ -37,7 +37,7 @@ if ($_SESSION['user'] == 'admin') {
|
|||
exec (VESTA_CMD."v-unsuspend-mail-account ".$v_username." ".$v_domain." ".$v_account, $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = 'Error: vesta did not return any output.';
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
|
|
@ -13,7 +13,7 @@ if ($_SESSION['user'] == 'admin') {
|
|||
}
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = 'Error: vesta did not return any output.';
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
|
|
@ -16,7 +16,7 @@ if ($_SESSION['user'] == 'admin') {
|
|||
}
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = 'Error: vesta did not return any output.';
|
||||
if (empty($error)) $error = _('Error: vesta did not return any output.');
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue