From 4694dd241c3c44d2428723b1322586264b06fe28 Mon Sep 17 00:00:00 2001 From: Marcus Hill Date: Thu, 2 Feb 2023 15:46:08 +0000 Subject: [PATCH 01/10] Convert deprecated center element to CSS --- settings_backup.php | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/settings_backup.php b/settings_backup.php index 8ac2c4dc..ce21b22d 100644 --- a/settings_backup.php +++ b/settings_backup.php @@ -4,10 +4,8 @@

Download Database

-
-
-

Download
-
+
@@ -16,18 +14,20 @@

Backup Master Encryption Key

-
+
-
-
- +
+
+
+ +
+
-
-
+
- Date: Thu, 2 Feb 2023 15:54:17 +0000 Subject: [PATCH 02/10] Convert deprecated center element to CSS; Convert includes to require; Tidy --- settings_update.php | 68 +++++++++++++++++++++------------------------ 1 file changed, 31 insertions(+), 37 deletions(-) diff --git a/settings_update.php b/settings_update.php index 87b478b1..b73edc2c 100644 --- a/settings_update.php +++ b/settings_update.php @@ -1,7 +1,7 @@

Update

-
-
+
- - -
- - + if (!empty($git_log)) { ?> @@ -83,4 +77,4 @@ $git_log = shell_exec("git log $repo_branch..origin/$repo_branch --pretty=format Date: Thu, 2 Feb 2023 15:59:48 +0000 Subject: [PATCH 03/10] Convert to 4 spaces; General tidy --- check_login.php | 70 ++++++++++++++++++++++++------------------------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/check_login.php b/check_login.php index be452ffa..ed30cb4d 100644 --- a/check_login.php +++ b/check_login.php @@ -1,36 +1,36 @@ Date: Thu, 2 Feb 2023 16:07:34 +0000 Subject: [PATCH 04/10] Convert to 4 spaces; General tidy --- client_files.php | 178 +++++++++++++++++++++++------------------------ 1 file changed, 87 insertions(+), 91 deletions(-) diff --git a/client_files.php b/client_files.php index e74d6ccf..0636b810 100644 --- a/client_files.php +++ b/client_files.php @@ -1,4 +1,4 @@ -
-
-

Files

-
- +
+

Files

+
+ +
-
-
- -

No Records Here

"; - } - - ?> - -
- - - - - - - -

No Records Here

"; } + ?> + + +
+ +
" target="_blank" class="text-secondary"> - " download="" class="text-secondary float-left ml-1"> - )" class="text-secondary float-left ml-1"> - -
+ + + + + + + + + + - - - +require_once("client_file_add_modal.php"); +require_once("share_modal.php"); +require_once("footer.php"); From 5ee2a4cd08a6ef4cd25786006535c38680139f4e Mon Sep 17 00:00:00 2001 From: Marcus Hill Date: Thu, 2 Feb 2023 16:10:27 +0000 Subject: [PATCH 05/10] Convert to 4 spaces; General tidy --- client_files.php | 140 +++++++++---------- client_overview.php | 328 ++++++++++++++++++++++---------------------- 2 files changed, 233 insertions(+), 235 deletions(-) diff --git a/client_files.php b/client_files.php index 0636b810..bdc2b3b3 100644 --- a/client_files.php +++ b/client_files.php @@ -8,99 +8,99 @@ $num_of_files = mysqli_num_rows($sql_files_images) + mysqli_num_rows($sql_files_ ?> -
-
-

Files

-
- +
+
+

Files

+
+ +
-
-
- -

No Records Here

"; - } - - ?> - -
" target="_blank" class="text-secondary"> + " download="" class="text-secondary float-left ml-1"> + )" class="text-secondary float-left ml-1"> + +
+
- + + + + + + - - - - - - + - 0) { ?> -
+
-
-
-
Important Contacts
-
-
-
" target="_blank" class="text-secondary"> + " download="" class="text-secondary float-left ml-1"> + )" class="text-secondary float-left ml-1"> + +
" target="_blank" class="text-secondary"> - " download="" class="text-secondary float-left ml-1"> - )" class="text-secondary float-left ml-1"> - -
- - - - - +
+
+
Important Contacts
+
+
+
- -
- -
- - $contact_phone $contact_extension"; ?> - - -
-
- -
-
+ while ($row = mysqli_fetch_array($sql_important_contacts)) { + $contact_id = $row['contact_id']; + $contact_name = htmlentities($row['contact_name']); + $contact_title = htmlentities($row['contact_title']); + $contact_email = htmlentities($row['contact_email']); + $contact_phone = formatPhoneNumber($row['contact_phone']); + $contact_extension = htmlentities($row['contact_extension']); + $contact_mobile = formatPhoneNumber($row['contact_mobile']); + + ?> + + + +
+ + + + + $contact_phone $contact_extension"; ?> + + +
+
+ + + + + + +
- 0 || mysqli_num_rows($sql_vendors) > 0) { ?> -
+
-
-
-
Recently Updated
-
-
+
+
+
Recently Updated
+
+
- -

- - -

- +

+ + +

+ -

- - -

- + +

+ + +

+ + +
-
- 0 - || mysqli_num_rows($sql_asset_warranties_expiring) > 0 - || mysqli_num_rows($sql_asset_retire) > 0 + 0 + || mysqli_num_rows($sql_asset_warranties_expiring) > 0 + || mysqli_num_rows($sql_asset_retire) > 0 ) { ?> - -
-
-
-
Upcoming Expirations
-
-
- - -

- - - -- -

- - - -

- - - -- -

+
+
+
+
Upcoming Expirations
+
+
- +

+ + + -- +

+ -

- - - -- -

+ while ($row = mysqli_fetch_array($sql_asset_warranties_expiring)) { + $asset_id = $row['asset_id']; + $asset_name = htmlentities($row['asset_name']); + $asset_warranty_expire = $row['asset_warranty_expire']; + + ?> +

+ + + -- +

+ + + + + +

+ + + -- +

+ + + +
-
0) { ?> - + -
+
-
-
-
Stale Tickets (14d)
-
-
- - - - - - - - - +
+
+
Stale Tickets (14d)
+
+
+
+ - -
+ while ($row = mysqli_fetch_array($sql_tickets_stale)) { + $ticket_id = $row['ticket_id']; + $ticket_prefix = htmlentities($row['ticket_prefix']); + $ticket_number = $row['ticket_number']; + $ticket_subject = htmlentities($row['ticket_subject']); + $ticket_created_at = $row['ticket_created_at']; + + ?> + + + + + + + + + + +
-
@@ -276,6 +276,4 @@ $sql_domains_expiring = mysqli_query($mysqli, "SELECT * FROM domains +require_once("footer.php"); From c6840ff92a45ef18c5a66506c53830d5c66c745c Mon Sep 17 00:00:00 2001 From: Marcus Hill Date: Thu, 2 Feb 2023 16:15:21 +0000 Subject: [PATCH 06/10] General tidy --- invoice.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/invoice.php b/invoice.php index 5ad0aea5..21610614 100644 --- a/invoice.php +++ b/invoice.php @@ -1,6 +1,6 @@
- "> + " alt="Company logo">
@@ -483,12 +483,12 @@ if (isset($_GET['invoice_id'])) {
Date: Thu, 2 Feb 2023 16:20:44 +0000 Subject: [PATCH 07/10] Convert deprecated center tags to CSS; General tidy --- notifications.php | 138 ++++++++++++++++++++++------------------------ 1 file changed, 66 insertions(+), 72 deletions(-) diff --git a/notifications.php b/notifications.php index e2582827..2240845c 100644 --- a/notifications.php +++ b/notifications.php @@ -1,78 +1,72 @@ - + -
-
-

Notifications

-
- - 0) { ?> Dismiss All - Dismissed +
+
+

Notifications

+
+ + 0) { ?> Dismiss All + Dismissed +
+
+
+ 0) { ?> + +
+ + + + + + + + + + + + $client_name"; + } + + ?> + + + + + + + + + + + +
TimestampTypeNotificationClientDismiss
+
+
+ + +
+

No Notifications

+
+ +
-
-
- 0) { ?> -
- - - - - - - - - - - - $client_name"; - } - - ?> - - - - - - - - - - - -
TimestampTypeNotificationClientDismiss
-
-
- - -
-

No Notifications

-
- - -
- - Date: Thu, 2 Feb 2023 16:22:58 +0000 Subject: [PATCH 08/10] General small tidy --- recurring_invoice.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/recurring_invoice.php b/recurring_invoice.php index a6d7b465..4d96b417 100644 --- a/recurring_invoice.php +++ b/recurring_invoice.php @@ -1,4 +1,4 @@ - From 090734d622b8693ca21ff7ebc28b9288436579d7 Mon Sep 17 00:00:00 2001 From: Marcus Hill Date: Thu, 2 Feb 2023 16:28:13 +0000 Subject: [PATCH 09/10] General tidy --- client_assets.php | 68 +++++++++++++++++++++++------------------------ 1 file changed, 33 insertions(+), 35 deletions(-) diff --git a/client_assets.php b/client_assets.php index 7efb34bf..91977480 100644 --- a/client_assets.php +++ b/client_assets.php @@ -1,4 +1,4 @@ -

Assets

- +
@@ -84,7 +84,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
- s"> + s">
@@ -92,30 +92,30 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
@@ -169,19 +169,19 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); $asset_serial = htmlentities($row['asset_serial']); if (empty($asset_serial)) { $asset_serial_display = "-"; - }else{ + } else { $asset_serial_display = $asset_serial; } $asset_os = htmlentities($row['asset_os']); if (empty($asset_os)) { $asset_os_display = "-"; - }else{ + } else { $asset_os_display = $asset_os; } $asset_ip = htmlentities($row['asset_ip']); if (empty($asset_ip)) { $asset_ip_display = "-"; - }else{ + } else { $asset_ip_display = "$asset_ip"; } $asset_mac = htmlentities($row['asset_mac']); @@ -191,7 +191,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); $asset_install_date = $row['asset_install_date']; if (empty($asset_install_date)) { $asset_install_date_display = "-"; - }else{ + } else { $asset_install_date_display = $asset_install_date; } $asset_notes = htmlentities($row['asset_notes']); @@ -203,29 +203,29 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); if ($asset_type == 'Laptop') { $device_icon = "laptop"; - }elseif ($asset_type == 'Desktop') { + } elseif ($asset_type == 'Desktop') { $device_icon = "desktop"; - }elseif ($asset_type == 'Server') { + } elseif ($asset_type == 'Server') { $device_icon = "server"; - }elseif ($asset_type == 'Printer') { + } elseif ($asset_type == 'Printer') { $device_icon = "print"; - }elseif ($asset_type == 'Camera') { + } elseif ($asset_type == 'Camera') { $device_icon = "video"; - }elseif ($asset_type == 'Switch' || $asset_type == 'Firewall/Router') { + } elseif ($asset_type == 'Switch' || $asset_type == 'Firewall/Router') { $device_icon = "network-wired"; - }elseif ($asset_type == 'Access Point') { + } elseif ($asset_type == 'Access Point') { $device_icon = "wifi"; - }elseif ($asset_type == 'Phone') { + } elseif ($asset_type == 'Phone') { $device_icon = "phone"; - }elseif ($asset_type == 'Mobile Phone') { + } elseif ($asset_type == 'Mobile Phone') { $device_icon = "mobile-alt"; - }elseif ($asset_type == 'Tablet') { + } elseif ($asset_type == 'Tablet') { $device_icon = "tablet-alt"; - }elseif ($asset_type == 'TV') { + } elseif ($asset_type == 'TV') { $device_icon = "tv"; - }elseif ($asset_type == 'Virtual Machine') { + } elseif ($asset_type == 'Virtual Machine') { $device_icon = "cloud"; - }else{ + } else { $device_icon = "tag"; } @@ -345,10 +345,10 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); @@ -356,13 +356,11 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
- +
- - +require_once("client_asset_add_modal.php"); +require_once("client_asset_import_modal.php"); +require_once include("footer.php"); From 8fe64909155c93e8aa497593c37749b3358c0f16 Mon Sep 17 00:00:00 2001 From: Marcus Hill Date: Thu, 2 Feb 2023 16:35:50 +0000 Subject: [PATCH 10/10] General tidy --- quote.php | 1503 ++++++++++++++++++++++++++--------------------------- 1 file changed, 751 insertions(+), 752 deletions(-) diff --git a/quote.php b/quote.php index f20a8f38..696d730f 100644 --- a/quote.php +++ b/quote.php @@ -1,403 +1,402 @@ - - - 0) { - while ($row = mysqli_fetch_array($products_sql)) { - $products[] = $row; + $row = mysqli_fetch_array($sql); + $quote_id = $row['quote_id']; + $quote_prefix = htmlentities($row['quote_prefix']); + $quote_number = htmlentities($row['quote_number']); + $quote_scope = htmlentities($row['quote_scope']); + $quote_status = htmlentities($row['quote_status']); + $quote_date = $row['quote_date']; + $quote_amount = floatval($row['quote_amount']); + $quote_currency_code = htmlentities($row['quote_currency_code']); + $quote_note = htmlentities($row['quote_note']); + $quote_url_key = htmlentities($row['quote_url_key']); + $quote_created_at = $row['quote_created_at']; + $category_id = $row['quote_category_id']; + $client_id = $row['client_id']; + $client_name = htmlentities($row['client_name']); + $location_address = htmlentities($row['location_address']); + $location_city = htmlentities($row['location_city']); + $location_state = htmlentities($row['location_state']); + $location_zip = htmlentities($row['location_zip']); + $contact_email = htmlentities($row['contact_email']); + $contact_phone = formatPhoneNumber($row['contact_phone']); + $contact_extension = htmlentities($row['contact_extension']); + $contact_mobile = formatPhoneNumber($row['contact_mobile']); + $client_website = htmlentities($row['client_website']); + $client_currency_code = htmlentities($row['client_currency_code']); + $client_net_terms = htmlentities($row['client_net_terms']); + if ($client_net_terms == 0) { + $client_net_terms = $config_default_net_terms; + } + $company_id = $row['company_id']; + $company_name = htmlentities($row['company_name']); + $company_country = htmlentities($row['company_country']); + $company_address = htmlentities($row['company_address']); + $company_city = htmlentities($row['company_city']); + $company_state = htmlentities($row['company_state']); + $company_zip = htmlentities($row['company_zip']); + $company_phone = formatPhoneNumber($row['company_phone']); + $company_email = htmlentities($row['company_email']); + $company_website = htmlentities($row['company_website']); + $company_logo = htmlentities($row['company_logo']); + if (!empty($company_logo)) { + $company_logo_base64 = base64_encode(file_get_contents("uploads/settings/$company_id/$company_logo")); } - $json_products = json_encode($products); - } -?> + $sql_history = mysqli_query($mysqli,"SELECT * FROM history WHERE history_quote_id = $quote_id ORDER BY history_id DESC"); - + //Set Badge color based off of quote status + if ($quote_status == "Sent") { + $quote_badge_color = "warning text-white"; + }elseif ($quote_status == "Viewed") { + $quote_badge_color = "primary"; + }elseif ($quote_status == "Accepted") { + $quote_badge_color = "success"; + }elseif ($quote_status == "Declined") { + $quote_badge_color = "danger"; + }elseif ($quote_status == "Invoiced") { + $quote_badge_color = "info"; + }else{ + $quote_badge_color = "secondary"; + } -
-
+ //Product autocomplete + $products_sql = mysqli_query($mysqli,"SELECT product_name AS label, product_description AS description, product_price AS price FROM products WHERE company_id = $session_company_id"); -
+ if (mysqli_num_rows($products_sql) > 0) { + while ($row = mysqli_fetch_array($products_sql)) { + $products[] = $row; + } + $json_products = json_encode($products); + } -
- - - -
- -
-
- "> -
-
-

Quote

-
-
-
-
-
    -
  • -
  • -
  • -
  • -
  • -
-
-
-
    -
  • -
  • -
  • -
  • -
  • -
  • -
-
-
-
-
-
-
- - - - - -
Date
-
-
- - - -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
ItemDescriptionQtyPriceTaxTotal
- - -
- + + + + + + + + + + + + + + - - - - - - -
DateStatusDescription
- -
- - - - -
-
-
-
- Notes -
- - - +
+
-
-
-
-
-
- -
- - - - - - - 0) { ?> - - - - - - - - - - -
Subtotal
Tax
Total
-
-
+ -
-
+} -
-
-
-
- History -
- - -
-
-
- - - - - - - - - - - - - - - - - - -
DateStatusDescription
-
-
-
-
- - @@ -406,406 +405,406 @@ include("footer.php");