From 7f3cdd975ff32ec8f1765158919ac3b5d5f1bdc2 Mon Sep 17 00:00:00 2001 From: "johnny@pittpc.com" Date: Sun, 1 Sep 2019 21:49:13 -0400 Subject: [PATCH] Added a no records placeholder to all tables --- accounts.php | 2 +- alerts.php | 2 +- categories.php | 2 +- client_assets.php | 2 +- client_contacts.php | 2 +- client_domains.php | 2 +- client_invoices.php | 2 +- client_locations.php | 2 +- client_logins.php | 2 +- client_networks.php | 2 +- client_notes.php | 156 +++++++++++++++++++++++++++++++---------- client_payments.php | 2 +- client_quotes.php | 2 +- client_recurring.php | 2 +- client_software.php | 2 +- client_tickets.php | 2 +- client_vendors.php | 2 +- clients.php | 2 +- companies.php | 2 +- expenses.php | 2 +- functions.php | 2 - invoices.php | 2 +- pagination.php | 8 ++- payments.php | 2 +- products.php | 2 +- quotes.php | 2 +- recurring.php | 2 +- tickets.php | 2 +- transfers.php | 2 +- trips.php | 2 +- users.php | 2 +- vendors.php | 160 ------------------------------------------- view_client_note.php | 12 ++++ 33 files changed, 166 insertions(+), 228 deletions(-) create mode 100644 view_client_note.php diff --git a/accounts.php b/accounts.php index 3d44cb85..f8374019 100644 --- a/accounts.php +++ b/accounts.php @@ -66,7 +66,7 @@
- + "> diff --git a/alerts.php b/alerts.php index c8da22ed..3343e37e 100644 --- a/alerts.php +++ b/alerts.php @@ -21,7 +21,7 @@ if($_GET['status'] == "archived"){
Name Balance
- + "> diff --git a/categories.php b/categories.php index 8783cce9..5b6bdf76 100644 --- a/categories.php +++ b/categories.php @@ -65,7 +65,7 @@
Date Type
- + "> diff --git a/client_assets.php b/client_assets.php index 1b72d9e6..9b79eea4 100644 --- a/client_assets.php +++ b/client_assets.php @@ -69,7 +69,7 @@ $total_pages = ceil($total_found_rows / 10);
Name Type
- + "> diff --git a/client_contacts.php b/client_contacts.php index 9895c6d7..cebc29e3 100644 --- a/client_contacts.php +++ b/client_contacts.php @@ -67,7 +67,7 @@ $total_pages = ceil($total_found_rows / 10);
Type Name
- + "> diff --git a/client_domains.php b/client_domains.php index b6b0eac6..76b08c53 100644 --- a/client_domains.php +++ b/client_domains.php @@ -68,7 +68,7 @@ $total_pages = ceil($total_found_rows / 10);
Name Title
- + "> diff --git a/client_invoices.php b/client_invoices.php index c996886c..e2c078e9 100644 --- a/client_invoices.php +++ b/client_invoices.php @@ -70,7 +70,7 @@ $total_pages = ceil($total_found_rows / 10);
Domain Registrar
- + "> diff --git a/client_locations.php b/client_locations.php index a2d3849a..ab72e8e0 100644 --- a/client_locations.php +++ b/client_locations.php @@ -69,7 +69,7 @@ $total_pages = ceil($total_found_rows / 10);
Number Amount
- + "> diff --git a/client_logins.php b/client_logins.php index a44d10e7..dea1e9da 100644 --- a/client_logins.php +++ b/client_logins.php @@ -70,7 +70,7 @@ $total_pages = ceil($total_found_rows / 10);
Name Address
- + "> diff --git a/client_networks.php b/client_networks.php index f9384f02..63305279 100644 --- a/client_networks.php +++ b/client_networks.php @@ -69,7 +69,7 @@ $total_pages = ceil($total_found_rows / 10);
Description Username
- + "> diff --git a/client_notes.php b/client_notes.php index 7aa5650c..769d0058 100644 --- a/client_notes.php +++ b/client_notes.php @@ -1,4 +1,55 @@ - + $sb, 'o' => $o))); + +if(isset($_GET['p'])){ + $p = intval($_GET['p']); + $record_from = (($p)-1)*10; + $record_to = 10; +}else{ + $record_from = 0; + $record_to = 10; + $p = 1; +} + +if(isset($_GET['q'])){ + $q = mysqli_real_escape_string($mysqli,$_GET['q']); +}else{ + $q = ""; +} + +if(!empty($_GET['sb'])){ + $sb = mysqli_real_escape_string($mysqli,$_GET['sb']); +}else{ + $sb = "note_id"; +} + +if(isset($_GET['o'])){ + if($_GET['o'] == 'ASC'){ + $o = "ASC"; + $disp = "DESC"; + }else{ + $o = "DESC"; + $disp = "ASC"; + } +}else{ + $o = "DESC"; + $disp = "ASC"; +} + +$sql = mysqli_query($mysqli,"SELECT SQL_CALC_FOUND_ROWS * FROM notes + WHERE notes.client_id = $client_id + AND notes.company_id = $session_company_id + AND (note_subject 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); + +?>
@@ -6,50 +57,83 @@
+
+ + +
+ +
+ +
+
+ +
+
+
Name Network
+ "> + + + + + + + + + -
-
- - -
+ + + + + - ?> + + + +
+ Note + + Created + + Updated + + Action +
+ + + - - -
- text("$note_body"); - ?> -
- - - - + +
+ + + +
- + \ No newline at end of file diff --git a/client_payments.php b/client_payments.php index bda86bea..751cb0ec 100644 --- a/client_payments.php +++ b/client_payments.php @@ -71,7 +71,7 @@ $total_pages = ceil($total_found_rows / 10);
- + "> diff --git a/client_quotes.php b/client_quotes.php index 5815f736..c796daac 100644 --- a/client_quotes.php +++ b/client_quotes.php @@ -70,7 +70,7 @@ $total_pages = ceil($total_found_rows / 10);
Date Invoice
- + "> diff --git a/client_recurring.php b/client_recurring.php index dc307444..f6e960a6 100644 --- a/client_recurring.php +++ b/client_recurring.php @@ -70,7 +70,7 @@ $total_pages = ceil($total_found_rows / 10);
Number Amount
- + "> diff --git a/client_software.php b/client_software.php index d291cec3..8d778daa 100644 --- a/client_software.php +++ b/client_software.php @@ -69,7 +69,7 @@ $total_pages = ceil($total_found_rows / 10);
Frequency Last Sent
- + "> diff --git a/client_tickets.php b/client_tickets.php index e62749e0..a9b7c5df 100644 --- a/client_tickets.php +++ b/client_tickets.php @@ -69,7 +69,7 @@ $total_pages = ceil($total_found_rows / 10);
Software Type
- + "> diff --git a/client_vendors.php b/client_vendors.php index 475d2f94..8ef15711 100644 --- a/client_vendors.php +++ b/client_vendors.php @@ -69,7 +69,7 @@ $total_pages = ceil($total_found_rows / 10);
Number Subject
- + "> diff --git a/clients.php b/clients.php index 93fff5c7..4b32eba1 100644 --- a/clients.php +++ b/clients.php @@ -64,7 +64,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
Vendor Description
- + "> diff --git a/companies.php b/companies.php index 0611ec27..d5f4c924 100644 --- a/companies.php +++ b/companies.php @@ -67,7 +67,7 @@
Name "> Type
- + "> diff --git a/expenses.php b/expenses.php index 45b89034..f1f076ca 100644 --- a/expenses.php +++ b/expenses.php @@ -70,7 +70,7 @@
Name Action
- + "> diff --git a/functions.php b/functions.php index 031dd534..a209aef8 100644 --- a/functions.php +++ b/functions.php @@ -124,8 +124,6 @@ function get_os() { return $os_platform; } - - function get_device(){ $tablet_browser = 0; $mobile_browser = 0; diff --git a/invoices.php b/invoices.php index 43c9406b..11e048ef 100644 --- a/invoices.php +++ b/invoices.php @@ -159,7 +159,7 @@
Date Amount
- + "> diff --git a/pagination.php b/pagination.php index fd6db2de..911a2ed9 100644 --- a/pagination.php +++ b/pagination.php @@ -62,7 +62,11 @@ if ($total_found_rows > 10) {
Records: $total_found_rows"; + +if($total_found_rows == 0){ +echo "

No Records Here

"; +}else{ + echo "

Records: $total_found_rows
"; +} ?> \ No newline at end of file diff --git a/payments.php b/payments.php index 814954c3..254024fb 100644 --- a/payments.php +++ b/payments.php @@ -69,7 +69,7 @@
Number Client
- + "> diff --git a/products.php b/products.php index 19bc901d..868aca48 100644 --- a/products.php +++ b/products.php @@ -65,7 +65,7 @@
Date Invoice
- + "> diff --git a/quotes.php b/quotes.php index adba4923..061f00b8 100644 --- a/quotes.php +++ b/quotes.php @@ -69,7 +69,7 @@
Name Description
- + "> diff --git a/recurring.php b/recurring.php index 0b90fe2e..feae2775 100644 --- a/recurring.php +++ b/recurring.php @@ -69,7 +69,7 @@
Number Client
- + "> diff --git a/tickets.php b/tickets.php index 6e72739e..744c8aad 100644 --- a/tickets.php +++ b/tickets.php @@ -68,7 +68,7 @@
Frequency Client
- + "> diff --git a/transfers.php b/transfers.php index bb113e05..c5ee520c 100644 --- a/transfers.php +++ b/transfers.php @@ -65,7 +65,7 @@ $total_pages = ceil($total_found_rows / 10);
Number Client
- + "> diff --git a/trips.php b/trips.php index a91837cd..54dce2ef 100644 --- a/trips.php +++ b/trips.php @@ -67,7 +67,7 @@
Date From Account
- + "> diff --git a/users.php b/users.php index 6c748982..5655bbd9 100644 --- a/users.php +++ b/users.php @@ -66,7 +66,7 @@
Date Purpose
- + "> diff --git a/vendors.php b/vendors.php index 759e4225..e69de29b 100644 --- a/vendors.php +++ b/vendors.php @@ -1,160 +0,0 @@ - $sb, 'o' => $o))); - - if(isset($_GET['p'])){ - $p = intval($_GET['p']); - $record_from = (($p)-1)*10; - $record_to = 10; - }else{ - $record_from = 0; - $record_to = 10; - $p = 1; - } - - if(isset($_GET['q'])){ - $q = mysqli_real_escape_string($mysqli,$_GET['q']); - }else{ - $q = ""; - } - - if(!empty($_GET['sb'])){ - $sb = mysqli_real_escape_string($mysqli,$_GET['sb']); - }else{ - $sb = "vendor_name"; - } - - if(isset($_GET['o'])){ - if($_GET['o'] == 'ASC'){ - $o = "ASC"; - $disp = "DESC"; - }else{ - $o = "DESC"; - $disp = "ASC"; - } - }else{ - $o = "DESC"; - $disp = "ASC"; - } - - $sql = mysqli_query($mysqli,"SELECT SQL_CALC_FOUND_ROWS * FROM vendors WHERE client_id = 0 AND company_id = $session_company_id AND (vendor_name LIKE '%$q%' OR vendor_description LIKE '%$q%' OR vendor_account_number 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); - - ?> - - -
-
-
Vendors
- -
-
-
-
- -
- -
-
- -
-
-
Name Email
- - - - - - - - - - - 2){ - $vendor_phone = substr($row['vendor_phone'],0,3)."-".substr($row['vendor_phone'],3,3)."-".substr($row['vendor_phone'],6,4); - } - $vendor_email = $row['vendor_email']; - $vendor_website = $row['vendor_website']; - - ?> - - - - - - - - - - - -
VendorDescriptionContactAccount NumberAction
- - -
- - - -
- - - -
- -
- - -
- - - -
- - - - - - +
+
+ +
+
+ text("$note_body"); + ?> +
+ \ No newline at end of file