From 7b4618c16fe5e40e72abde4852b692fa30c0778e Mon Sep 17 00:00:00 2001 From: "johnny@pittpc.com" Date: Fri, 15 Jan 2021 19:51:40 -0500 Subject: [PATCH] Number of Records per page is now configurable --- accounts.php | 7 ++++--- alerts_archived.php | 6 +++--- categories.php | 7 ++++--- client_assets.php | 7 ++++--- client_contact_details_modal.php | 3 --- client_contacts.php | 7 ++++--- client_domains.php | 7 ++++--- client_invoices.php | 7 ++++--- client_locations.php | 7 ++++--- client_logins.php | 7 ++++--- client_networks.php | 7 ++++--- client_notes.php | 7 ++++--- client_payments.php | 7 ++++--- client_payments_by_invoice.php | 7 ++++--- client_quotes.php | 7 ++++--- client_recurring.php | 7 ++++--- client_software.php | 7 ++++--- client_tickets.php | 7 ++++--- client_trips.php | 7 ++++--- client_vendors.php | 7 ++++--- clients.php | 6 +++--- clients_new.php | 7 ++++--- companies.php | 7 ++++--- contacts.php | 7 ++++--- domains.php | 7 ++++--- expenses.php | 7 ++++--- invoices.php | 7 ++++--- logs.php | 7 ++++--- payments.php | 7 ++++--- products.php | 7 ++++--- quotes.php | 7 ++++--- recurring.php | 7 ++++--- revenues.php | 7 ++++--- tickets.php | 7 ++++--- transfers.php | 7 ++++--- trips.php | 7 ++++--- user_logs.php | 7 ++++--- users.php | 7 ++++--- vendors.php | 8 +++++--- 39 files changed, 151 insertions(+), 117 deletions(-) diff --git a/accounts.php b/accounts.php index 90f7d24f..6110b00c 100644 --- a/accounts.php +++ b/accounts.php @@ -4,13 +4,14 @@ $url_query_strings_sb = http_build_query(array_merge($_GET,array('sb' => $sb, 'o' => $o))); + //Paging if(isset($_GET['p'])){ $p = intval($_GET['p']); - $record_from = (($p)-1)*10; - $record_to = 10; + $record_from = (($p)-1)*$config_records_per_page; + $record_to = $config_records_per_page; }else{ $record_from = 0; - $record_to = 10; + $record_to = $config_records_per_page; $p = 1; } diff --git a/alerts_archived.php b/alerts_archived.php index b29d8ee3..60fc27ed 100644 --- a/alerts_archived.php +++ b/alerts_archived.php @@ -3,11 +3,11 @@ //Paging if(isset($_GET['p'])){ $p = intval($_GET['p']); - $record_from = (($p)-1)*10; - $record_to = 10; + $record_from = (($p)-1)*$config_records_per_page; + $record_to = $config_records_per_page; }else{ $record_from = 0; - $record_to = 10; + $record_to = $config_records_per_page; $p = 1; } diff --git a/categories.php b/categories.php index 5c10b75c..503a28ba 100644 --- a/categories.php +++ b/categories.php @@ -4,13 +4,14 @@ $url_query_strings_sb = http_build_query(array_merge($_GET,array('sb' => $sb, 'o' => $o))); + //Paging if(isset($_GET['p'])){ $p = intval($_GET['p']); - $record_from = (($p)-1)*10; - $record_to = 10; + $record_from = (($p)-1)*$config_records_per_page; + $record_to = $config_records_per_page; }else{ $record_from = 0; - $record_to = 10; + $record_to = $config_records_per_page; $p = 1; } diff --git a/client_assets.php b/client_assets.php index ef305fce..11667e58 100644 --- a/client_assets.php +++ b/client_assets.php @@ -4,13 +4,14 @@ $url_query_strings_sb = http_build_query(array_merge($_GET,array('sb' => $sb, 'o' => $o))); +//Paging if(isset($_GET['p'])){ $p = intval($_GET['p']); - $record_from = (($p)-1)*10; - $record_to = 10; + $record_from = (($p)-1)*$config_records_per_page; + $record_to = $config_records_per_page; }else{ $record_from = 0; - $record_to = 10; + $record_to = $config_records_per_page; $p = 1; } diff --git a/client_contact_details_modal.php b/client_contact_details_modal.php index f1a08197..c1f68a8c 100644 --- a/client_contact_details_modal.php +++ b/client_contact_details_modal.php @@ -6,9 +6,6 @@ $sql_software = mysqli_query($mysqli,"SELECT * FROM software WHERE contact_id = ?> - - -