mirror of https://github.com/itflow-org/itflow
Move View Queue Message away from a modal as tables tend to break the modal causing distorted view, more ui work for this to come
This commit is contained in:
parent
0c62ce169f
commit
a6a763c24c
|
|
@ -6,14 +6,6 @@ $order = "DESC";
|
|||
|
||||
require_once "inc_all_admin.php";
|
||||
|
||||
|
||||
//Initialize the HTML Purifier to prevent XSS
|
||||
require "plugins/htmlpurifier/HTMLPurifier.standalone.php";
|
||||
|
||||
$purifier_config = HTMLPurifier_Config::createDefault();
|
||||
$purifier_config->set('URI.AllowedSchemes', ['data' => true, 'src' => true, 'http' => true, 'https' => true]);
|
||||
$purifier = new HTMLPurifier($purifier_config);
|
||||
|
||||
//Rebuild URL
|
||||
$url_query_strings_sort = http_build_query($get_copy);
|
||||
|
||||
|
|
@ -104,7 +96,6 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||
$email_recipient = nullable_htmlentities($row['email_recipient']);
|
||||
$email_recipient_name = nullable_htmlentities($row['email_recipient_name']);
|
||||
$email_subject = nullable_htmlentities($row['email_subject']);
|
||||
$email_content = $purifier->purify($row['email_content']);
|
||||
$email_attempts = intval($row['email_attempts']);
|
||||
$email_queued_at = nullable_htmlentities($row['email_queued_at']);
|
||||
$email_failed_at = nullable_htmlentities($row['email_failed_at']);
|
||||
|
|
@ -131,7 +122,9 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||
<td><?php echo $email_status_display; ?></td>
|
||||
<td><?php echo $email_attempts; ?></td>
|
||||
<td>
|
||||
<button class="btn btn-sm btn-secondary" data-toggle="modal" data-target="#viewEmailModal<?php echo $email_id; ?>"><i class="fas fa-fw fa-eye"></i></button>
|
||||
<a class="btn btn-sm btn-secondary" href="admin_mail_queue_message_view.php?email_id=<?php echo $email_id; ?>">
|
||||
<i class="fas fa-fw fa-eye"></i>
|
||||
</a>
|
||||
|
||||
<!-- Show force resend if all retries have failed -->
|
||||
<?php if ($email_status == 2 && $email_attempts > 3) { ?>
|
||||
|
|
@ -146,22 +139,6 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||
</td>
|
||||
</tr>
|
||||
|
||||
<div class="modal" id="viewEmailModal<?php echo $email_id; ?>" tabindex="-1">
|
||||
<div class="modal-dialog modal-xl ">
|
||||
<div class="modal-content bg-dark">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title"><i class="fa fa-fw fa-envelope-open mr-2"></i>ID: <?php echo "$email_id - $email_subject"; ?></h5>
|
||||
<button type="button" class="close text-white" data-dismiss="modal">
|
||||
<span>×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body bg-white">
|
||||
<?php echo $email_content; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,77 @@
|
|||
<?php
|
||||
|
||||
require_once "inc_all_admin.php";
|
||||
|
||||
//Initialize the HTML Purifier to prevent XSS
|
||||
require "plugins/htmlpurifier/HTMLPurifier.standalone.php";
|
||||
|
||||
$purifier_config = HTMLPurifier_Config::createDefault();
|
||||
$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");
|
||||
|
||||
$row = mysqli_fetch_array($sql);
|
||||
|
||||
$email_from = nullable_htmlentities($row['email_from']);
|
||||
$email_from_name = nullable_htmlentities($row['email_from_name']);
|
||||
$email_recipient = nullable_htmlentities($row['email_recipient']);
|
||||
$email_recipient_name = nullable_htmlentities($row['email_recipient_name']);
|
||||
$email_subject = nullable_htmlentities($row['email_subject']);
|
||||
$email_content = $purifier->purify($row['email_content']);
|
||||
$email_attempts = intval($row['email_attempts']);
|
||||
$email_queued_at = nullable_htmlentities($row['email_queued_at']);
|
||||
$email_failed_at = nullable_htmlentities($row['email_failed_at']);
|
||||
$email_sent_at = nullable_htmlentities($row['email_sent_at']);
|
||||
$email_status = intval($row['email_status']);
|
||||
if ($email_status == 0) {
|
||||
$email_status_display = "<div class='text-primary'>Queued</div>";
|
||||
} elseif($email_status == 1) {
|
||||
$email_status_display = "<div class='text-warning'>Sending</div>";
|
||||
} elseif($email_status == 2) {
|
||||
$email_status_display = "<div class='text-danger'>Failed</div><small class='text-secondary'>$email_failed_at</small>";
|
||||
} else {
|
||||
$email_status_display = "<div class='text-success'>Sent</div><small class='text-secondary'>$email_sent_at</small>";
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<ol class="breadcrumb d-print-none">
|
||||
<li class="breadcrumb-item">
|
||||
<a href="admin_users.php"><i class="fas fa-fw fa-user-shield mr-2"></i>Admin</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item">
|
||||
<a href="admin_mail_queue.php"><i class="fas fa-fw fa-mail-bulk mr-2"></i>Mail Queue</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item active"><i class="fas fa-fw fa-envelope-open mr-2"></i><?php echo $email_subject; ?></li>
|
||||
</ol>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-12">
|
||||
<div class="card">
|
||||
<div class="card-header bg-dark">
|
||||
<div>From: <?php echo "$email_from_name <small>($email_from)</small>"; ?></div>
|
||||
<div>To: <?php echo "$email_recipient_name <small>($email_recipient)</small>"; ?></div>
|
||||
<div>Subject: <?php echo $email_subject; ?></div>
|
||||
</div>
|
||||
<div class="card-body prettyContent">
|
||||
<?php echo $email_content; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script src="js/pretty_content.js"></script>
|
||||
|
||||
<?php
|
||||
|
||||
require_once "footer.php";
|
||||
|
|
@ -112,7 +112,7 @@
|
|||
<li class="nav-header mt-3">MAINTENANCE</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a href="admin_mail_queue.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "admin_mail_queue.php") {
|
||||
<a href="admin_mail_queue.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "admin_mail_queue.php" || basename($_SERVER["PHP_SELF"]) == "admin_mail_queue_message_view.php") {
|
||||
echo "active";
|
||||
} ?>">
|
||||
<i class="nav-icon fas fa-mail-bulk"></i>
|
||||
|
|
|
|||
Loading…
Reference in New Issue