Show number of shared links on the client side nav

This commit is contained in:
johnnyq 2023-01-26 17:29:47 -05:00
parent e9270016f3
commit 45f2236770
2 changed files with 10 additions and 1 deletions

View File

@ -310,7 +310,13 @@
<li class="nav-item">
<a href="client_shared_items.php?client_id=<?php echo $client_id; ?>" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "client_shared_items.php") { echo "active"; } ?>">
<i class="nav-icon fas fa-share"></i>
<p>Shared Links</p>
<p>
Shared Links
<?php
if ($num_shared_links > 0) { ?>
<span class="right badge badge-light"><?php echo $num_shared_links; ?></span>
<?php } ?>
</p>
</a>
</li>

View File

@ -183,6 +183,9 @@ if (isset($_GET['client_id'])) {
$row = mysqli_fetch_assoc(mysqli_query($mysqli,"SELECT COUNT('trip_id') AS num FROM trips WHERE trip_archived_at IS NULL AND trip_client_id = $client_id"));
$num_trips = $row['num'];
$row = mysqli_fetch_assoc(mysqli_query($mysqli,"SELECT COUNT('item_id') AS num FROM shared_items WHERE item_client_id = $client_id"));
$num_shared_links = $row['num'];
// Expiring Items
// Count Domains Expiring within 30 Days