mirror of
https://github.com/myvesta/vesta
synced 2025-08-21 13:54:28 -07:00
New, simpler WEB UI
This commit is contained in:
parent
2de99900ce
commit
d352cb9385
439 changed files with 3920 additions and 45184 deletions
28
web/list/backup/index.php
Normal file
28
web/list/backup/index.php
Normal file
|
@ -0,0 +1,28 @@
|
|||
<?php
|
||||
// Init
|
||||
error_reporting(NULL);
|
||||
session_start();
|
||||
$TAB = 'BACKUP';
|
||||
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') {
|
||||
|
||||
exec (VESTA_CMD."v_list_user_backups $user json", $output, $return_var);
|
||||
check_error($return_var);
|
||||
$data = json_decode(implode('', $output), true);
|
||||
$data = array_reverse($data);
|
||||
unset($output);
|
||||
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/menu_backup.html');
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/list_backup.html');
|
||||
}
|
||||
|
||||
// Footer
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/footer.html');
|
28
web/list/cron/index.php
Normal file
28
web/list/cron/index.php
Normal file
|
@ -0,0 +1,28 @@
|
|||
<?php
|
||||
// Init
|
||||
error_reporting(NULL);
|
||||
session_start();
|
||||
$TAB = 'CRON';
|
||||
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') {
|
||||
|
||||
exec (VESTA_CMD."v_list_cron_jobs $user json", $output, $return_var);
|
||||
check_error($return_var);
|
||||
$data = json_decode(implode('', $output), true);
|
||||
$data = array_reverse($data);
|
||||
unset($output);
|
||||
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/menu_cron.html');
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/list_cron.html');
|
||||
}
|
||||
|
||||
// Footer
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/footer.html');
|
28
web/list/db/index.php
Normal file
28
web/list/db/index.php
Normal file
|
@ -0,0 +1,28 @@
|
|||
<?php
|
||||
// Init
|
||||
error_reporting(NULL);
|
||||
session_start();
|
||||
$TAB = 'DB';
|
||||
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') {
|
||||
|
||||
exec (VESTA_CMD."v_list_databases $user json", $output, $return_var);
|
||||
check_error($return_var);
|
||||
$data = json_decode(implode('', $output), true);
|
||||
$data = array_reverse($data);
|
||||
unset($output);
|
||||
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/menu_db.html');
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/list_db.html');
|
||||
}
|
||||
|
||||
// Footer
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/footer.html');
|
38
web/list/dns/index.php
Normal file
38
web/list/dns/index.php
Normal file
|
@ -0,0 +1,38 @@
|
|||
<?php
|
||||
// Init
|
||||
error_reporting(NULL);
|
||||
session_start();
|
||||
$TAB = 'DNS';
|
||||
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 (empty($_GET['domain'])){
|
||||
exec (VESTA_CMD."v_list_dns_domains $user json", $output, $return_var);
|
||||
check_error($return_var);
|
||||
$data = json_decode(implode('', $output), true);
|
||||
$data = array_reverse($data);
|
||||
unset($output);
|
||||
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/menu_dns.html');
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/list_dns.html');
|
||||
} else {
|
||||
exec (VESTA_CMD."v_list_dns_domain_records '".$user."' '".$_GET['domain']."' 'json'", $output, $return_var);
|
||||
check_error($return_var);
|
||||
$data = json_decode(implode('', $output), true);
|
||||
//$data = array_reverse($data);
|
||||
unset($output);
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/menu_dns_rec.html');
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/list_dns_rec.html');
|
||||
}
|
||||
}
|
||||
|
||||
// Footer
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/footer.html');
|
8
web/list/index.php
Normal file
8
web/list/index.php
Normal file
|
@ -0,0 +1,8 @@
|
|||
<?php
|
||||
session_start();
|
||||
if (isset($_SESSION['user'])) {
|
||||
header("Location: /list/user");
|
||||
} else {
|
||||
header("Location: /login/");
|
||||
}
|
||||
?>
|
30
web/list/ip/index.php
Normal file
30
web/list/ip/index.php
Normal file
|
@ -0,0 +1,30 @@
|
|||
<?php
|
||||
// Init
|
||||
//error_reporting(NULL);
|
||||
session_start();
|
||||
$TAB = 'IP';
|
||||
|
||||
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') {
|
||||
|
||||
exec (VESTA_CMD."v_list_sys_ips json", $output, $return_var);
|
||||
check_error($return_var);
|
||||
$data = json_decode(implode('', $output), true);
|
||||
$data = array_reverse($data);
|
||||
unset($output);
|
||||
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/menu_ip.html');
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/list_ip.html');
|
||||
}
|
||||
|
||||
// Footer
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/footer.html');
|
28
web/list/log/index.php
Normal file
28
web/list/log/index.php
Normal file
|
@ -0,0 +1,28 @@
|
|||
<?php
|
||||
// Init
|
||||
error_reporting(NULL);
|
||||
session_start();
|
||||
$TAB = 'LOG';
|
||||
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') {
|
||||
|
||||
exec (VESTA_CMD."v_list_user_log $user json", $output, $return_var);
|
||||
check_error($return_var);
|
||||
$data = json_decode(implode('', $output), true);
|
||||
$data = array_reverse($data);
|
||||
unset($output);
|
||||
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/menu_log.html');
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/list_log.html');
|
||||
}
|
||||
|
||||
// Footer
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/footer.html');
|
38
web/list/mail/index.php
Normal file
38
web/list/mail/index.php
Normal file
|
@ -0,0 +1,38 @@
|
|||
<?php
|
||||
// Init
|
||||
error_reporting(NULL);
|
||||
session_start();
|
||||
$TAB = 'MAIL';
|
||||
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 (empty($_GET['domain'])){
|
||||
exec (VESTA_CMD."v_list_mail_domains $user json", $output, $return_var);
|
||||
check_error($return_var);
|
||||
$data = json_decode(implode('', $output), true);
|
||||
$data = array_reverse($data);
|
||||
unset($output);
|
||||
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/menu_mail.html');
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/list_mail.html');
|
||||
} else {
|
||||
exec (VESTA_CMD."v_list_mail_accounts '".$user."' '".$_GET['domain']."' 'json'", $output, $return_var);
|
||||
check_error($return_var);
|
||||
$data = json_decode(implode('', $output), true);
|
||||
//$data = array_reverse($data);
|
||||
unset($output);
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/menu_mail_acc.html');
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/list_mail_acc.html');
|
||||
}
|
||||
}
|
||||
|
||||
// Footer
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/footer.html');
|
34
web/list/packages/index.php
Normal file
34
web/list/packages/index.php
Normal file
|
@ -0,0 +1,34 @@
|
|||
<?php
|
||||
session_start();
|
||||
|
||||
// Check user
|
||||
if (!isset($_SESSION['user'])) {
|
||||
header("Location: /login/");
|
||||
}
|
||||
|
||||
// Set vairables
|
||||
date_default_timezone_set('UTC');
|
||||
$user = $_SESSION['user'];
|
||||
$vesta_cmd="/usr/bin/sudo /usr/local/vesta/bin/";
|
||||
$TAB = 'PACKAGES';
|
||||
|
||||
// Define functions
|
||||
require_once '../../inc/main.php';
|
||||
|
||||
// Header
|
||||
require_once '../../templates/header.html';
|
||||
|
||||
// Top Menu
|
||||
$command = "$vesta_cmd"."v_list_user '".$_SESSION['user']."' 'json'";
|
||||
exec ($command, $output, $return_var);
|
||||
if ( $return_var > 0 ) {
|
||||
header("Location: /error/");
|
||||
}
|
||||
$panel = json_decode(implode('', $output), true);
|
||||
if ( $_SESSION['user'] == 'admin' ) {
|
||||
require_once '../../templates/admin/panel.html';
|
||||
} else {
|
||||
require_once '../../templates/header.html';
|
||||
}
|
||||
|
||||
require_once '../../templates/footer.html';
|
27
web/list/rrd/index.php
Normal file
27
web/list/rrd/index.php
Normal file
|
@ -0,0 +1,27 @@
|
|||
<?php
|
||||
// Init
|
||||
error_reporting(NULL);
|
||||
session_start();
|
||||
$TAB = 'RRD';
|
||||
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') {
|
||||
|
||||
exec (VESTA_CMD."v_list_sys_rrd json", $output, $return_var);
|
||||
check_error($return_var);
|
||||
$data = json_decode(implode('', $output), true);
|
||||
unset($output);
|
||||
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/menu_rrd.html');
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/list_rrd.html');
|
||||
}
|
||||
|
||||
// Footer
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/footer.html');
|
28
web/list/stats/index.php
Normal file
28
web/list/stats/index.php
Normal file
|
@ -0,0 +1,28 @@
|
|||
<?php
|
||||
// Init
|
||||
error_reporting(NULL);
|
||||
session_start();
|
||||
$TAB = 'STATS';
|
||||
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') {
|
||||
|
||||
exec (VESTA_CMD."v_list_user_stats $user json", $output, $return_var);
|
||||
check_error($return_var);
|
||||
$data = json_decode(implode('', $output), true);
|
||||
$data = array_reverse($data);
|
||||
unset($output);
|
||||
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/menu_stats.html');
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/list_stats.html');
|
||||
}
|
||||
|
||||
// Footer
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/footer.html');
|
27
web/list/user/index.php
Normal file
27
web/list/user/index.php
Normal file
|
@ -0,0 +1,27 @@
|
|||
<?php
|
||||
// Init
|
||||
error_reporting(NULL);
|
||||
session_start();
|
||||
$TAB = 'USER';
|
||||
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') {
|
||||
|
||||
exec (VESTA_CMD."v_list_users json", $output, $return_var);
|
||||
check_error($return_var);
|
||||
$data = json_decode(implode('', $output), true);
|
||||
unset($output);
|
||||
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/menu_user.html');
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/list_user.html');
|
||||
}
|
||||
|
||||
// Footer
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/footer.html');
|
28
web/list/web/index.php
Normal file
28
web/list/web/index.php
Normal file
|
@ -0,0 +1,28 @@
|
|||
<?php
|
||||
// Init
|
||||
error_reporting(NULL);
|
||||
session_start();
|
||||
$TAB = 'WEB';
|
||||
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') {
|
||||
|
||||
exec (VESTA_CMD."v_list_web_domains $user json", $output, $return_var);
|
||||
check_error($return_var);
|
||||
$data = json_decode(implode('', $output), true);
|
||||
$data = array_reverse($data);
|
||||
unset($output);
|
||||
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/menu_web.html');
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/list_web.html');
|
||||
}
|
||||
|
||||
// Footer
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/footer.html');
|
Loading…
Add table
Add a link
Reference in a new issue