index.php 669 B

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