diff --git a/admin_document_template.php b/admin_document_template.php
index c2181e93..eec30ac8 100644
--- a/admin_document_template.php
+++ b/admin_document_template.php
@@ -1,27 +1,19 @@
">
|
-
-
+
+
|
-
-
+
+
|
- |
+ |
diff --git a/admin_document_template_details.php b/admin_document_template_details.php
index 355641c2..0d638d55 100644
--- a/admin_document_template_details.php
+++ b/admin_document_template_details.php
@@ -11,19 +11,19 @@ $purifier_config->set('Cache.DefinitionImpl', null); // Disable cache by setting
$purifier_config->set('URI.AllowedSchemes', ['data' => true, 'src' => true, 'http' => true, 'https' => true]);
$purifier = new HTMLPurifier($purifier_config);
-if (isset($_GET['document_id'])) {
- $document_id = intval($_GET['document_id']);
+if (isset($_GET['document_template_id'])) {
+ $document_template_id = intval($_GET['document_template_id']);
}
-$sql_document = mysqli_query($mysqli, "SELECT * FROM documents WHERE document_template = 1 AND document_id = $document_id");
+$sql_document = mysqli_query($mysqli, "SELECT * FROM document_templates WHERE document_template_id = $document_template_id");
$row = mysqli_fetch_array($sql_document);
-$document_name = nullable_htmlentities($row['document_name']);
-$document_description = nullable_htmlentities($row['document_description']);
-$document_content = $purifier->purify($row['document_content']);
-$document_created_at = nullable_htmlentities($row['document_created_at']);
-$document_updated_at = nullable_htmlentities($row['document_updated_at']);
+$document_template_name = nullable_htmlentities($row['document_template_name']);
+$document_template_description = nullable_htmlentities($row['document_template_description']);
+$document_template_content = $purifier->purify($row['document_template_content']);
+$document_template_created_at = nullable_htmlentities($row['document_template_created_at']);
+$document_template_updated_at = nullable_htmlentities($row['document_template_updated_at']);
?>
@@ -37,27 +37,27 @@ $document_updated_at = nullable_htmlentities($row['document_updated_at']);
Document Templates
-
+
diff --git a/ajax/ajax_document_template_edit.php b/ajax/ajax_document_template_edit.php
index 2c3fe1bc..fb69d1c1 100644
--- a/ajax/ajax_document_template_edit.php
+++ b/ajax/ajax_document_template_edit.php
@@ -2,38 +2,38 @@
require_once '../includes/ajax_header.php';
-$document_id = intval($_GET['id']);
+$document_template_id = intval($_GET['id']);
-$sql = mysqli_query($mysqli, "SELECT * FROM documents WHERE document_id = $document_id LIMIT 1");
+$sql = mysqli_query($mysqli, "SELECT * FROM document_templates WHERE document_template_id = $document_template_id LIMIT 1");
$row = mysqli_fetch_array($sql);
-$document_name = nullable_htmlentities($row['document_name']);
-$document_description = nullable_htmlentities($row['document_description']);
-$document_content = nullable_htmlentities($row['document_content']);
+$document_template_name = nullable_htmlentities($row['document_template_name']);
+$document_template_description = nullable_htmlentities($row['document_template_description']);
+$document_template_content = nullable_htmlentities($row['document_template_content']);
// Generate the HTML form content using output buffering.
ob_start();
?>
|