35 lines
951 B
PHP
Raw Normal View History

2012-05-15 15:51:43 +03:00
<?php
// Init
error_reporting(NULL);
session_start();
$TAB = 'DB';
2012-10-01 17:29:49 +03:00
$_SESSION['back'] = $_SERVER['REQUEST_URI'];
2012-05-15 15:51:43 +03:00
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
// Header
include($_SERVER['DOCUMENT_ROOT'].'/templates/header.html');
// Panel
top_panel($user,$TAB);
2013-01-22 03:00:33 +02:00
$lang = 'ru_RU.utf8';
setlocale(LC_ALL, $lang);
2012-05-15 15:51:43 +03:00
// Data
if ($_SESSION['user'] == 'admin') {
exec (VESTA_CMD."v-list-databases $user json", $output, $return_var);
2012-05-15 15:51:43 +03:00
$data = json_decode(implode('', $output), true);
$data = array_reverse($data);
unset($output);
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/list_db.html');
2012-07-01 01:10:56 +03:00
} else {
exec (VESTA_CMD."v-list-databases $user json", $output, $return_var);
2012-07-01 01:10:56 +03:00
$data = json_decode(implode('', $output), true);
$data = array_reverse($data);
unset($output);
include($_SERVER['DOCUMENT_ROOT'].'/templates/user/list_db.html');
2012-05-15 15:51:43 +03:00
}
// Footer
include($_SERVER['DOCUMENT_ROOT'].'/templates/footer.html');