mirror of
https://github.com/itflow-org/itflow
synced 2026-03-13 17:24:51 +00:00
num active clients on menu
show number of active clients um side menu
This commit is contained in:
@@ -12,6 +12,10 @@ require_once "top_nav.php";
|
|||||||
|
|
||||||
// Get Main Side Bar Badge Counts
|
// 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
|
// 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"));
|
$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'];
|
$num_active_tickets = $row['num'];
|
||||||
|
|||||||
@@ -20,7 +20,12 @@
|
|||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a href="clients.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "clients.php") { echo "active"; } ?>">
|
<a href="clients.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "clients.php") { echo "active"; } ?>">
|
||||||
<i class="nav-icon fas fa-user-friends"></i>
|
<i class="nav-icon fas fa-user-friends"></i>
|
||||||
<p>Clients</p>
|
<p>
|
||||||
|
Clients
|
||||||
|
<?php if ($num_active_clients) { ?>
|
||||||
|
<span class="right badge text-light"><?php echo $num_active_clients; ?></span>
|
||||||
|
<?php } ?>
|
||||||
|
</p>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<?php if ($session_user_role >= 2 && $config_module_enable_ticketing == 1) { ?>
|
<?php if ($session_user_role >= 2 && $config_module_enable_ticketing == 1) { ?>
|
||||||
|
|||||||
Reference in New Issue
Block a user