<?php session_start(); require_once '../db.php'; if (!isset($_POST['id'])) { die('Notification ID not specified'); return; } if (!isset($_SESSION['userId'])) { die('Not logged in'); return; } removeNotification(mongoIdSanitize($_SESSION['userId']), mongoIdSanitize($_POST['id']));
die; } /** * Holds the functions which the server calls asynchronously. */ if (isset($_POST['newHost']) && isset($_SESSION['superadmin'])) { die(addNewHost()); } if (isset($_POST['notificationsRead'])) { setNotificationsAsRead(); } if (isset($_GET['getAllNotifications'])) { die(getNotificationsDataTable()); } if (isset($_POST['removeNotification']) && isset($_POST['notification_id'])) { removeNotification(); } if (isset($_POST['deleteAllNotifications'])) { removeAllNotifications(); } if (isset($_GET['getFailedLogins']) && isset($_SESSION['superadmin'])) { die(getFailedLoginsDataTable()); } if (isset($_GET['getPanelLogs']) && isset($_SESSION['superadmin'])) { die(getPanelLogsDataTable()); } if (isset($_GET['getServerLogs']) && isset($_SESSION['loggedin'])) { die(getServerLogsDataTable()); } if (isset($_POST['newTicketMessage']) && isset($_POST['newMessage'])) { newTicketMessage();
<?php session_start(); require "pdo.php"; $status = removeNotification($_POST['senderID'], $_SESSION['userID'], $_POST['dayslot']); echo $status;