diff --git a/admin_mail_queue.php b/admin_mail_queue.php index 841695fc..5259ce96 100644 --- a/admin_mail_queue.php +++ b/admin_mail_queue.php @@ -177,7 +177,12 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); - + 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(); ?> - - - -
- -
-
-
-
From: ($email_from)"; ?>
-
To: ($email_recipient)"; ?>
-
Subject:
-
-
+ -
-
- + MAINTENANCE