index.php 712 B

12345678910111213141516171819202122232425262728293031
  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. // Data
  11. exec (VESTA_CMD."v-list-databases $user json", $output, $return_var);
  12. $data = json_decode(implode('', $output), true);
  13. $data = array_reverse($data, true);
  14. unset($output);
  15. if ($_SESSION['user'] == 'admin') {
  16. include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/list_db.html');
  17. } else {
  18. include($_SERVER['DOCUMENT_ROOT'].'/templates/user/list_db.html');
  19. }
  20. // Back uri
  21. $_SESSION['back'] = $_SERVER['REQUEST_URI'];
  22. // Footer
  23. include($_SERVER['DOCUMENT_ROOT'].'/templates/footer.html');