-
+
diff --git a/admin_mail_queue_message_view.php b/ajax/ajax_admin_mail_queue_message_view.php
similarity index 59%
rename from admin_mail_queue_message_view.php
rename to ajax/ajax_admin_mail_queue_message_view.php
index 2204a2d0..6e16384a 100644
--- a/admin_mail_queue_message_view.php
+++ b/ajax/ajax_admin_mail_queue_message_view.php
@@ -1,24 +1,18 @@
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['email_id'])) {
- $email_id = intval($_GET['email_id']);
-} else {
- echo "You dont belong here";
- exit();
-}
-
-$sql = mysqli_query($mysqli, "SELECT * FROM email_queue WHERE email_id = $email_id");
-
+$sql = mysqli_query($mysqli, "SELECT * FROM email_queue WHERE email_id = $email_id LIMIT 1");
$row = mysqli_fetch_array($sql);
$email_from = nullable_htmlentities($row['email_from']);
@@ -42,37 +36,22 @@ if ($email_status == 0) {
$email_status_display = "
Sent
$email_sent_at";
}
+// Build the dynamic modal title
+$title = "$email_subject";
+
+// Generate the HTML form content using output buffering.
+ob_start();
?>
-
-
-
diff --git a/js/generic_modal_loader.js b/js/generic_modal_loader.js
index 6643abe0..67752f46 100644
--- a/js/generic_modal_loader.js
+++ b/js/generic_modal_loader.js
@@ -1,12 +1,16 @@
// Generic Ajax Modal Load Script
//
-/*Trigger Button using data-ajax attributes -->
-
+/* Example Triggering -->
+
+
+
*/
$(document).on('click', '[data-toggle="ajax-modal"]', function (e) {
e.preventDefault();
@@ -15,6 +19,7 @@ $(document).on('click', '[data-toggle="ajax-modal"]', function (e) {
var $trigger = $(this);
var ajaxUrl = $trigger.data('ajax-url');
var ajaxId = $trigger.data('ajax-id');
+ var modalSize = $trigger.data('modal-size') || 'md';
// Make the AJAX call to fetch modal content.
$.ajax({
@@ -38,7 +43,7 @@ $(document).on('click', '[data-toggle="ajax-modal"]', function (e) {
// Build the modal HTML using the returned title and content.
var modalHtml =
'