From 97723da633e8064fec2d4b2062a4c58196bd11d8 Mon Sep 17 00:00:00 2001 From: johnnyq Date: Mon, 13 Jan 2025 14:40:05 -0500 Subject: [PATCH] Windows/Tab Titles now reflect the current page your on along with the company name or selected client. Pages contact details, asset details, tickets, projects, documents, invoices, quotes, recurring invoices overide to include more detail in tab title --- client_asset_details.php | 3 +++ client_contact_details.php | 3 +++ client_document_details.php | 3 +++ functions.php | 3 ++- includes/footer.php | 3 +++ includes/inc_all.php | 7 ++----- includes/inc_all_admin.php | 11 +---------- includes/inc_all_client.php | 18 ++++-------------- includes/inc_all_reports.php | 10 +--------- includes/inc_all_user.php | 9 +-------- includes/page_title.php | 32 ++++++++++++++++++++++++++++++++ invoice.php | 4 ++++ project_details.php | 6 ++++-- quote.php | 4 ++++ recurring_invoice.php | 4 ++++ ticket.php | 13 ++++--------- 16 files changed, 75 insertions(+), 58 deletions(-) create mode 100644 includes/page_title.php diff --git a/client_asset_details.php b/client_asset_details.php index e84fef9f..407126c1 100644 --- a/client_asset_details.php +++ b/client_asset_details.php @@ -66,6 +66,9 @@ if (isset($_GET['asset_id'])) { $location_name_display = $location_name; } + // Override Tab Title // No Sanitizing needed as this var will opnly be used in the tab title + $page_title = $row['asset_name']; + // Related Tickets Query $sql_related_tickets = mysqli_query($mysqli, "SELECT * FROM tickets LEFT JOIN users on ticket_assigned_to = user_id diff --git a/client_contact_details.php b/client_contact_details.php index 7efbbb8d..9a77138e 100644 --- a/client_contact_details.php +++ b/client_contact_details.php @@ -34,6 +34,9 @@ if (isset($_GET['contact_id'])) { $auth_method = nullable_htmlentities($row['user_auth_method']); $contact_client_id = intval($row['contact_client_id']); + // Override Tab Title // No Sanitizing needed as this var will opnly be used in the tab title + $page_title = $row['contact_name']; + // Check to see if Contact belongs to client if($contact_client_id !== $client_id) { exit(); diff --git a/client_document_details.php b/client_document_details.php index a6839a81..f44b8e80 100644 --- a/client_document_details.php +++ b/client_document_details.php @@ -37,6 +37,9 @@ $document_folder_id = intval($row['document_folder_id']); $document_parent = intval($row['document_parent']); $document_client_visible = intval($row['document_client_visible']); +// Override Tab Title // No Sanitizing needed as this var will opnly be used in the tab title +$page_title = $row['document_name']; + ?>