From 17710cf6b8694f4bfc0f77d8fff57ccbd5b89dd2 Mon Sep 17 00:00:00 2001 From: "johnny@pittpc.com" Date: Thu, 4 Feb 2021 13:40:33 -0500 Subject: [PATCH] Fix Ignoring session_start() because a session is already active added action menu under contacts --- check_login.php | 4 +++- client_contacts.php | 24 ++++++++++++++++-------- vendors.php | 2 +- 3 files changed, 20 insertions(+), 10 deletions(-) diff --git a/check_login.php b/check_login.php index d5a4fbda..d949a222 100644 --- a/check_login.php +++ b/check_login.php @@ -4,7 +4,9 @@ header("Location: setup.php"); } - session_start(); + if(!isset($_SESSION)){ + session_start(); + } if(!$_SESSION['logged']){ header("Location: logout.php"); diff --git a/client_contacts.php b/client_contacts.php index 01193809..373d60e9 100644 --- a/client_contacts.php +++ b/client_contacts.php @@ -1,9 +1,5 @@ $sb, 'o' => $o))); - //Paging if(isset($_GET['p'])){ $p = intval($_GET['p']); @@ -40,12 +36,12 @@ if(isset($_GET['o'])){ $disp = "DESC"; } +//Rebuild URL +$url_query_strings_sb = http_build_query(array_merge($_GET,array('sb' => $sb, 'o' => $o))); + $sql = mysqli_query($mysqli,"SELECT SQL_CALC_FOUND_ROWS * FROM contacts WHERE client_id = $client_id AND (contact_name LIKE '%$q%') ORDER BY $sb $o LIMIT $record_from, $record_to"); $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()")); -$total_found_rows = $num_rows[0]; -$total_pages = ceil($total_found_rows / 10); - ?> @@ -74,6 +70,7 @@ $total_pages = ceil($total_found_rows / 10); Title Email Phone + Action @@ -138,6 +135,18 @@ $total_pages = ceil($total_found_rows / 10); } ?> + + + @@ -153,7 +162,6 @@ $total_pages = ceil($total_found_rows / 10); - diff --git a/vendors.php b/vendors.php index a028617a..d14fb104 100644 --- a/vendors.php +++ b/vendors.php @@ -105,7 +105,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()")); Vendor Description - Contact + Contact Action