index.php 469 B

123456789101112131415161718
  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. $site = quoteshellarg($_GET["site"]);
  8. exec(HESTIA_CMD . "v-dump-site " . $user . " " . $site . " full", $output, $return_var);
  9. if ($return_var == 0) {
  10. header("Content-type: application/zip");
  11. header("Content-Disposition: attachment; filename=" . $output[0]);
  12. header("X-Accel-Redirect: " . $output[1]);
  13. }