index.php 664 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. // Init
  3. error_reporting(NULL);
  4. ob_start();
  5. session_start();
  6. include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
  7. if ($_SESSION['user'] == 'admin') {
  8. if (!empty($_GET['user'])) {
  9. $user=$_GET['user'];
  10. }
  11. if (!empty($_GET['database'])) {
  12. $v_username = escapeshellarg($user);
  13. $v_database = escapeshellarg($_GET['database']);
  14. exec (VESTA_CMD."v-suspend-database ".$v_username." ".$v_database, $output, $return_var);
  15. }
  16. check_return_code($return_var,$output);
  17. unset($output);
  18. }
  19. $back = $_SESSION['back'];
  20. if (!empty($back)) {
  21. header("Location: ".$back);
  22. exit;
  23. }
  24. header("Location: /list/db/");
  25. exit;