diff --git a/client_overview.php b/client_overview.php index b4fbeda4..b248b79e 100644 --- a/client_overview.php +++ b/client_overview.php @@ -2,6 +2,13 @@ require_once("inc_all_client.php"); +$sql_recent_activities = mysqli_query( + $mysqli, + "SELECT * FROM logs + WHERE log_client_id = $client_id + ORDER BY log_created_at DESC LIMIT 8" +); + $sql_important_contacts = mysqli_query( $mysqli, "SELECT * FROM contacts @@ -10,34 +17,6 @@ $sql_important_contacts = mysqli_query( AND contact_archived_at IS NULL ORDER BY contact_name DESC" ); -/* - * RECENTLY UPDATED ITEMS - */ - -$sql_recent_contacts = mysqli_query( - $mysqli, - "SELECT * FROM contacts - WHERE contact_client_id = $client_id - AND contact_archived_at IS NULL - ORDER BY contact_updated_at, contact_created_at DESC LIMIT 3" -); - -$sql_recent_vendors = mysqli_query( - $mysqli, - "SELECT * FROM vendors - WHERE vendor_client_id = $client_id - AND vendor_template = 0 AND vendor_archived_at IS NULL - ORDER BY vendor_updated_at DESC LIMIT 2" -); - -$sql_recent_documents = mysqli_query( - $mysqli, - "SELECT * FROM documents - WHERE document_client_id = $client_id - AND document_archived_at IS NULL - ORDER BY document_updated_at DESC LIMIT 2" -); - $sql_recent_tickets = mysqli_query( $mysqli, "SELECT * FROM tickets @@ -118,6 +97,45 @@ $sql_asset_retire = mysqli_query( + 0) { ?> + + + +
+ +
+
+
Recent Activities
+
+
+ + + + + + + + + + + + +
+
+
+
+ + + 0) { ?>
@@ -167,66 +185,6 @@ $sql_asset_retire = mysqli_query( - 0 || mysqli_num_rows($sql_recent_vendors) > 0 || mysqli_num_rows($sql_recent_documents) > 0) { ?> -
- -
-
-
Recently Updated
-
-
- - - -

- - -

- - - - -

- - -

- - - - -

- - -

- - -
-
-
- - 0 || mysqli_num_rows($sql_asset_warranties_expiring) > 0 @@ -239,7 +197,7 @@ $sql_asset_retire = mysqli_query(
Upcoming Expirations
-
+
-
+
Stale Tickets (14d)
-
+