X-Git-Url: http://git.datanom.net/qtadmin.git/blobdiff_plain/7ef22e2126b630156852e59acdb9d54283ab3462..0da9e6e7d82b2cb758626d1ee4eb6b3297d667b1:/mail_report.php diff --git a/mail_report.php b/mail_report.php index 42233d2..f8ff4ac 100644 --- a/mail_report.php +++ b/mail_report.php @@ -1,5 +1,5 @@ root . 'lib/db_factory.php'; @@ -8,13 +8,18 @@ $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; @@ -89,8 +94,8 @@ } else { $bayes['total'] = "
Message ID : ' . $mail->mail_id . '
'; echo '