From ec94071167a0dafc1f74bd2b781ef7431a2a37c0 Mon Sep 17 00:00:00 2001 From: Hugo Sampaio Date: Mon, 6 May 2024 13:25:30 -0300 Subject: [PATCH] num active clients on menu show number of active clients um side menu --- inc_all.php | 4 ++++ side_nav.php | 7 ++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/inc_all.php b/inc_all.php index c1a7e7ea..8a2b8fbf 100644 --- a/inc_all.php +++ b/inc_all.php @@ -12,6 +12,10 @@ require_once "top_nav.php"; // Get Main Side Bar Badge Counts +// Active Clients Count +$row = mysqli_fetch_assoc(mysqli_query($mysqli, "SELECT COUNT('client_id') AS num FROM clients WHERE client_archived_at IS NULL")); +$num_active_clients = $row['num']; + // Active Ticket Count $row = mysqli_fetch_assoc(mysqli_query($mysqli, "SELECT COUNT('ticket_id') AS num FROM tickets WHERE ticket_archived_at IS NULL AND ticket_closed_at IS NULL AND ticket_status != 4")); $num_active_tickets = $row['num']; diff --git a/side_nav.php b/side_nav.php index f9c8dafc..9638e76e 100644 --- a/side_nav.php +++ b/side_nav.php @@ -20,7 +20,12 @@ = 2 && $config_module_enable_ticketing == 1) { ?>