Files
VestaCP/web/list/user/index.php

35 lines
990 B
PHP
Raw Normal View History

2012-05-15 15:51:43 +03:00
<?php
2012-05-15 15:51:43 +03:00
// Init
error_reporting(NULL);
session_start();
2012-10-01 17:29:49 +03:00
$_SESSION['back'] = $_SERVER['REQUEST_URI'];
2012-05-15 15:51:43 +03:00
$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') {
$cmd = "v-list-user '".$user."' json";
if ($user == 'admin') $cmd = "v-list-users json";
exec (VESTA_CMD.$cmd, $output, $return_var);
2012-05-15 15:51:43 +03:00
$data = json_decode(implode('', $output), true);
2012-06-12 12:55:54 +03:00
$data = array_reverse($data);
display_error_block;
2012-05-15 15:51:43 +03:00
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/list_user.html');
2012-06-30 23:33:40 +03:00
} else {
exec (VESTA_CMD."v-list-user ".$user." json", $output, $return_var);
2012-06-30 23:33:40 +03:00
$data = json_decode(implode('', $output), true);
$data = array_reverse($data);
display_error_block;
2012-06-30 23:33:40 +03:00
include($_SERVER['DOCUMENT_ROOT'].'/templates/user/list_user.html');
2012-05-15 15:51:43 +03:00
}
// Footer
include($_SERVER['DOCUMENT_ROOT'].'/templates/footer.html');