diff --git a/admin/ai_models.php b/admin/ai_models.php index 0d89b83af..26abb8073 100644 --- a/admin/ai_models.php +++ b/admin/ai_models.php @@ -6,10 +6,12 @@ $order = "ASC"; require_once "includes/inc_all_admin.php"; -$sql = mysqli_query($mysqli, "SELECT ai_model_id, ai_model_name, ai_model_prompt, ai_model_use_case, ai_provider_id, - ai_provider_name FROM ai_models LEFT JOIN ai_providers ON ai_model_ai_provider_id = ai_provider_id ORDER BY $sort $order"); +$sql = mysqli_query($mysqli, "SELECT SQL_CALC_FOUND_ROWS ai_model_id, ai_model_name, ai_model_prompt, ai_model_use_case, ai_provider_id, + ai_provider_name FROM ai_models LEFT JOIN ai_providers ON ai_model_ai_provider_id = ai_provider_id + WHERE ai_model_name LIKE '%$q%' OR ai_provider_name LIKE '%$q%' + ORDER BY $sort $order LIMIT $record_from, $record_to"); -$num_rows = mysqli_num_rows($sql); +$num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); ?> @@ -23,95 +25,102 @@ $num_rows = mysqli_num_rows($sql); -
-
+
+

AI Models

-
-
- - "> - - - - - - - - - - + +
+
+
+ + +
+
+
+ + - while ($row = mysqli_fetch_assoc($sql)) { - $provider_id = intval($row['ai_provider_id']); - $provider_name = escapeHtml($row['ai_provider_name']); - $model_id = intval($row['ai_model_id']); - $model_name = escapeHtml($row['ai_model_name']); - $use_case = escapeHtml($row['ai_model_use_case']); - $prompt = nl2br(escapeHtml($row['ai_model_prompt'])); +
+
- - Model - - - - Provider - - - - Use Case - - - Prompt - Action
+ "> + + + + + + + + + + - - - - - - - - - No Records Here"; - } + while ($row = mysqli_fetch_assoc($sql)) { + $provider_id = intval($row['ai_provider_id']); + $provider_name = escapeHtml($row['ai_provider_name']); + $model_id = intval($row['ai_model_id']); + $model_name = escapeHtml($row['ai_model_name']); + $use_case = escapeHtml($row['ai_model_use_case']); + $prompt = nl2br(escapeHtml($row['ai_model_prompt'])); ?> + + + + + + + - -
+ + Model + + + + Provider + + + + Use Case + + + Prompt + Action
- - - - - -
+ + + + + +
+ + } + + ?> + + +
+
-
-
+
+

AI Providers

-
-
- - "> - - - - - - - - - - + +
+
+
+ + +
+
+
+ + - while ($row = mysqli_fetch_assoc($sql)) { - $provider_id = intval($row['ai_provider_id']); - $provider_name = escapeHtml($row['ai_provider_name']); - $url = escapeHtml($row['ai_provider_api_url']); - $key = escapeHtml($row['ai_provider_api_key']); +
+
- - Provider - - - - URL - - - - Key - - - Models - Action
+ "> + + + + + + + + + + - - - - - - - - No Records Here"; - } + $row = mysqli_fetch_assoc(mysqli_query($mysqli, "SELECT COUNT('ai_model_id') AS ai_model_count FROM ai_models WHERE ai_model_ai_provider_id = $provider_id")); + $ai_model_count = intval($row['ai_model_count']); ?> + + + + + + - -
+ + Provider + + + + URL + + + + Key + + + Models + Action
- - - - - - - -
+ + + + + + + +
+ + } + + ?> + + +
+
"> - +
@@ -117,7 +117,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); ?> - +
diff --git a/admin/app_logs.php b/admin/app_logs.php index 32f43e2fb..6a9a208d9 100644 --- a/admin/app_logs.php +++ b/admin/app_logs.php @@ -114,7 +114,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); "> - - + diff --git a/admin/audit_logs.php b/admin/audit_logs.php index d69f5ac54..d5edf3277 100644 --- a/admin/audit_logs.php +++ b/admin/audit_logs.php @@ -185,7 +185,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
+ Timestamp @@ -149,7 +149,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); ?>
text-nowrap"> - - + diff --git a/admin/canned_responses.php b/admin/canned_responses.php index ec376ca47..e67847ff9 100644 --- a/admin/canned_responses.php +++ b/admin/canned_responses.php @@ -55,7 +55,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
+ Timestamp @@ -261,7 +261,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); ?>
"> - -
+ Response @@ -84,7 +84,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); ?>
+
diff --git a/admin/categories.php b/admin/categories.php index f25459b0f..ef8d7699b 100644 --- a/admin/categories.php +++ b/admin/categories.php @@ -207,10 +207,10 @@ $archive_toggle_url = '?' . http_build_query($archive_toggle_query);
-
+
"> - Template Name - Type - Update Frequency + + + Template Name + + + + + Type + + + + + Update Frequency + + SLA (L/M/H Response) SLA (L/M/H Resolution) - Hourly Rate - After Hours Rate - Support Hours - Net Terms - Created - Updated + + + Hourly Rate + + + + + After Hours Rate + + + + + Support Hours + + + + + Net Terms + + + + + Created + + + + + Updated + + Action @@ -76,8 +113,10 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); $updated = escapeHtml($row['contract_template_updated_at']); ?> - - + +
@@ -114,7 +153,6 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); -
diff --git a/admin/custom_links.php b/admin/custom_links.php index 4f6e8d5d2..e57b11a52 100644 --- a/admin/custom_links.php +++ b/admin/custom_links.php @@ -18,130 +18,126 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); ?> -
-
-

Custom Links

-
- -
-
- -
-
-
-
-
- - -
-
-
-
-
-
- -
-
- - "> - - - - - - - - - - "; - } else { - $custom_link_new_tab_display = ""; - } - $custom_link_order = intval($row['custom_link_order']); - if ($custom_link_order == 0 ) { - $custom_link_order_display = "-"; - } else { - $custom_link_order_display = $custom_link_order; - } - $custom_link_location = intval($row['custom_link_location']); - if ($custom_link_location == 1) { - $custom_link_location_display = "Main Side Nav"; - } elseif ($custom_link_location == 2) { - $custom_link_location_display = "Top Nav"; - } elseif ($custom_link_location == 3) { - $custom_link_location_display = "Client Portal Nav"; - } elseif ($custom_link_location == 4) { - $custom_link_location_display = "Admin Nav"; - } elseif ($custom_link_location == 5) { - $custom_link_location_display = "Reports Nav"; - } - - ?> - - - - - - - - - - - -
- - Name - - - - Order - - - - URI / New Tab - - - - Location - - Action
- - - - - -
-
- +
+
+

Custom Links

+
+
+
+
+
+
+
+ + +
+
+
+
+
+ +
+ + "> + + + + + + + + + + "; + } else { + $custom_link_new_tab_display = ""; + } + $custom_link_order = intval($row['custom_link_order']); + if ($custom_link_order == 0 ) { + $custom_link_order_display = "-"; + } else { + $custom_link_order_display = $custom_link_order; + } + $custom_link_location = intval($row['custom_link_location']); + if ($custom_link_location == 1) { + $custom_link_location_display = "Main Side Nav"; + } elseif ($custom_link_location == 2) { + $custom_link_location_display = "Top Nav"; + } elseif ($custom_link_location == 3) { + $custom_link_location_display = "Client Portal Nav"; + } elseif ($custom_link_location == 4) { + $custom_link_location_display = "Admin Nav"; + } elseif ($custom_link_location == 5) { + $custom_link_location_display = "Reports Nav"; + } + + ?> + + + + + + + + + + + +
+ + Name + + + + Order + + + + URI / New Tab + + + + Location + + Action
+ + + + + +
+
+ +
+ "> - + Template Name @@ -77,7 +77,7 @@ ?> - + diff --git a/admin/modules.php b/admin/modules.php index e0500b9d4..4e83bf023 100644 --- a/admin/modules.php +++ b/admin/modules.php @@ -44,7 +44,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); text-nowrap"> - -
+ Module @@ -62,7 +62,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); ?>
+ 6) { ?> class="ajax-modal" data-modal-url="modals/modules/module_edit.php?id=" > diff --git a/admin/payment_methods.php b/admin/payment_methods.php index 96d6fde44..70d820338 100644 --- a/admin/payment_methods.php +++ b/admin/payment_methods.php @@ -6,96 +6,105 @@ $order = "ASC"; require_once "includes/inc_all_admin.php"; -$sql = mysqli_query($mysqli, "SELECT payment_method_created_at, payment_method_description, payment_method_id, - payment_method_name FROM payment_methods ORDER BY $sort $order"); +$sql = mysqli_query($mysqli, "SELECT SQL_CALC_FOUND_ROWS payment_method_created_at, payment_method_description, payment_method_id, + payment_method_name FROM payment_methods + WHERE payment_method_name LIKE '%$q%' OR payment_method_description LIKE '%$q%' + ORDER BY $sort $order LIMIT $record_from, $record_to"); -$num_rows = mysqli_num_rows($sql); +$num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); ?> -
-
+
+

Payment Methods

-
-
- - "> - - - - - - - - - + +
+
+
+ + +
+
+
+ + - while ($row = mysqli_fetch_assoc($sql)) { - $payment_method_id = intval($row['payment_method_id']); - $payment_method_name = escapeHtml($row['payment_method_name']); - $payment_method_description = escapeHtml($row['payment_method_description']); - $payment_method_created_at = escapeHtml($row['payment_method_created_at']); +
+
- - Method - - - - Description - - - - Created at - - Action
+ "> + + + + + + + + + - - - - - - - - No Records Here"; - } + while ($row = mysqli_fetch_assoc($sql)) { + $payment_method_id = intval($row['payment_method_id']); + $payment_method_name = escapeHtml($row['payment_method_name']); + $payment_method_description = escapeHtml($row['payment_method_description']); + $payment_method_created_at = escapeHtml($row['payment_method_created_at']); ?> + + + + + + - -
+ + Method + + + + Description + + + + Created at + + Action
- - - - - -
+ + + + + +
+ + } + + ?> + + +
+
-
-
+
+

Payment Providers

-
-
- - "> - - - - - - - - - - - - + +
+
+
+ + +
+
+
+ + - while ($row = mysqli_fetch_assoc($sql)) { - $provider_id = intval($row['payment_provider_id']); - $provider_name = escapeHtml($row['payment_provider_name']); - $provider_description = escapeHtml($row['payment_provider_description']); - $account_name = escapeHtml($row['account_name']); - $threshold = floatval($row['payment_provider_threshold']); - if (!$threshold) { - $threshold = "Not Enforced"; - } else { - $threshold = numfmt_format_currency($currency_format, $threshold, $session_company_currency); - } - $vendor_name = escapeHtml($row['vendor_name'] ?? "Expense Disabled"); - $category = escapeHtml($row['category_name']); - - $row = mysqli_fetch_assoc(mysqli_query($mysqli, "SELECT COUNT('saved_payment_id') AS saved_payment_count FROM client_saved_payment_methods WHERE saved_payment_provider_id = $provider_id")); - $saved_payment_count = intval($row['saved_payment_count']); - - ?> - - - - - - - - - - - +
- - Provider - - - - Expense / Income Account - - - - Threshold - - - - Expense Vendor - - - - Expense Category - - - Saved Payment Methods - Action
- - - - - - - - -
+ "> + + + + + + + + + + + + No Records Here"; - } + $row = mysqli_fetch_assoc(mysqli_query($mysqli, "SELECT COUNT('saved_payment_id') AS saved_payment_count FROM client_saved_payment_methods WHERE saved_payment_provider_id = $provider_id")); + $saved_payment_count = intval($row['saved_payment_count']); ?> + + + + + + + + + - -
+ + Provider + + + + Expense / Income Account + + + + Threshold + + + + Expense Vendor + + + + Expense Category + + + Saved Payment Methods + Action
+ + + + + + + + +
+ + } + + ?> + + +
+
"> - +
Template @@ -85,7 +85,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); ?> - +
diff --git a/admin/roles.php b/admin/roles.php index 35541b75a..b9f24d6a1 100644 --- a/admin/roles.php +++ b/admin/roles.php @@ -45,7 +45,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); text-nowrap"> - - "> - -
+ Role @@ -91,7 +91,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); ?>
+ href="#">
diff --git a/admin/saved_payment_methods.php b/admin/saved_payment_methods.php index ebd9c50c0..0d1c24868 100644 --- a/admin/saved_payment_methods.php +++ b/admin/saved_payment_methods.php @@ -27,6 +27,7 @@ $sql = mysqli_query($mysqli, " OR payment_provider_client LIKE '%$q%' OR saved_payment_provider_method LIKE '%$q%' ORDER BY $sort $order + LIMIT $record_from, $record_to "); $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); @@ -65,7 +66,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); "> - -
+ Client @@ -115,7 +116,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); ?>
+
ID: diff --git a/admin/settings_custom_fields.php b/admin/settings_custom_fields.php index b24f042f5..ae232e059 100644 --- a/admin/settings_custom_fields.php +++ b/admin/settings_custom_fields.php @@ -56,7 +56,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); "> - + @@ -73,7 +73,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); ?> - +
LabelLabel Type Action
- + -
-
+
+

Tax Rates

-
-
- - "> - - - - - - - - + +
+
+
+ + +
+
+
+ + - while ($row = mysqli_fetch_assoc($sql)) { - $tax_id = intval($row['tax_id']); - $tax_name = escapeHtml($row['tax_name']); - $tax_percent = floatval($row['tax_percent']); +
+
- - Name - - - - Percent - - Action
+ "> + + + + + + + + - - - - - - - No Records Here"; - } + while ($row = mysqli_fetch_assoc($sql)) { + $tax_id = intval($row['tax_id']); + $tax_name = escapeHtml($row['tax_name']); + $tax_percent = floatval($row['tax_percent']); ?> + + + + + - -
+ + Name + + + + Percent + + Action
- - - - - -
+ + + + + +
+ + } + + ?> + + +
+ -
-
+
+

Tickets Statuses

-
-
-
-
+
+ +
+
- +
- +
-
-
-
+ +
-
-
- - "> - - - - - - - - - - +
- - Name - - - - Color - - - - Status - - SLAAction
+ "> + + + + + + + + + + Active"; - } else { - $ticket_status_display = "
Inactive
"; - } - - ?> - - - - - - - - Active"; + } else { + $ticket_status_display = "
Inactive
"; } ?> + + + + + + - -
+ + Name + + + + Color + + + + Status + + SLAAction
- 5 ) { ?> - class="ajax-modal" data-modal-url="modals/ticket_status/ticket_status_edit.php?id=" - - > - - - - - - - Paused - - Running - - - (fixed) - - - -
+ 5 ) { ?> + class="ajax-modal" data-modal-url="modals/ticket_status/ticket_status_edit.php?id=" + + > + + + + + + + Paused + + Running + + + (fixed) + + + +
-
- + + + +
+
+ Template @@ -77,7 +77,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); ?>
+
diff --git a/admin/vendor_templates.php b/admin/vendor_templates.php index c723a669e..0a512e5a8 100644 --- a/admin/vendor_templates.php +++ b/admin/vendor_templates.php @@ -48,7 +48,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); "> - -
+ Vendor @@ -92,7 +92,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); ?>
+ diff --git a/agent/accounts.php b/agent/accounts.php index bfac439c5..ac52ed5a7 100644 --- a/agent/accounts.php +++ b/agent/accounts.php @@ -40,7 +40,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); "> - - text-nowrap"> - -
+ Name @@ -80,7 +80,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); ?>
+ diff --git a/agent/notifications.php b/agent/notifications.php index 2fee78213..8e098f210 100644 --- a/agent/notifications.php +++ b/agent/notifications.php @@ -33,8 +33,8 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); ?> -
-
+
+

Notifications

@@ -46,12 +46,13 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
-
-
+ +
+ -
+
Notifications"> @@ -81,76 +82,77 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
-
- - "> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Timestamp - - - - Type - - - - Notification - - - - Dismissed At - - - 0) { ?> - " - class="btn btn-sm btn-dark mb-2" title="Dismiss All"> - - - -
-
-
+ +
+ + "> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + Timestamp + + + + Type + + + + Notification + + + + Dismissed At + + + 0) { ?> + " + class="btn btn-sm btn-dark mb-2" title="Dismiss All"> + + + +
+
+
+ Number @@ -215,7 +215,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); ?>
+ diff --git a/agent/quotes.php b/agent/quotes.php index c624be43a..5e18c0c2f 100644 --- a/agent/quotes.php +++ b/agent/quotes.php @@ -95,7 +95,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); text-nowrap"> - -
+ Number @@ -187,7 +187,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); ?>
+ diff --git a/agent/recurring_expenses.php b/agent/recurring_expenses.php index 6fe34edfc..fcafa6d42 100644 --- a/agent/recurring_expenses.php +++ b/agent/recurring_expenses.php @@ -72,7 +72,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); "> - -
+ Next Date @@ -164,7 +164,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); ?>
+ diff --git a/agent/recurring_invoices.php b/agent/recurring_invoices.php index 3ee9c2f41..fd67c04a4 100644 --- a/agent/recurring_invoices.php +++ b/agent/recurring_invoices.php @@ -115,7 +115,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); text-nowrap"> - -
+ Number @@ -208,7 +208,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); ?>
+ diff --git a/agent/services.php b/agent/services.php index 685cee73d..ff42c4af6 100644 --- a/agent/services.php +++ b/agent/services.php @@ -114,7 +114,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); "> - -
+ Name @@ -165,7 +165,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
+ diff --git a/agent/software.php b/agent/software.php index 7f8fd1adf..ce74433d6 100644 --- a/agent/software.php +++ b/agent/software.php @@ -182,7 +182,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); text-nowrap"> - -
+ Software @@ -296,7 +296,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); ?>
+