index.php 710 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. // Init
  3. error_reporting(NULL);
  4. session_start();
  5. $TAB = 'STATS';
  6. include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
  7. // Header
  8. include($_SERVER['DOCUMENT_ROOT'].'/templates/header.html');
  9. // Panel
  10. top_panel($user,$TAB);
  11. // Data
  12. if ($_SESSION['user'] == 'admin') {
  13. exec (VESTA_CMD."v_list_user_stats $user json", $output, $return_var);
  14. check_error($return_var);
  15. $data = json_decode(implode('', $output), true);
  16. $data = array_reverse($data);
  17. unset($output);
  18. include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/menu_stats.html');
  19. include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/list_stats.html');
  20. }
  21. // Footer
  22. include($_SERVER['DOCUMENT_ROOT'].'/templates/footer.html');