|
@@ -5,6 +5,12 @@ $TAB = 'PACKAGE';
|
|
|
// Main include
|
|
// Main include
|
|
|
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
|
|
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
|
|
|
|
|
|
|
|
|
|
+// Check user
|
|
|
|
|
+if ($_SESSION['user'] != 'admin') {
|
|
|
|
|
+ header("Location: /list/user");
|
|
|
|
|
+ exit;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
// Header
|
|
// Header
|
|
|
include($_SERVER['DOCUMENT_ROOT'].'/templates/header.html');
|
|
include($_SERVER['DOCUMENT_ROOT'].'/templates/header.html');
|
|
|
|
|
|
|
@@ -12,13 +18,10 @@ include($_SERVER['DOCUMENT_ROOT'].'/templates/header.html');
|
|
|
top_panel($user,$TAB);
|
|
top_panel($user,$TAB);
|
|
|
|
|
|
|
|
// Data
|
|
// Data
|
|
|
-if ($_SESSION['user'] == 'admin') {
|
|
|
|
|
- exec (VESTA_CMD."v-list-user-packages json", $output, $return_var);
|
|
|
|
|
- $data = json_decode(implode('', $output), true);
|
|
|
|
|
- //$data = array_reverse($data, true);
|
|
|
|
|
- unset($output);
|
|
|
|
|
- include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/list_packages.html');
|
|
|
|
|
-}
|
|
|
|
|
|
|
+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');
|
|
|
|
|
|
|
|
// Back uri
|
|
// Back uri
|
|
|
$_SESSION['back'] = $_SERVER['REQUEST_URI'];
|
|
$_SESSION['back'] = $_SERVER['REQUEST_URI'];
|