index.php 631 B

12345678910111213141516171819202122232425
  1. <?php
  2. use function Hestiacp\quoteshellarg\quoteshellarg;
  3. include $_SERVER["DOCUMENT_ROOT"] . "/inc/main.php";
  4. // Check token
  5. verify_csrf($_GET);
  6. if ($_GET["delete"] == 1) {
  7. $v_id = quoteshellarg((int) $_GET["notification_id"]);
  8. exec(HESTIA_CMD . "v-delete-user-notification " . $user . " " . $v_id, $output, $return_var);
  9. check_return_code($return_var, $output);
  10. unset($output);
  11. } else {
  12. $v_id = quoteshellarg((int) $_GET["notification_id"]);
  13. exec(
  14. HESTIA_CMD . "v-acknowledge-user-notification " . $user . " " . $v_id,
  15. $output,
  16. $return_var,
  17. );
  18. check_return_code($return_var, $output);
  19. unset($output);
  20. }
  21. exit();