mirror of
https://github.com/myvesta/vesta
synced 2025-08-14 10:37:42 -07:00
Separate scripts from html & New rendering function
This commit is contained in:
parent
656d34ed0b
commit
e16e92278b
84 changed files with 848 additions and 1280 deletions
|
@ -3,22 +3,15 @@ error_reporting(NULL);
|
|||
$TAB = 'BACKUP';
|
||||
|
||||
// Main include
|
||||
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
|
||||
|
||||
// Header
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/header.html');
|
||||
|
||||
// Panel
|
||||
top_panel($user,$TAB);
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/inc/main.php');
|
||||
|
||||
// Data
|
||||
exec (VESTA_CMD."v-list-user-backup-exclusions $user json", $output, $return_var);
|
||||
$data = json_decode(implode('', $output), true);
|
||||
unset($output);
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/list_backup_exclusions.html');
|
||||
|
||||
// Render page
|
||||
render_page($user, $TAB, 'admin/list_backup_exclusions');
|
||||
|
||||
// Back uri
|
||||
$_SESSION['back'] = $_SERVER['REQUEST_URI'];
|
||||
|
||||
// Footer
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/footer.html');
|
||||
|
|
|
@ -3,31 +3,24 @@ error_reporting(NULL);
|
|||
$TAB = 'BACKUP';
|
||||
|
||||
// Main include
|
||||
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/inc/main.php');
|
||||
|
||||
// Header
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/header.html');
|
||||
|
||||
// Panel
|
||||
top_panel($user,$TAB);
|
||||
|
||||
// Data
|
||||
// Data & Render page
|
||||
if (empty($_GET['backup'])){
|
||||
exec (VESTA_CMD."v-list-user-backups $user json", $output, $return_var);
|
||||
$data = json_decode(implode('', $output), true);
|
||||
$data = array_reverse($data,true);
|
||||
unset($output);
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/list_backup.html');
|
||||
|
||||
render_page($user, $TAB, 'admin/list_backup');
|
||||
} else {
|
||||
exec (VESTA_CMD."v-list-user-backup $user '".escapeshellarg($_GET['backup'])."' json", $output, $return_var);
|
||||
exec (VESTA_CMD."v-list-user-backup $user ".escapeshellarg($_GET['backup'])." json", $output, $return_var);
|
||||
$data = json_decode(implode('', $output), true);
|
||||
$data = array_reverse($data,true);
|
||||
unset($output);
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/list_backup_detail.html');
|
||||
|
||||
render_page($user, $TAB, 'admin/list_backup_detail');
|
||||
}
|
||||
|
||||
// Back uri
|
||||
$_SESSION['back'] = $_SERVER['REQUEST_URI'];
|
||||
|
||||
// Footer
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/footer.html');
|
||||
|
|
|
@ -1,16 +1,9 @@
|
|||
<?php
|
||||
error_reporting(NULL);
|
||||
|
||||
$TAB = 'CRON';
|
||||
|
||||
// Main include
|
||||
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
|
||||
|
||||
// Header
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/header.html');
|
||||
|
||||
// Panel
|
||||
top_panel($user,$TAB);
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/inc/main.php');
|
||||
|
||||
// Data
|
||||
exec (VESTA_CMD."v-list-cron-jobs $user json", $output, $return_var);
|
||||
|
@ -18,15 +11,8 @@ $data = json_decode(implode('', $output), true);
|
|||
$data = array_reverse($data,true);
|
||||
unset($output);
|
||||
|
||||
if ($_SESSION['user'] == 'admin') {
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/list_cron.html');
|
||||
} else {
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/user/list_cron.html');
|
||||
}
|
||||
// Render page
|
||||
render_page($user, $TAB, '*/list_cron');
|
||||
|
||||
// Back uri
|
||||
$_SESSION['back'] = $_SERVER['REQUEST_URI'];
|
||||
|
||||
// Footer
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/footer.html');
|
||||
|
||||
|
|
|
@ -5,27 +5,14 @@ $TAB = 'DB';
|
|||
// Main include
|
||||
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
|
||||
|
||||
// Header
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/header.html');
|
||||
|
||||
// Panel
|
||||
top_panel($user,$TAB);
|
||||
|
||||
// Data
|
||||
exec (VESTA_CMD."v-list-databases $user json", $output, $return_var);
|
||||
$data = json_decode(implode('', $output), true);
|
||||
$data = array_reverse($data, true);
|
||||
unset($output);
|
||||
|
||||
if ($_SESSION['user'] == 'admin') {
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/list_db.html');
|
||||
} else {
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/user/list_db.html');
|
||||
}
|
||||
// Render page
|
||||
render_page($user, $TAB, '*/list_db');
|
||||
|
||||
// Back uri
|
||||
$_SESSION['back'] = $_SERVER['REQUEST_URI'];
|
||||
|
||||
// Footer
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/footer.html');
|
||||
|
||||
|
|
|
@ -1,42 +1,26 @@
|
|||
<?php
|
||||
error_reporting(NULL);
|
||||
|
||||
$TAB = 'DNS';
|
||||
|
||||
// Main include
|
||||
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
|
||||
|
||||
// Header
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/header.html');
|
||||
|
||||
// Panel
|
||||
top_panel($user,$TAB);
|
||||
|
||||
// Data
|
||||
// Data & Render page
|
||||
if (empty($_GET['domain'])){
|
||||
exec (VESTA_CMD."v-list-dns-domains $user json", $output, $return_var);
|
||||
$data = json_decode(implode('', $output), true);
|
||||
$data = array_reverse($data, true);
|
||||
unset($output);
|
||||
if ($_SESSION['user'] == 'admin') {
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/list_dns.html');
|
||||
} else {
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/user/list_dns.html');
|
||||
}
|
||||
|
||||
render_page($user, $TAB, '*/list_dns');
|
||||
} else {
|
||||
exec (VESTA_CMD."v-list-dns-records '".$user."' '".escapeshellarg($_GET['domain'])."' 'json'", $output, $return_var);
|
||||
$data = json_decode(implode('', $output), true);
|
||||
$data = array_reverse($data, true);
|
||||
unset($output);
|
||||
if ($_SESSION['user'] == 'admin') {
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/list_dns_rec.html');
|
||||
} else {
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/user/list_dns_rec.html');
|
||||
}
|
||||
|
||||
render_page($user, $TAB, '*/list_dns_rec');
|
||||
}
|
||||
|
||||
// Back uri
|
||||
$_SESSION['back'] = $_SERVER['REQUEST_URI'];
|
||||
|
||||
// Footer
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/footer.html');
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<?php
|
||||
error_reporting(NULL);
|
||||
|
||||
$TAB = 'FIREWALL';
|
||||
|
||||
// Main include
|
||||
|
@ -12,22 +11,14 @@ if ($_SESSION['user'] != 'admin') {
|
|||
exit;
|
||||
}
|
||||
|
||||
// Header
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/header.html');
|
||||
|
||||
// Panel
|
||||
top_panel($user,$TAB);
|
||||
|
||||
// Data
|
||||
exec (VESTA_CMD."v-list-firewall-ban json", $output, $return_var);
|
||||
$data = json_decode(implode('', $output), true);
|
||||
$data = array_reverse($data, true);
|
||||
unset($output);
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/list_firewall_banlist.html');
|
||||
|
||||
// Render page
|
||||
render_page($user, $TAB, 'admin/list_firewall_banlist');
|
||||
|
||||
// Back uri
|
||||
$_SESSION['back'] = $_SERVER['REQUEST_URI'];
|
||||
|
||||
// Footer
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/footer.html');
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<?php
|
||||
error_reporting(NULL);
|
||||
|
||||
$TAB = 'FIREWALL';
|
||||
|
||||
// Main include
|
||||
|
@ -12,22 +11,14 @@ if ($_SESSION['user'] != 'admin') {
|
|||
exit;
|
||||
}
|
||||
|
||||
// Header
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/header.html');
|
||||
|
||||
// Panel
|
||||
top_panel($user,$TAB);
|
||||
|
||||
// Data
|
||||
exec (VESTA_CMD."v-list-firewall json", $output, $return_var);
|
||||
$data = json_decode(implode('', $output), true);
|
||||
$data = array_reverse($data, true);
|
||||
unset($output);
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/list_firewall.html');
|
||||
|
||||
// Render page
|
||||
render_page($user, $TAB, 'admin/list_firewall');
|
||||
|
||||
// Back uri
|
||||
$_SESSION['back'] = $_SERVER['REQUEST_URI'];
|
||||
|
||||
// Footer
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/footer.html');
|
||||
|
||||
|
|
|
@ -1,27 +1,25 @@
|
|||
<?php
|
||||
error_reporting(NULL);
|
||||
|
||||
$TAB = 'IP';
|
||||
|
||||
// Main include
|
||||
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
|
||||
|
||||
// Header
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/header.html');
|
||||
|
||||
// Panel
|
||||
top_panel($user,$TAB);
|
||||
// Check user
|
||||
if ($_SESSION['user'] != 'admin') {
|
||||
header('Location: /list/user');
|
||||
exit;
|
||||
}
|
||||
|
||||
// Data
|
||||
if ($_SESSION['user'] == 'admin') {
|
||||
exec (VESTA_CMD."v-list-sys-ips json", $output, $return_var);
|
||||
$data = json_decode(implode('', $output), true);
|
||||
$data = array_reverse($data, true);
|
||||
unset($output);
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/list_ip.html');
|
||||
}
|
||||
exec (VESTA_CMD."v-list-sys-ips json", $output, $return_var);
|
||||
$data = json_decode(implode('', $output), true);
|
||||
$data = array_reverse($data, true);
|
||||
unset($output);
|
||||
|
||||
// Render page
|
||||
render_page($user, $TAB, 'admin/list_ip');
|
||||
|
||||
// Back uri
|
||||
$_SESSION['back'] = $_SERVER['REQUEST_URI'];
|
||||
|
||||
// Footer
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/footer.html');
|
||||
|
|
|
@ -1,15 +1,10 @@
|
|||
<?php
|
||||
// Init
|
||||
error_reporting(NULL);
|
||||
$TAB = 'LOG';
|
||||
|
||||
// Main include
|
||||
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
|
||||
|
||||
// Header
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/header.html');
|
||||
|
||||
// Panel
|
||||
top_panel($user,$TAB);
|
||||
|
||||
// Data
|
||||
exec (VESTA_CMD."v-list-user-log $user json", $output, $return_var);
|
||||
check_error($return_var);
|
||||
|
@ -17,7 +12,5 @@ $data = json_decode(implode('', $output), true);
|
|||
$data = array_reverse($data);
|
||||
unset($output);
|
||||
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/list_log.html');
|
||||
|
||||
// Footer
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/footer.html');
|
||||
// Render page
|
||||
render_page($user, $TAB, 'admin/list_log');
|
||||
|
|
|
@ -1,42 +1,26 @@
|
|||
<?php
|
||||
error_reporting(NULL);
|
||||
|
||||
$TAB = 'MAIL';
|
||||
|
||||
// Main include
|
||||
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
|
||||
|
||||
// Header
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/header.html');
|
||||
|
||||
// Panel
|
||||
top_panel($user,$TAB);
|
||||
|
||||
// Data
|
||||
// Data & Render page
|
||||
if (empty($_GET['domain'])){
|
||||
exec (VESTA_CMD."v-list-mail-domains $user json", $output, $return_var);
|
||||
$data = json_decode(implode('', $output), true);
|
||||
$data = array_reverse($data, true);
|
||||
unset($output);
|
||||
if ($_SESSION['user'] == 'admin') {
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/list_mail.html');
|
||||
} else {
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/user/list_mail.html');
|
||||
}
|
||||
|
||||
render_page($user, $TAB, '*/list_mail');
|
||||
} else {
|
||||
exec (VESTA_CMD."v-list-mail-accounts '".$user."' '".escapeshellarg($_GET['domain'])."' json", $output, $return_var);
|
||||
$data = json_decode(implode('', $output), true);
|
||||
$data = array_reverse($data, true);
|
||||
unset($output);
|
||||
if ($_SESSION['user'] == 'admin') {
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/list_mail_acc.html');
|
||||
} else {
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/user/list_mail_acc.html');
|
||||
}
|
||||
|
||||
render_page($user, $TAB, '*/list_mail_acc');
|
||||
}
|
||||
|
||||
// Back uri
|
||||
$_SESSION['back'] = $_SERVER['REQUEST_URI'];
|
||||
|
||||
// Footer
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/footer.html');
|
||||
|
|
|
@ -15,30 +15,20 @@ if($_REQUEST['ajax'] == 1){
|
|||
$data[$key] = $note;
|
||||
}
|
||||
echo json_encode($data);
|
||||
exit();
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
|
||||
$TAB = 'NOTIFICATIONS';
|
||||
// Header
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/header.html');
|
||||
|
||||
// Panel
|
||||
top_panel($user,$TAB);
|
||||
|
||||
// Data
|
||||
exec (VESTA_CMD."v-list-user-notifications $user json", $output, $return_var);
|
||||
$data = json_decode(implode('', $output), true);
|
||||
$data = array_reverse($data,true);
|
||||
if ($_SESSION['user'] == 'admin') {
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/list_notifications.html');
|
||||
} else {
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/user/list_notifications.html');
|
||||
}
|
||||
|
||||
// Render page
|
||||
render_page($url, $TAB, '*/list_notifications');
|
||||
|
||||
// Back uri
|
||||
$_SESSION['back'] = $_SERVER['REQUEST_URI'];
|
||||
|
||||
// Footer
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/footer.html');
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
<?php
|
||||
error_reporting(NULL);
|
||||
|
||||
$TAB = 'PACKAGE';
|
||||
|
||||
// Main include
|
||||
|
@ -11,20 +12,13 @@ if ($_SESSION['user'] != 'admin') {
|
|||
exit;
|
||||
}
|
||||
|
||||
// Header
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/header.html');
|
||||
|
||||
// Panel
|
||||
top_panel($user,$TAB);
|
||||
|
||||
// Data
|
||||
exec (VESTA_CMD."v-list-user-packages json", $output, $return_var);
|
||||
$data = json_decode(implode('', $output), true);
|
||||
unset($output);
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/list_packages.html');
|
||||
|
||||
// Render page
|
||||
render_page($user, $TAB, 'admin/list_packages');
|
||||
|
||||
// Back uri
|
||||
$_SESSION['back'] = $_SERVER['REQUEST_URI'];
|
||||
|
||||
// Footer
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/footer.html');
|
||||
|
|
|
@ -5,22 +5,19 @@ $TAB = 'RRD';
|
|||
// Main include
|
||||
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
|
||||
|
||||
// Header
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/header.html');
|
||||
|
||||
// Panel
|
||||
top_panel($user,$TAB);
|
||||
// Check user
|
||||
if ($_SESSION['user'] != 'admin') {
|
||||
header('Location: /list/user');
|
||||
exit;
|
||||
}
|
||||
|
||||
// Data
|
||||
if ($_SESSION['user'] == 'admin') {
|
||||
exec (VESTA_CMD."v-list-sys-rrd json", $output, $return_var);
|
||||
$data = json_decode(implode('', $output), true);
|
||||
unset($output);
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/list_rrd.html');
|
||||
}
|
||||
exec (VESTA_CMD."v-list-sys-rrd json", $output, $return_var);
|
||||
$data = json_decode(implode('', $output), true);
|
||||
unset($output);
|
||||
|
||||
// Render page
|
||||
render_page($user, $TAB, 'admin/list_rrd');
|
||||
|
||||
// Back uri
|
||||
$_SESSION['back'] = $_SERVER['REQUEST_URI'];
|
||||
|
||||
// Footer
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/footer.html');
|
||||
|
|
|
@ -112,13 +112,6 @@ if (isset($_GET['db'])) {
|
|||
exit();
|
||||
}
|
||||
|
||||
|
||||
// Header
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/header.html');
|
||||
|
||||
// Panel
|
||||
top_panel($user,$TAB);
|
||||
|
||||
// Data
|
||||
exec (VESTA_CMD."v-list-sys-info json", $output, $return_var);
|
||||
$sys = json_decode(implode('', $output), true);
|
||||
|
@ -126,10 +119,9 @@ unset($output);
|
|||
exec (VESTA_CMD."v-list-sys-services json", $output, $return_var);
|
||||
$data = json_decode(implode('', $output), true);
|
||||
unset($output);
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/list_services.html');
|
||||
|
||||
// Render page
|
||||
render_page($user, $TAB, 'admin/list_services');
|
||||
|
||||
// Back uri
|
||||
$_SESSION['back'] = $_SERVER['REQUEST_URI'];
|
||||
|
||||
// Footer
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/footer.html');
|
||||
|
|
|
@ -5,13 +5,7 @@ $TAB = 'STATS';
|
|||
// Main include
|
||||
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
|
||||
|
||||
// Header
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/header.html');
|
||||
|
||||
// Panel
|
||||
top_panel($user,$TAB);
|
||||
|
||||
// Data
|
||||
// Data & Render page
|
||||
if ($user == 'admin') {
|
||||
if (empty($_GET['user'])) {
|
||||
exec (VESTA_CMD."v-list-users-stats json", $output, $return_var);
|
||||
|
@ -30,17 +24,15 @@ if ($user == 'admin') {
|
|||
$users = json_decode(implode('', $output), true);
|
||||
unset($output);
|
||||
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/list_stats.html');
|
||||
render_page($user, $TAB, 'admin/list_stats');
|
||||
} else {
|
||||
exec (VESTA_CMD."v-list-user-stats $user json", $output, $return_var);
|
||||
$data = json_decode(implode('', $output), true);
|
||||
$data = array_reverse($data, true);
|
||||
unset($output);
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/user/list_stats.html');
|
||||
|
||||
render_page($user, $TAB, 'user/list_stats');
|
||||
}
|
||||
|
||||
// Back uri
|
||||
$_SESSION['back'] = $_SERVER['REQUEST_URI'];
|
||||
|
||||
// Footer
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/footer.html');
|
||||
|
|
|
@ -5,26 +5,22 @@ $TAB = 'UPDATES';
|
|||
// Main include
|
||||
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
|
||||
|
||||
// Header
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/header.html');
|
||||
|
||||
// Panel
|
||||
top_panel($user,$TAB);
|
||||
// Check user
|
||||
if ($_SESSION['user'] != 'admin') {
|
||||
header('Location: /list/user');
|
||||
exit;
|
||||
}
|
||||
|
||||
// Data
|
||||
if ($_SESSION['user'] == 'admin') {
|
||||
exec (VESTA_CMD."v-list-sys-vesta-updates json", $output, $return_var);
|
||||
$data = json_decode(implode('', $output), true);
|
||||
unset($output);
|
||||
exec (VESTA_CMD."v-list-sys-vesta-autoupdate plain", $output, $return_var);
|
||||
$autoupdate = $output['0'];
|
||||
unset($output);
|
||||
exec (VESTA_CMD."v-list-sys-vesta-updates json", $output, $return_var);
|
||||
$data = json_decode(implode('', $output), true);
|
||||
unset($output);
|
||||
exec (VESTA_CMD."v-list-sys-vesta-autoupdate plain", $output, $return_var);
|
||||
$autoupdate = $output['0'];
|
||||
unset($output);
|
||||
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/list_updates.html');
|
||||
}
|
||||
// Render page
|
||||
render_page($user, $TAB, 'admin/list_updates');
|
||||
|
||||
// Back uri
|
||||
$_SESSION['back'] = $_SERVER['REQUEST_URI'];
|
||||
|
||||
// Footer
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/footer.html');
|
||||
|
|
|
@ -1,37 +1,22 @@
|
|||
<?php
|
||||
error_reporting(NULL);
|
||||
session_start();
|
||||
$TAB = 'USER';
|
||||
|
||||
// Main include
|
||||
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
|
||||
|
||||
// Header
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/header.html');
|
||||
|
||||
// Panel
|
||||
top_panel($user,$TAB);
|
||||
|
||||
// Data
|
||||
if ($_SESSION['user'] == 'admin') {
|
||||
if ($user == 'admin') {
|
||||
exec (VESTA_CMD . "v-list-users json", $output, $return_var);
|
||||
} else {
|
||||
exec (VESTA_CMD . "v-list-user ".$user." json", $output, $return_var);
|
||||
}
|
||||
$data = json_decode(implode('', $output), true);
|
||||
$data = array_reverse($data,true);
|
||||
display_error_block();
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/list_user.html');
|
||||
if ($user == 'admin') {
|
||||
exec (VESTA_CMD . "v-list-users json", $output, $return_var);
|
||||
} else {
|
||||
exec (VESTA_CMD . "v-list-user ".$user." json", $output, $return_var);
|
||||
$data = json_decode(implode('', $output), true);
|
||||
display_error_block();
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/user/list_user.html');
|
||||
}
|
||||
$data = json_decode(implode('', $output), true);
|
||||
$data = array_reverse($data,true);
|
||||
display_error_block();
|
||||
|
||||
// Render page
|
||||
render_page($user, $TAB, '*/list_user');
|
||||
|
||||
// Back uri
|
||||
$_SESSION['back'] = $_SERVER['REQUEST_URI'];
|
||||
|
||||
// Footer
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/footer.html');
|
||||
|
|
|
@ -5,24 +5,13 @@ $TAB = 'WEB';
|
|||
// Main include
|
||||
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
|
||||
|
||||
// Header
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/header.html');
|
||||
|
||||
// Panel
|
||||
top_panel($user,$TAB);
|
||||
|
||||
// Data
|
||||
exec (VESTA_CMD."v-list-web-domains $user json", $output, $return_var);
|
||||
$data = json_decode(implode('', $output), true);
|
||||
$data = array_reverse($data,true);
|
||||
if ($_SESSION['user'] == 'admin') {
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/list_web.html');
|
||||
} else {
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/user/list_web.html');
|
||||
}
|
||||
|
||||
// Render page
|
||||
render_page($user, $TAB, '*/list_web');
|
||||
|
||||
// Back uri
|
||||
$_SESSION['back'] = $_SERVER['REQUEST_URI'];
|
||||
|
||||
// Footer
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/footer.html');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue