Dedup Notications code and move to a modal instead of a drop menu

This commit is contained in:
johnnyq
2025-02-08 19:54:49 -05:00
parent 4ed0767f1c
commit a69b60703b
5 changed files with 82 additions and 74 deletions

View File

@@ -103,11 +103,9 @@ try {
$access_permission_query = ""; // Ensure safe default if query fails
}
// Include the settings vars
require_once "get_settings.php";
//Detects if using an Apple device and uses Apple Maps instead of google
$iPod = stripos($_SERVER['HTTP_USER_AGENT'], "iPod");
$iPhone = stripos($_SERVER['HTTP_USER_AGENT'], "iPhone");
@@ -119,12 +117,5 @@ if ($iPod || $iPhone || $iPad) {
$session_map_source = "google";
}
// Check if mobile device
$session_mobile = isMobile();
// Get Notification Count for the badge on the top nav
$row = mysqli_fetch_assoc(mysqli_query($mysqli, "SELECT COUNT('notification_id') AS num FROM notifications WHERE (notification_user_id = $session_user_id OR notification_user_id = 0) AND notification_dismissed_at IS NULL"));
$num_notifications = $row['num'];