Skip to content

Commit e734d14

Browse files
committed
user function
1 parent 7bfebff commit e734d14

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+1280
-54
lines changed

bin/v_list_user_ips

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,11 @@ json_list_user_ips() {
4444
done
4545
else
4646
if [ "$OWNER" = 'admin' ] && [ "$STATUS" = 'shared' ]; then
47+
if [ -n "$data" ]; then
48+
echo -e ' },'
49+
fi
4750
i=1
51+
4852
for field in $fields; do
4953
eval value=$field
5054
if [ $i -eq 1 ]; then

func/ip.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ is_ip_valid() {
1313
is_ip_avalable() {
1414
ip_data=$(cat $VESTA/data/ips/$ip)
1515
owner=$(echo "$ip_data"|grep OWNER= | cut -f 2 -d \')
16-
status=$(echo "$ip_data"|grep OWNER= | cut -f 2 -d \')
16+
status=$(echo "$ip_data"|grep STATUS= | cut -f 2 -d \')
1717
shared=no
1818
if [ 'admin' = "$owner" ] && [ "$status" = 'shared' ]; then
1919
shared='yes'

web/add/cron/index.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
top_panel($user,$TAB);
1414

1515
// Are you admin?
16-
if ($_SESSION['user'] == 'admin') {
16+
//if ($_SESSION['user'] == 'admin') {
1717
if (!empty($_POST['ok'])) {
1818
// Check input
1919
if (empty($_POST['v_min'])) $errors[] = 'minute';
@@ -72,7 +72,7 @@
7272
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/add_cron.html');
7373
unset($_SESSION['error_msg']);
7474
unset($_SESSION['ok_msg']);
75-
}
75+
//}
7676

7777
// Footer
7878
include($_SERVER['DOCUMENT_ROOT'].'/templates/footer.html');

web/add/db/index.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
top_panel($user,$TAB);
1414

1515
// Are you admin?
16-
if ($_SESSION['user'] == 'admin') {
16+
//if ($_SESSION['user'] == 'admin') {
1717
if (!empty($_POST['ok'])) {
1818
// Check input
1919
if (empty($_POST['v_database'])) $errors[] = 'database';
@@ -71,7 +71,7 @@
7171
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/add_db.html');
7272
unset($_SESSION['error_msg']);
7373
unset($_SESSION['ok_msg']);
74-
}
74+
//}
7575

7676
// Footer
7777
include($_SERVER['DOCUMENT_ROOT'].'/templates/footer.html');

web/add/dns/index.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
top_panel($user,$TAB);
1414

1515
// Are you admin?
16-
if ($_SESSION['user'] == 'admin') {
16+
//if ($_SESSION['user'] == 'admin') {
1717
if (!empty($_POST['ok'])) {
1818
// Check input
1919
if (empty($_POST['v_domain'])) $errors[] = 'domain';
@@ -132,7 +132,7 @@
132132
unset($_SESSION['error_msg']);
133133
unset($_SESSION['ok_msg']);
134134
}
135-
}
135+
//}
136136

137137
// Footer
138138
include($_SERVER['DOCUMENT_ROOT'].'/templates/footer.html');

web/add/mail/index.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
top_panel($user,$TAB);
1414

1515
// Are you admin?
16-
if ($_SESSION['user'] == 'admin') {
16+
//if ($_SESSION['user'] == 'admin') {
1717
// Mail Domain
1818
if (!empty($_POST['ok'])) {
1919
if (empty($_POST['v_domain'])) $errors[] = 'domain';
@@ -174,7 +174,7 @@
174174
unset($_SESSION['error_msg']);
175175
unset($_SESSION['ok_msg']);
176176
}
177-
}
177+
//}
178178

179179
// Footer
180180
include($_SERVER['DOCUMENT_ROOT'].'/templates/footer.html');

web/add/web/index.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
top_panel($user,$TAB);
1414

1515
// Are you admin?
16-
if ($_SESSION['user'] == 'admin') {
16+
//if ($_SESSION['user'] == 'admin') {
1717
if (!empty($_POST['ok'])) {
1818
// Check input
1919
if (empty($_POST['v_domain'])) $errors[] = 'domain';
@@ -216,7 +216,7 @@
216216
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/add_web.html');
217217
unset($_SESSION['error_msg']);
218218
unset($_SESSION['ok_msg']);
219-
}
219+
//}
220220

221221
// Footer
222222
include($_SERVER['DOCUMENT_ROOT'].'/templates/footer.html');

web/delete/backup/index.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
session_start();
66
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
77

8-
if ($_SESSION['user'] == 'admin') {
8+
//if ($_SESSION['user'] == 'admin') {
99
if (!empty($_GET['backup'])) {
1010
$v_username = escapeshellarg($user);
1111
$v_backup = escapeshellarg($_GET['backup']);
1212
exec (VESTA_CMD."v_delete_user_backup ".$v_username." ".$v_backup, $output, $return_var);
1313
unset($output);
1414
}
15-
}
15+
//}
1616

1717
header("Location: /list/backup/");

web/delete/cron/index.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
session_start();
66
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
77

8-
if ($_SESSION['user'] == 'admin') {
8+
//if ($_SESSION['user'] == 'admin') {
99
if (!empty($_GET['job'])) {
1010
$v_username = escapeshellarg($user);
1111
$v_job = escapeshellarg($_GET['job']);
1212
exec (VESTA_CMD."v_delete_cron_job ".$v_username." ".$v_job, $output, $return_var);
1313
unset($output);
1414
}
15-
}
15+
//}
1616

1717
header("Location: /list/cron/");

web/delete/db/index.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
session_start();
66
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
77

8-
if ($_SESSION['user'] == 'admin') {
8+
//if ($_SESSION['user'] == 'admin') {
99
if (!empty($_GET['database'])) {
1010
$v_username = escapeshellarg($user);
1111
$v_database = escapeshellarg($_GET['database']);
1212
exec (VESTA_CMD."v_delete_database ".$v_username." ".$v_database, $output, $return_var);
1313
unset($output);
1414
}
15-
}
15+
//}
1616

1717
header("Location: /list/db/");

0 commit comments

Comments
 (0)