index.php 527 B

123456789101112131415161718192021222324
  1. <?php
  2. use function Hestiacp\quoteshellarg\quoteshellarg;
  3. ob_start();
  4. include $_SERVER["DOCUMENT_ROOT"] . "/inc/main.php";
  5. // Check token
  6. verify_csrf($_GET);
  7. if (!empty($_GET["database"])) {
  8. $v_database = quoteshellarg($_GET["database"]);
  9. exec(HESTIA_CMD . "v-suspend-database " . $user . " " . $v_database, $output, $return_var);
  10. check_return_code($return_var, $output);
  11. unset($output);
  12. }
  13. $back = $_SESSION["back"];
  14. if (!empty($back)) {
  15. header("Location: " . $back);
  16. exit();
  17. }
  18. header("Location: /list/db/");
  19. exit();