index.php 659 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. use function Hestiacp\quoteshellarg\quoteshellarg;
  3. ob_start();
  4. include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
  5. if (($_SESSION['userContext'] === 'admin') && (!empty($_GET['user']))) {
  6. $user=quoteshellarg($_GET['user']);
  7. }
  8. // Check token
  9. verify_csrf($_GET);
  10. if (!empty($_GET['job'])) {
  11. $v_username = quoteshellarg($user);
  12. $v_job = quoteshellarg($_GET['job']);
  13. exec(HESTIA_CMD."v-delete-cron-job ".$user." ".$v_job, $output, $return_var);
  14. }
  15. check_return_code($return_var, $output);
  16. unset($output);
  17. $back = $_SESSION['back'];
  18. if (!empty($back)) {
  19. header("Location: ".$back);
  20. exit;
  21. }
  22. header("Location: /list/cron/");
  23. exit;