mirror of
https://github.com/itflow-org/itflow
synced 2026-02-28 02:44:53 +00:00
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
This commit is contained in:
@@ -13,6 +13,9 @@ if (str_contains(basename($_SERVER["PHP_SELF"]), "admin_")) { ?>
|
||||
</div> <!-- /.content-wrapper -->
|
||||
</div> <!-- ./wrapper -->
|
||||
|
||||
<!-- Set the browser window title to the clients name -->
|
||||
<script>document.title = "<?php echo "$tab_title - $page_title"; ?>"</script>
|
||||
|
||||
<!-- REQUIRED SCRIPTS -->
|
||||
|
||||
<!-- Bootstrap 4 -->
|
||||
|
||||
@@ -1,13 +1,10 @@
|
||||
<?php
|
||||
|
||||
require_once "config.php";
|
||||
|
||||
include_once "functions.php";
|
||||
|
||||
require_once "functions.php";
|
||||
require_once "check_login.php";
|
||||
|
||||
require_once "page_title.php";
|
||||
require_once "header.php";
|
||||
|
||||
require_once "top_nav.php";
|
||||
|
||||
// Get Main Side Bar Badge Counts
|
||||
|
||||
@@ -1,25 +1,16 @@
|
||||
<?php
|
||||
|
||||
require_once "config.php";
|
||||
|
||||
require_once "functions.php";
|
||||
|
||||
require_once "check_login.php";
|
||||
|
||||
require_once "page_title.php";
|
||||
if (!isset($session_is_admin) || !$session_is_admin) {
|
||||
exit(WORDING_ROLECHECK_FAILED . "<br>Tell your admin: Your role does not have admin access.");
|
||||
}
|
||||
|
||||
require_once "header.php";
|
||||
|
||||
require_once "top_nav.php";
|
||||
|
||||
require_once "admin_side_nav.php";
|
||||
|
||||
require_once "inc_wrapper.php";
|
||||
|
||||
require_once "inc_alert_feedback.php";
|
||||
|
||||
require_once "filter_header.php";
|
||||
|
||||
require_once "app_version.php";
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
<?php
|
||||
|
||||
require_once "config.php";
|
||||
|
||||
require_once "functions.php";
|
||||
|
||||
require_once "check_login.php";
|
||||
require_once "page_title.php";
|
||||
|
||||
// Perms
|
||||
enforceUserPermission('module_client');
|
||||
@@ -43,7 +42,6 @@ if (isset($_GET['client_id'])) {
|
||||
|
||||
$row = mysqli_fetch_array($sql);
|
||||
$client_name = nullable_htmlentities($row['client_name']);
|
||||
$client_name_title = $row['client_name'];
|
||||
$client_is_lead = intval($row['client_lead']);
|
||||
$client_type = nullable_htmlentities($row['client_type']);
|
||||
$client_website = nullable_htmlentities($row['client_website']);
|
||||
@@ -77,6 +75,9 @@ if (isset($_GET['client_id'])) {
|
||||
$location_phone = formatPhoneNumber($row['location_phone']);
|
||||
$location_primary = intval($row['location_primary']);
|
||||
|
||||
// Tab Title // No Sanitizing needed
|
||||
$tab_title = $row['client_name'];
|
||||
|
||||
// Client Tags
|
||||
|
||||
$client_tag_name_display_array = array();
|
||||
@@ -294,20 +295,9 @@ if (isset($_GET['client_id'])) {
|
||||
}
|
||||
|
||||
require_once "header.php";
|
||||
|
||||
require_once "top_nav.php";
|
||||
|
||||
require_once "client_side_nav.php";
|
||||
|
||||
require_once "inc_wrapper.php";
|
||||
|
||||
require_once "inc_alert_feedback.php";
|
||||
|
||||
require_once "inc_client_top_head.php";
|
||||
|
||||
require_once "filter_header.php";
|
||||
|
||||
?>
|
||||
|
||||
<!-- Set the browser window title to the clients name -->
|
||||
<script>document.title = "<?php echo $client_name_title; ?>"</script>
|
||||
|
||||
@@ -1,24 +1,16 @@
|
||||
<?php
|
||||
|
||||
require_once "config.php";
|
||||
|
||||
require_once "functions.php";
|
||||
|
||||
require_once "check_login.php";
|
||||
|
||||
require_once "page_title.php";
|
||||
// Reporting Perms
|
||||
enforceUserPermission('module_reporting');
|
||||
|
||||
require_once "header.php";
|
||||
|
||||
require_once "top_nav.php";
|
||||
|
||||
require_once "reports_side_nav.php";
|
||||
|
||||
require_once "inc_wrapper.php";
|
||||
|
||||
require_once "inc_alert_feedback.php";
|
||||
|
||||
require_once "filter_header.php";
|
||||
|
||||
// Set variable default values
|
||||
|
||||
@@ -1,19 +1,12 @@
|
||||
<?php
|
||||
|
||||
require_once "config.php";
|
||||
|
||||
require_once "functions.php";
|
||||
|
||||
require_once "check_login.php";
|
||||
|
||||
require_once "page_title.php";
|
||||
require_once "header.php";
|
||||
|
||||
require_once "top_nav.php";
|
||||
|
||||
require_once "user_side_nav.php";
|
||||
|
||||
require_once "inc_wrapper.php";
|
||||
|
||||
require_once "inc_alert_feedback.php";
|
||||
|
||||
require_once "filter_header.php";
|
||||
|
||||
32
includes/page_title.php
Normal file
32
includes/page_title.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
// Set Page Title
|
||||
|
||||
// Get the current page name without the .php extension
|
||||
$page_title = basename($_SERVER['PHP_SELF'], '.php');
|
||||
|
||||
// Remove 'client_' from the page name
|
||||
$page_title = str_replace('client_', '', $page_title);
|
||||
|
||||
// Remove 'report_' from the page name
|
||||
$page_title = str_replace('report_', '', $page_title);
|
||||
|
||||
// Remove 'admin_' from the page name
|
||||
$page_title = str_replace('admin_', '', $page_title);
|
||||
|
||||
// Remove 'admin_' from the page name
|
||||
$page_title = str_replace('settings_', '', $page_title);
|
||||
|
||||
// Replace any underscores with spaces
|
||||
$page_title = str_replace('_', ' ', $page_title);
|
||||
|
||||
// Capitize
|
||||
$page_title = ucwords($page_title);
|
||||
|
||||
// Sanitize title for SQL input such as logging
|
||||
$page_title_sanitized = sanitizeInput($page_title);
|
||||
|
||||
// Sanitize the page title to prevent XSS for output
|
||||
$page_title = nullable_htmlentities($page_title);
|
||||
|
||||
$tab_title = $session_company_name;
|
||||
Reference in New Issue
Block a user