index.php 849 B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. session_start();
  3. $TAB = 'DB';
  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. // SYS
  11. exec (VESTA_CMD."v-list-sys-config json", $output, $return_var);
  12. $sys = json_decode(implode('', $output), true);
  13. unset($output);
  14. // Data
  15. exec (VESTA_CMD."v-list-databases $user json", $output, $return_var);
  16. $data = json_decode(implode('', $output), true);
  17. $data = array_reverse($data, true);
  18. unset($output);
  19. if ($_SESSION['user'] == 'admin') {
  20. include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/list_db.html');
  21. } else {
  22. include($_SERVER['DOCUMENT_ROOT'].'/templates/user/list_db.html');
  23. }
  24. // Back uri
  25. $_SESSION['back'] = $_SERVER['REQUEST_URI'];
  26. // Footer
  27. include($_SERVER['DOCUMENT_ROOT'].'/templates/footer.html');