index.php 782 B

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