From 261eb50b642ad4a917e7a5dbce18434dbd59bbf3 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 19 Apr 2019 16:12:59 -0400 Subject: [PATCH] Get Badge count for alerts on top nav --- check_login.php | 5 +++++ top_nav.php | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/check_login.php b/check_login.php index 0ad39913..96c0b85f 100644 --- a/check_login.php +++ b/check_login.php @@ -26,4 +26,9 @@ $session_map_source = "google"; } + //Get unAcked Alert Count for the badge on the top nav + + $row = mysqli_fetch_assoc(mysqli_query($mysqli,"SELECT COUNT('alert_id') AS num FROM alerts WHERE alert_ack_date = 0")); + $num_alerts = $row['num']; + ?> \ No newline at end of file diff --git a/top_nav.php b/top_nav.php index 112e368b..e2a6e596 100644 --- a/top_nav.php +++ b/top_nav.php @@ -23,7 +23,7 @@