index.php 638 B

123456789101112131415161718192021222324252627
  1. <?php
  2. session_start();
  3. $TAB = 'IP';
  4. // Main include
  5. include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
  6. // Header
  7. include($_SERVER['DOCUMENT_ROOT'].'/templates/header.html');
  8. // Panel
  9. top_panel($user,$TAB);
  10. // Data
  11. if ($_SESSION['user'] == 'admin') {
  12. exec (VESTA_CMD."v-list-sys-ips json", $output, $return_var);
  13. $data = json_decode(implode('', $output), true);
  14. $data = array_reverse($data, true);
  15. unset($output);
  16. include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/list_ip.html');
  17. }
  18. // Back uri
  19. $_SESSION['back'] = $_SERVER['REQUEST_URI'];
  20. // Footer
  21. include($_SERVER['DOCUMENT_ROOT'].'/templates/footer.html');