Skip to content

Commit 43d7825

Browse files
committed
Translation begins...
1 parent 8b74eb9 commit 43d7825

File tree

39 files changed

+4188
-4079
lines changed

39 files changed

+4188
-4079
lines changed

web/add/cron/index.php

Lines changed: 77 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -1,77 +1,77 @@
1-
<?php
2-
// Init
3-
//error_reporting(NULL);
4-
ob_start();
5-
session_start();
6-
$TAB = 'CRON';
7-
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
8-
9-
// Header
10-
include($_SERVER['DOCUMENT_ROOT'].'/templates/header.html');
11-
12-
// Panel
13-
top_panel($user,$TAB);
14-
15-
// Are you admin?
16-
//if ($_SESSION['user'] == 'admin') {
17-
if (!empty($_POST['ok'])) {
18-
// Check input
19-
if (empty($_POST['v_min'])) $errors[] = 'minute';
20-
if (empty($_POST['v_hour'])) $errors[] = 'hour';
21-
if (empty($_POST['v_day'])) $errors[] = 'day';
22-
if (empty($_POST['v_month'])) $errors[] = 'month';
23-
if (empty($_POST['v_wday'])) $errors[] = 'day of week';
24-
if (empty($_POST['v_cmd'])) $errors[] = 'cmd';
25-
26-
// Protect input
27-
$v_min = escapeshellarg($_POST['v_min']);
28-
$v_hour = escapeshellarg($_POST['v_hour']);
29-
$v_day = escapeshellarg($_POST['v_day']);
30-
$v_month = escapeshellarg($_POST['v_month']);
31-
$v_wday = escapeshellarg($_POST['v_wday']);
32-
$v_cmd = escapeshellarg($_POST['v_cmd']);
33-
34-
// Check for errors
35-
if (!empty($errors[0])) {
36-
foreach ($errors as $i => $error) {
37-
if ( $i == 0 ) {
38-
$error_msg = $error;
39-
} else {
40-
$error_msg = $error_msg.", ".$error;
41-
}
42-
}
43-
$_SESSION['error_msg'] = "Error: field ".$error_msg." can not be blank.";
44-
} else {
45-
// Add Cron Job
46-
exec (VESTA_CMD."v-add-cron-job ".$user." ".$v_min." ".$v_hour." ".$v_day." ".$v_month." ".$v_wday." ".$v_cmd, $output, $return_var);
47-
$v_type = $_POST['v_type'];
48-
$v_charset = $_POST['v_charset'];
49-
if ($return_var != 0) {
50-
$error = implode('<br>', $output);
51-
if (empty($error)) $error = 'Error: vesta did not return any output.';
52-
$_SESSION['error_msg'] = $error;
53-
unset($v_password);
54-
unset($output);
55-
} else {
56-
$_SESSION['ok_msg'] = "OK: cron job has been created successfully.";
57-
unset($v_min);
58-
unset($v_hour);
59-
unset($v_day);
60-
unset($v_month);
61-
unset($v_wday);
62-
unset($v_cmd);
63-
unset($output);
64-
}
65-
}
66-
}
67-
exec (VESTA_CMD."v-list-database-types 'json'", $output, $return_var);
68-
$db_types = json_decode(implode('', $output), true);
69-
unset($output);
70-
71-
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/add_cron.html');
72-
unset($_SESSION['error_msg']);
73-
unset($_SESSION['ok_msg']);
74-
//}
75-
76-
// Footer
77-
include($_SERVER['DOCUMENT_ROOT'].'/templates/footer.html');
1+
<?php
2+
// Init
3+
//error_reporting(NULL);
4+
ob_start();
5+
session_start();
6+
$TAB = 'CRON';
7+
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
8+
9+
// Header
10+
include($_SERVER['DOCUMENT_ROOT'].'/templates/header.html');
11+
12+
// Panel
13+
top_panel($user,$TAB);
14+
15+
// Are you admin?
16+
//if ($_SESSION['user'] == 'admin') {
17+
if (!empty($_POST['ok'])) {
18+
// Check input
19+
if (empty($_POST['v_min'])) $errors[] = _('minute');
20+
if (empty($_POST['v_hour'])) $errors[] = _('hour');
21+
if (empty($_POST['v_day'])) $errors[] = _('day');
22+
if (empty($_POST['v_month'])) $errors[] = _('month');
23+
if (empty($_POST['v_wday'])) $errors[] = _('day of week');
24+
if (empty($_POST['v_cmd'])) $errors[] = _('cmd');
25+
26+
// Protect input
27+
$v_min = escapeshellarg($_POST['v_min']);
28+
$v_hour = escapeshellarg($_POST['v_hour']);
29+
$v_day = escapeshellarg($_POST['v_day']);
30+
$v_month = escapeshellarg($_POST['v_month']);
31+
$v_wday = escapeshellarg($_POST['v_wday']);
32+
$v_cmd = escapeshellarg($_POST['v_cmd']);
33+
34+
// Check for errors
35+
if (!empty($errors[0])) {
36+
foreach ($errors as $i => $error) {
37+
if ( $i == 0 ) {
38+
$error_msg = $error;
39+
} else {
40+
$error_msg = $error_msg.", ".$error;
41+
}
42+
}
43+
$_SESSION['error_msg'] = _('Error: field "%s" can not be blank.',$error_msg);
44+
} else {
45+
// Add Cron Job
46+
exec (VESTA_CMD."v-add-cron-job ".$user." ".$v_min." ".$v_hour." ".$v_day." ".$v_month." ".$v_wday." ".$v_cmd, $output, $return_var);
47+
$v_type = $_POST['v_type'];
48+
$v_charset = $_POST['v_charset'];
49+
if ($return_var != 0) {
50+
$error = implode('<br>', $output);
51+
if (empty($error)) $error = _('Error: vesta did not return any output.');
52+
$_SESSION['error_msg'] = $error;
53+
unset($v_password);
54+
unset($output);
55+
} else {
56+
$_SESSION['ok_msg'] = _("OK: cron job has been created successfully.");
57+
unset($v_min);
58+
unset($v_hour);
59+
unset($v_day);
60+
unset($v_month);
61+
unset($v_wday);
62+
unset($v_cmd);
63+
unset($output);
64+
}
65+
}
66+
}
67+
exec (VESTA_CMD."v-list-database-types 'json'", $output, $return_var);
68+
$db_types = json_decode(implode('', $output), true);
69+
unset($output);
70+
71+
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/add_cron.html');
72+
unset($_SESSION['error_msg']);
73+
unset($_SESSION['ok_msg']);
74+
//}
75+
76+
// Footer
77+
include($_SERVER['DOCUMENT_ROOT'].'/templates/footer.html');

web/add/db/index.php

Lines changed: 76 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -1,76 +1,76 @@
1-
<?php
2-
// Init
3-
error_reporting(NULL);
4-
ob_start();
5-
session_start();
6-
$TAB = 'DB';
7-
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
8-
9-
// Header
10-
include($_SERVER['DOCUMENT_ROOT'].'/templates/header.html');
11-
12-
// Panel
13-
top_panel($user,$TAB);
14-
15-
// Are you admin?
16-
//if ($_SESSION['user'] == 'admin') {
17-
if (!empty($_POST['ok'])) {
18-
// Check input
19-
if (empty($_POST['v_database'])) $errors[] = 'database';
20-
if (empty($_POST['v_dbuser'])) $errors[] = 'username';
21-
if (empty($_POST['v_password'])) $errors[] = 'password';
22-
if (empty($_POST['v_type'])) $errors[] = 'type';
23-
if (empty($_POST['v_charset'])) $errors[] = 'charset';
24-
25-
// Protect input
26-
$v_database = escapeshellarg($_POST['v_database']);
27-
$v_dbuser = escapeshellarg($_POST['v_dbuser']);
28-
$v_password = escapeshellarg($_POST['v_password']);
29-
$v_type = $_POST['v_type'];
30-
$v_charset = $_POST['v_charset'];
31-
32-
// Check for errors
33-
if (!empty($errors[0])) {
34-
foreach ($errors as $i => $error) {
35-
if ( $i == 0 ) {
36-
$error_msg = $error;
37-
} else {
38-
$error_msg = $error_msg.", ".$error;
39-
}
40-
}
41-
$_SESSION['error_msg'] = "Error: field ".$error_msg." can not be blank.";
42-
} else {
43-
// Add Database
44-
$v_type = escapeshellarg($_POST['v_type']);
45-
$v_charset = escapeshellarg($_POST['v_charset']);
46-
exec (VESTA_CMD."v-add-database ".$user." ".$v_database." ".$v_dbuser." ".$v_password." ".$v_type." 'default' ".$v_charset, $output, $return_var);
47-
$v_type = $_POST['v_type'];
48-
$v_charset = $_POST['v_charset'];
49-
if ($return_var != 0) {
50-
$error = implode('<br>', $output);
51-
if (empty($error)) $error = 'Error: vesta did not return any output.';
52-
$_SESSION['error_msg'] = $error;
53-
unset($v_password);
54-
unset($output);
55-
} else {
56-
$_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.";
57-
unset($v_database);
58-
unset($v_dbuser);
59-
unset($v_password);
60-
unset($v_type);
61-
unset($v_charset);
62-
unset($output);
63-
}
64-
}
65-
}
66-
exec (VESTA_CMD."v-list-database-types 'json'", $output, $return_var);
67-
$db_types = json_decode(implode('', $output), true);
68-
unset($output);
69-
70-
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/add_db.html');
71-
unset($_SESSION['error_msg']);
72-
unset($_SESSION['ok_msg']);
73-
//}
74-
75-
// Footer
76-
include($_SERVER['DOCUMENT_ROOT'].'/templates/footer.html');
1+
<?php
2+
// Init
3+
error_reporting(NULL);
4+
ob_start();
5+
session_start();
6+
$TAB = 'DB';
7+
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
8+
9+
// Header
10+
include($_SERVER['DOCUMENT_ROOT'].'/templates/header.html');
11+
12+
// Panel
13+
top_panel($user,$TAB);
14+
15+
// Are you admin?
16+
//if ($_SESSION['user'] == 'admin') {
17+
if (!empty($_POST['ok'])) {
18+
// Check input
19+
if (empty($_POST['v_database'])) $errors[] = _('database');
20+
if (empty($_POST['v_dbuser'])) $errors[] = _('username');
21+
if (empty($_POST['v_password'])) $errors[] = _('password');
22+
if (empty($_POST['v_type'])) $errors[] = _('type');
23+
if (empty($_POST['v_charset'])) $errors[] = _('charset');
24+
25+
// Protect input
26+
$v_database = escapeshellarg($_POST['v_database']);
27+
$v_dbuser = escapeshellarg($_POST['v_dbuser']);
28+
$v_password = escapeshellarg($_POST['v_password']);
29+
$v_type = $_POST['v_type'];
30+
$v_charset = $_POST['v_charset'];
31+
32+
// Check for errors
33+
if (!empty($errors[0])) {
34+
foreach ($errors as $i => $error) {
35+
if ( $i == 0 ) {
36+
$error_msg = $error;
37+
} else {
38+
$error_msg = $error_msg.", ".$error;
39+
}
40+
}
41+
$_SESSION['error_msg'] = _('Error: field "%s" can not be blank.',$error_msg);
42+
} else {
43+
// Add Database
44+
$v_type = escapeshellarg($_POST['v_type']);
45+
$v_charset = escapeshellarg($_POST['v_charset']);
46+
exec (VESTA_CMD."v-add-database ".$user." ".$v_database." ".$v_dbuser." ".$v_password." ".$v_type." 'default' ".$v_charset, $output, $return_var);
47+
$v_type = $_POST['v_type'];
48+
$v_charset = $_POST['v_charset'];
49+
if ($return_var != 0) {
50+
$error = implode('<br>', $output);
51+
if (empty($error)) $error = _('Error: vesta did not return any output.');
52+
$_SESSION['error_msg'] = $error;
53+
unset($v_password);
54+
unset($output);
55+
} else {
56+
$_SESSION['ok_msg'] = _('DATABASE_CREATED_OK',$user."_".$_POST['v_database'],$user."_".$_POST['v_database']);
57+
unset($v_database);
58+
unset($v_dbuser);
59+
unset($v_password);
60+
unset($v_type);
61+
unset($v_charset);
62+
unset($output);
63+
}
64+
}
65+
}
66+
exec (VESTA_CMD."v-list-database-types 'json'", $output, $return_var);
67+
$db_types = json_decode(implode('', $output), true);
68+
unset($output);
69+
70+
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/add_db.html');
71+
unset($_SESSION['error_msg']);
72+
unset($_SESSION['ok_msg']);
73+
//}
74+
75+
// Footer
76+
include($_SERVER['DOCUMENT_ROOT'].'/templates/footer.html');

0 commit comments

Comments
 (0)