index.php 511 B

1234567891011121314151617181920212223
  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['job'])) {
  8. $v_job = quoteshellarg($_GET['job']);
  9. exec(HESTIA_CMD."v-suspend-cron-job ".$user." ".$v_job, $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/cron/");
  19. exit;