index.php 624 B

123456789101112131415161718192021
  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(HESTIA_CMD."v-acknowledge-user-notification ".$user." ".$v_id, $output, $return_var);
  14. check_return_code($return_var, $output);
  15. unset($output);
  16. }
  17. exit;