index.php 717 B

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