From fb4c1e828f13370899585c3e60af07fc1d2a5dd5 Mon Sep 17 00:00:00 2001 From: johnnyq Date: Fri, 7 Jun 2024 17:57:02 -0400 Subject: [PATCH] Fix Some Undefined Vars PHP Errors --- admin_project_templates.php | 2 +- admin_ticket_templates.php | 2 +- client_assets.php | 3 ++- client_contact_details.php | 9 ++++----- client_contacts.php | 4 +++- client_file_move_modal.php | 2 +- client_files.php | 2 +- client_locations.php | 2 ++ clients.php | 6 +++--- expenses.php | 5 ++++- invoices.php | 1 + recurring_expense_edit_modal.php | 6 +++--- settings_ticket.php | 4 ++-- transfers.php | 6 ++++-- 14 files changed, 32 insertions(+), 22 deletions(-) diff --git a/admin_project_templates.php b/admin_project_templates.php index bed85655..779f948a 100644 --- a/admin_project_templates.php +++ b/admin_project_templates.php @@ -87,7 +87,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); ?> - +
diff --git a/admin_ticket_templates.php b/admin_ticket_templates.php index dd277b4c..ddf33ee4 100644 --- a/admin_ticket_templates.php +++ b/admin_ticket_templates.php @@ -70,7 +70,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); ?> - +
diff --git a/client_assets.php b/client_assets.php index e8db679e..640a8c21 100644 --- a/client_assets.php +++ b/client_assets.php @@ -29,6 +29,7 @@ if (isset($_GET['location']) & !empty($_GET['location'])) { } else { // Default - any $location_query = ''; + $location = ''; } //Get Asset Counts @@ -194,7 +195,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); Set Status - + "; } + $asset_nat_ip = nullable_htmlentities($row['asset_nat_ip']); $asset_mac = nullable_htmlentities($row['asset_mac']); $asset_status = nullable_htmlentities($row['asset_status']); $asset_purchase_date = nullable_htmlentities($row['asset_purchase_date']); @@ -246,6 +247,8 @@ if (isset($_GET['contact_id'])) { } else { $asset_install_date_display = $asset_install_date; } + $asset_uri = nullable_htmlentities($row['asset_uri']); + $asset_uri_2 = nullable_htmlentities($row['asset_uri_2']); $asset_notes = nullable_htmlentities($row['asset_notes']); $asset_created_at = nullable_htmlentities($row['asset_created_at']); $asset_vendor_id = intval($row['asset_vendor_id']); @@ -355,6 +358,7 @@ if (isset($_GET['contact_id'])) { } else { $login_uri_display = "$login_uri"; } + $login_uri_2 = nullable_htmlentities($row['login_uri_2']); $login_username = nullable_htmlentities(decryptLoginEntry($row['login_username'])); if (empty($login_username)) { $login_username_display = "-"; @@ -461,11 +465,6 @@ if (isset($_GET['contact_id'])) { $seat_count = 0; - // Get Login - $login_id = intval($row['login_id']); - $login_username = nullable_htmlentities(decryptLoginEntry($row['login_username'])); - $login_password = nullable_htmlentities(decryptLoginEntry($row['login_password'])); - // Asset Licenses $asset_licenses_sql = mysqli_query($mysqli, "SELECT asset_id FROM software_assets WHERE software_id = $software_id"); $asset_licenses_array = array(); diff --git a/client_contacts.php b/client_contacts.php index c6fb0e8d..0751957e 100644 --- a/client_contacts.php +++ b/client_contacts.php @@ -18,6 +18,8 @@ if (isset($_GET['tags']) && is_array($_GET['tags']) && !empty($_GET['tags'])) { // Convert the sanitized tags into a comma-separated string $sanitizedTagsString = implode(",", $sanitizedTags); $tag_query = "AND tags.tag_id IN ($sanitizedTagsString)"; +} else { + $tag_query = ''; } //Rebuild URL @@ -124,7 +126,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); Assign Tags - +
-
" id="advancedFilter"> +
" id="advancedFilter">
diff --git a/invoices.php b/invoices.php index 56619a9f..d3533780 100644 --- a/invoices.php +++ b/invoices.php @@ -57,6 +57,7 @@ $real_overdue_amount = $total_overdue_amount - $total_overdue_partial_amount; $total_unpaid_amount = $total_sent_amount + $total_viewed_amount + $total_partial_amount; $unpaid_count = $sent_count + $viewed_count + $partial_count; +$overdue_query = ''; //Invoice status from GET if (isset($_GET['status']) && ($_GET['status']) == 'Draft') { $status_query = "invoice_status = 'Draft'"; diff --git a/recurring_expense_edit_modal.php b/recurring_expense_edit_modal.php index 7caa7a31..49a25747 100644 --- a/recurring_expense_edit_modal.php +++ b/recurring_expense_edit_modal.php @@ -84,7 +84,7 @@ '$expense_created_at' OR vendor_archived_at IS NULL) ORDER BY vendor_name ASC"); + $sql_select = mysqli_query($mysqli, "SELECT vendor_id, vendor_name FROM vendors WHERE vendor_client_id = 0 AND vendor_template = 0 AND (vendor_archived_at > '$recurring_expense_created_at' OR vendor_archived_at IS NULL) ORDER BY vendor_name ASC"); while ($row = mysqli_fetch_array($sql_select)) { $vendor_id_select = intval($row['vendor_id']); $vendor_name_select = nullable_htmlentities($row['vendor_name']); @@ -174,7 +174,7 @@ value="1" id="ticketBillableSwitch"> - + value="1" id="ticketBillableSwitch"> +
diff --git a/transfers.php b/transfers.php index 5cc449d4..33217ee2 100644 --- a/transfers.php +++ b/transfers.php @@ -12,6 +12,7 @@ if (isset($_GET['account_from']) & !empty($_GET['account_from'])) { } else { // Default - any $account_from_query = ''; + $account_from = ''; } // Account Transfer To Filter @@ -21,6 +22,7 @@ if (isset($_GET['account_to']) & !empty($_GET['account_to'])) { } else { // Default - any $account_to_query = ''; + $account_to = ''; } @@ -64,7 +66,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
-
" id="advancedFilter"> +
" id="advancedFilter">
@@ -118,7 +120,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));