From 38a042d4358994dd389fccbb0528170e3399c819 Mon Sep 17 00:00:00 2001 From: johnnyq Date: Wed, 15 Jul 2026 00:12:27 -0400 Subject: [PATCH] Remove _details and use singular filename for certain objects --- admin/{ai_model.php => ai_models.php} | 0 admin/{ai_provider.php => ai_providers.php} | 0 admin/{app_log.php => app_logs.php} | 0 admin/{audit_log.php => audit_logs.php} | 0 admin/{category.php => categories.php} | 0 ...ct_template.php => contract_templates.php} | 0 admin/{custom_link.php => custom_links.php} | 0 admin/document_template.php | 175 +++------ admin/document_template_details.php | 70 ---- admin/document_templates.php | 137 +++++++ ...ty_provider.php => identity_providers.php} | 0 admin/includes/side_nav.php | 2 +- ...payment_method.php => payment_methods.php} | 0 ...ent_provider.php => payment_providers.php} | 0 admin/project_template.php | 349 ++++++++++++------ admin/project_template_details.php | 245 ------------ admin/project_templates.php | 140 +++++++ ...t_method.php => saved_payment_methods.php} | 0 ...re_template.php => software_templates.php} | 0 admin/{tag.php => tags.php} | 0 admin/{tax.php => tax_rates.php} | 0 ...{ticket_status.php => ticket_statuses.php} | 0 admin/ticket_template.php | 243 +++++++----- admin/ticket_template_details.php | 162 -------- admin/ticket_templates.php | 123 ++++++ ...ndor_template.php => vendor_templates.php} | 0 agent/{asset_details.php => asset.php} | 4 +- agent/assets.php | 4 +- agent/client_overview.php | 12 +- agent/clients.php | 2 +- agent/{contact_details.php => contact.php} | 4 +- agent/contacts.php | 12 +- agent/credentials.php | 4 +- agent/dashboard.php | 2 +- agent/{document_details.php => document.php} | 6 +- agent/domains.php | 8 +- agent/files.php | 2 +- agent/global_search.php | 8 +- agent/includes/client_overview_side_nav.php | 2 +- agent/includes/client_side_nav.php | 8 +- agent/includes/side_nav.php | 2 +- agent/post/document.php | 6 +- agent/{project_details.php => project.php} | 0 agent/projects.php | 4 +- agent/racks.php | 2 +- agent/software.php | 2 +- agent/ticket.php | 8 +- agent/ticket_list.php | 2 +- agent/{vendor_details.php => vendor.php} | 0 49 files changed, 875 insertions(+), 875 deletions(-) rename admin/{ai_model.php => ai_models.php} (100%) rename admin/{ai_provider.php => ai_providers.php} (100%) rename admin/{app_log.php => app_logs.php} (100%) rename admin/{audit_log.php => audit_logs.php} (100%) rename admin/{category.php => categories.php} (100%) rename admin/{contract_template.php => contract_templates.php} (100%) rename admin/{custom_link.php => custom_links.php} (100%) delete mode 100644 admin/document_template_details.php create mode 100644 admin/document_templates.php rename admin/{identity_provider.php => identity_providers.php} (100%) rename admin/{payment_method.php => payment_methods.php} (100%) rename admin/{payment_provider.php => payment_providers.php} (100%) delete mode 100644 admin/project_template_details.php create mode 100644 admin/project_templates.php rename admin/{saved_payment_method.php => saved_payment_methods.php} (100%) rename admin/{software_template.php => software_templates.php} (100%) rename admin/{tag.php => tags.php} (100%) rename admin/{tax.php => tax_rates.php} (100%) rename admin/{ticket_status.php => ticket_statuses.php} (100%) delete mode 100644 admin/ticket_template_details.php create mode 100644 admin/ticket_templates.php rename admin/{vendor_template.php => vendor_templates.php} (100%) rename agent/{asset_details.php => asset.php} (99%) rename agent/{contact_details.php => contact.php} (99%) rename agent/{document_details.php => document.php} (98%) rename agent/{project_details.php => project.php} (100%) rename agent/{vendor_details.php => vendor.php} (100%) diff --git a/admin/ai_model.php b/admin/ai_models.php similarity index 100% rename from admin/ai_model.php rename to admin/ai_models.php diff --git a/admin/ai_provider.php b/admin/ai_providers.php similarity index 100% rename from admin/ai_provider.php rename to admin/ai_providers.php diff --git a/admin/app_log.php b/admin/app_logs.php similarity index 100% rename from admin/app_log.php rename to admin/app_logs.php diff --git a/admin/audit_log.php b/admin/audit_logs.php similarity index 100% rename from admin/audit_log.php rename to admin/audit_logs.php diff --git a/admin/category.php b/admin/categories.php similarity index 100% rename from admin/category.php rename to admin/categories.php diff --git a/admin/contract_template.php b/admin/contract_templates.php similarity index 100% rename from admin/contract_template.php rename to admin/contract_templates.php diff --git a/admin/custom_link.php b/admin/custom_links.php similarity index 100% rename from admin/custom_link.php rename to admin/custom_links.php diff --git a/admin/document_template.php b/admin/document_template.php index 76751dc4..6e8503eb 100644 --- a/admin/document_template.php +++ b/admin/document_template.php @@ -1,137 +1,70 @@ set('Cache.DefinitionImpl', null); // Disable cache by setting a non-existent directory or an invalid one +$purifier_config->set('URI.AllowedSchemes', ['data' => true, 'src' => true, 'http' => true, 'https' => true]); +$purifier = new HTMLPurifier($purifier_config); + +if (isset($_GET['document_template_id'])) { + $document_template_id = intval($_GET['document_template_id']); +} + +$sql_document = mysqli_query($mysqli, "SELECT * FROM document_templates WHERE document_template_id = $document_template_id LIMIT 1"); + +if (mysqli_num_rows($sql_document) == 0) { + echo "

Nothing to see here

Go Back
"; + require_once "../includes/footer.php"; + exit(); +} + +$row = mysqli_fetch_assoc($sql_document); + +$document_template_name = escapeHtml($row['document_template_name']); +$document_template_description = escapeHtml($row['document_template_description']); +$document_template_content = $purifier->purify($row['document_template_content']); +$document_template_created_at = escapeHtml($row['document_template_created_at']); +$document_template_updated_at = escapeHtml($row['document_template_updated_at']); ?> + +
-
-

Document Templates

+
+ +

+
-
-
- -
-
- -
- -
-
-
-
- -
- - "> - - - - - - - - - - - - - - - - - - - - -
- - Template Name - - - - Created - - - - Updated - - - Action -
- -
- -
-
-
-
-
-
-
- -
-
- -
-
-
- +
+
- + +set('Cache.DefinitionImpl', null); // Disable cache by setting a non-existent directory or an invalid one -$purifier_config->set('URI.AllowedSchemes', ['data' => true, 'src' => true, 'http' => true, 'https' => true]); -$purifier = new HTMLPurifier($purifier_config); - -if (isset($_GET['document_template_id'])) { - $document_template_id = intval($_GET['document_template_id']); -} - -$sql_document = mysqli_query($mysqli, "SELECT * FROM document_templates WHERE document_template_id = $document_template_id LIMIT 1"); - -if (mysqli_num_rows($sql_document) == 0) { - echo "

Nothing to see here

Go Back
"; - require_once "../includes/footer.php"; - exit(); -} - -$row = mysqli_fetch_assoc($sql_document); - -$document_template_name = escapeHtml($row['document_template_name']); -$document_template_description = escapeHtml($row['document_template_description']); -$document_template_content = $purifier->purify($row['document_template_content']); -$document_template_created_at = escapeHtml($row['document_template_created_at']); -$document_template_updated_at = escapeHtml($row['document_template_updated_at']); - -?> - - - -
-
- -

- -
- -
-
-
- -
-
- - - - + +
+
+

Document Templates

+
+ +
+
+
+ +
+
+ +
+ +
+
+
+
+ +
+ + "> + + + + + + + + + + + + + + + + + + + + +
+ + Template Name + + + + Created + + + + Updated + + + Action +
+ +
+ +
+
+
+
+
+
+
+ +
+
+ +
+
+
+ +
+
+ +