index.php 542 B

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