index.php 627 B

1234567891011121314151617181920212223242526
  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-unsuspend-database ".$v_username." ".$v_database, $output, $return_var);
  15. unset($output);
  16. }
  17. }
  18. $back=getenv("HTTP_REFERER");
  19. if (!empty($back)) {
  20. header("Location: ".$back);
  21. exit;
  22. }
  23. header("Location: /list/db/");
  24. exit;