index.php 706 B

1234567891011121314151617181920212223242526272829303132333435363738
  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. $snapshot = quoteshellarg($_GET["snapshot"]);
  8. if (empty($_GET["object"])) {
  9. $_GET["object"] = "";
  10. }
  11. if (empty($_GET["type"])) {
  12. exec(
  13. HESTIA_CMD . "v-schedule-user-restore-restic " . $user . " " . $snapshot,
  14. $output,
  15. $return_var,
  16. );
  17. } else {
  18. exec(
  19. HESTIA_CMD .
  20. "v-schedule-user-restore-restic " .
  21. $user .
  22. " " .
  23. $snapshot .
  24. " " .
  25. quoteshellarg($_GET["type"]) .
  26. " " .
  27. quoteshellarg($_GET["object"]),
  28. $output,
  29. $return_var,
  30. );
  31. }
  32. header("Location: /list/backup/incremental/?snapshot=" . $_GET["snapshot"]);