mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-21 05:44:07 -07:00
Backend changes & some templates' translation
This commit is contained in:
parent
43d7825b68
commit
dcf849263d
24 changed files with 1136 additions and 1085 deletions
|
@ -71,7 +71,7 @@ top_panel($user,$TAB);
|
|||
$v_cmd = $_POST['v_cmd'];
|
||||
}
|
||||
if (empty($_SESSION['error_msg'])) {
|
||||
$_SESSION['ok_msg'] = "OK: changes has been saved.";
|
||||
$_SESSION['ok_msg'] = _("OK: changes has been saved.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -65,7 +65,7 @@ top_panel($user,$TAB);
|
|||
unset($output);
|
||||
}
|
||||
if (empty($_SESSION['error_msg'])) {
|
||||
$_SESSION['ok_msg'] = "OK: changes has been saved.";
|
||||
$_SESSION['ok_msg'] = _('OK: changes has been saved.');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -137,7 +137,7 @@ top_panel($user,$TAB);
|
|||
}
|
||||
|
||||
if (empty($_SESSION['error_msg'])) {
|
||||
$_SESSION['ok_msg'] = "OK: changes has been saved.";
|
||||
$_SESSION['ok_msg'] = _('OK: changes has been saved.');
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -196,7 +196,7 @@ top_panel($user,$TAB);
|
|||
}
|
||||
|
||||
if (empty($_SESSION['error_msg'])) {
|
||||
$_SESSION['ok_msg'] = "OK: changes has been saved.";
|
||||
$_SESSION['ok_msg'] = _('OK: changes has been saved.');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -105,7 +105,7 @@ if ($_SESSION['user'] == 'admin') {
|
|||
}
|
||||
|
||||
if (empty($_SESSION['error_msg'])) {
|
||||
$_SESSION['ok_msg'] = "OK: changes has been saved.";
|
||||
$_SESSION['ok_msg'] = _('OK: changes has been saved.');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -100,7 +100,7 @@ top_panel($user,$TAB);
|
|||
}
|
||||
|
||||
if (empty($_SESSION['error_msg'])) {
|
||||
$_SESSION['ok_msg'] = "OK: changes has been saved.";
|
||||
$_SESSION['ok_msg'] = _('OK: changes has been saved.');
|
||||
}
|
||||
|
||||
// DKIM
|
||||
|
@ -162,7 +162,7 @@ top_panel($user,$TAB);
|
|||
}
|
||||
|
||||
if (empty($_SESSION['error_msg'])) {
|
||||
$_SESSION['ok_msg'] = "OK: changes has been saved.";
|
||||
$_SESSION['ok_msg'] = _('OK: changes has been saved.');
|
||||
}
|
||||
}
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/edit_mail.html');
|
||||
|
@ -356,7 +356,7 @@ top_panel($user,$TAB);
|
|||
|
||||
|
||||
if (empty($_SESSION['error_msg'])) {
|
||||
$_SESSION['ok_msg'] = "OK: changes has been saved.";
|
||||
$_SESSION['ok_msg'] = _('OK: changes has been saved.');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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']);
|
||||
|
@ -175,7 +175,7 @@ if ($_SESSION['user'] == 'admin') {
|
|||
}
|
||||
|
||||
if (empty($_SESSION['error_msg'])) {
|
||||
$_SESSION['ok_msg'] = "OK: changes has been saved.";
|
||||
$_SESSION['ok_msg'] = _('OK: changes has been saved.');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -170,7 +170,7 @@ if ($_SESSION['user'] == 'admin') {
|
|||
}
|
||||
|
||||
if (empty($_SESSION['error_msg'])) {
|
||||
$_SESSION['ok_msg'] = "OK: changes has been saved.";
|
||||
$_SESSION['ok_msg'] = _('OK: changes has been saved.');
|
||||
}
|
||||
}
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/edit_user.html');
|
||||
|
@ -263,7 +263,7 @@ if ($_SESSION['user'] == 'admin') {
|
|||
}
|
||||
|
||||
if (empty($_SESSION['error_msg'])) {
|
||||
$_SESSION['ok_msg'] = "OK: changes has been saved.";
|
||||
$_SESSION['ok_msg'] = _('OK: changes has been saved.');
|
||||
}
|
||||
}
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/user/edit_user.html');
|
||||
|
|
|
@ -417,8 +417,8 @@ top_panel($user,$TAB);
|
|||
$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 ) {
|
||||
|
@ -442,8 +442,8 @@ top_panel($user,$TAB);
|
|||
}
|
||||
}
|
||||
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 ) {
|
||||
|
@ -482,8 +482,8 @@ top_panel($user,$TAB);
|
|||
$v_ftp_password = '';
|
||||
}
|
||||
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 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 ) {
|
||||
|
@ -512,8 +512,8 @@ 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_user'])) $errors[] = 'ftp username';
|
||||
if (empty($_POST['v_ftp_password'])) $errors[] = 'ftp 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 ) {
|
||||
|
@ -535,14 +535,10 @@ top_panel($user,$TAB);
|
|||
} else {
|
||||
if (!empty($_POST['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: ".$_GET['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',$_GET['domain'],$user,$_POST['v_ftp_user'],$_POST['v_ftp_password']);
|
||||
send_email($to, $subject, $mailtext, $from);
|
||||
unset($v_ftp_email);
|
||||
}
|
||||
|
@ -574,7 +570,7 @@ top_panel($user,$TAB);
|
|||
}
|
||||
|
||||
if (empty($_SESSION['error_msg'])) {
|
||||
$_SESSION['ok_msg'] = "OK: changes has been saved.";
|
||||
$_SESSION['ok_msg'] = _('OK: changes has been saved.');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue