From 0e451056b4589f25fbf143f636a4f5bd260cb169 Mon Sep 17 00:00:00 2001 From: "johnny@pittpc.com" Date: Wed, 28 Aug 2019 21:47:40 -0400 Subject: [PATCH] Added get OS Browser Device and IP functions, added these functions to guest view invoice, also added invoice view alert and other minor fixes --- alerts.php | 4 +- check_login.php | 11 +--- client_side_nav.php | 3 +- functions.php | 127 +++++++++++++++++++++++++++++++++++++++++ guest_view_invoice.php | 115 ++++++++++++++++++------------------- guest_view_quote.php | 9 ++- index.php | 8 ++- invoice.php | 6 +- invoices.php | 2 +- login.php | 10 +--- quote.php | 5 ++ 11 files changed, 213 insertions(+), 87 deletions(-) diff --git a/alerts.php b/alerts.php index 810ad892..c8da22ed 100644 --- a/alerts.php +++ b/alerts.php @@ -2,9 +2,9 @@ 0"; + $where_clause = "IS NOT NULL"; }else{ - $where_clause = "= 0"; + $where_clause = "IS NULL"; } ?> diff --git a/check_login.php b/check_login.php index e4a1b5ae..225f7ec5 100644 --- a/check_login.php +++ b/check_login.php @@ -1,5 +1,5 @@ 0 AND basename($_SERVER['PHP_SELF']) !== 'client.php' AND basename($_SERVER['PHP_SELF']) !== 'post.php'){ - header("Location: logout.php"); - die; - } $session_user_id = $_SESSION['user_id']; @@ -25,7 +19,6 @@ $session_avatar = $row['avatar']; $session_company_id = $row['company_id']; $session_company_name = $row['company_name']; - $session_client_id = $row['client_id']; $session_token = $row['token']; include("get_settings.php"); @@ -42,7 +35,7 @@ } //Get unAcked Alert Count for the badge on the top nav - $row = mysqli_fetch_assoc(mysqli_query($mysqli,"SELECT COUNT('alert_id') AS num FROM alerts WHERE alert_ack_date = 0")); + $row = mysqli_fetch_assoc(mysqli_query($mysqli,"SELECT COUNT('alert_id') AS num FROM alerts WHERE alert_ack_date IS NULL AND company_id = $session_company_id")); $num_alerts = $row['num']; ?> \ No newline at end of file diff --git a/client_side_nav.php b/client_side_nav.php index 07a60259..631abdcd 100644 --- a/client_side_nav.php +++ b/client_side_nav.php @@ -6,7 +6,7 @@

- + -