<?php
-/* vim: set ts=4 tw=4 sw=4 noet: */
+/* vim: set ts=4 tw=0 sw=4 noet: */
require_once 'Mail/mimeDecode.php';
require_once 'config.php';
require_once $CFG->root . 'lib/db_factory.php';
$util = new Utils;
$loggedIn = $util->isLoggedIn();
if ($loggedIn && isset($_GET['id'])) {
+ $id = $_GET['id'];
+ $mail = unserialize($_SESSION['mailInfo'][$id]);
+
+ if (! is_object($mail) || false == $util->authorized($mail->recipient)) {
+ header('Location: index.php');
+ exit;
+ }
+
$util->setHeading('Spam Report');
echo $util->getHeader();
echo $util->getHeading();
- $id = $_GET['id'];
- $mail = unserialize($_SESSION['mailInfo'][$id]);
-
$row = $DB->getMail($id);
$string = $row->mail_text;
$sa_tests = null;
} else {
$bayes['total'] = "<tr><td class=\"label\">TOTAL</td><td class=\"value\">-</td></tr>";
}
- $plain = "?id=$id&format=plain";
- $html = "?id=$id&format=html";
+ $plain = "?id=$id&format=plain";
+ $html = "?id=$id&format=html";
echo '<p class="ruler">Message ID : ' . $mail->mail_id . '</p>';
echo '<table class="button-menu">';
echo '<tr class="button-row">';