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 +
+ +
+ +
+
+
+
+
+
+
+ +
+
+ +
+
+
+ +
+
+ +