X-Git-Url: http://git.datanom.net/qtadmin.git/blobdiff_plain/b95d1cdbc4fe25e3f0df3b94e990f6af7b330c63..3039de292a8f75426d4b2c0ea70a00b75bda5b02:/mail_report.php diff --git a/mail_report.php b/mail_report.php index 55b7ac4..60405f7 100644 --- a/mail_report.php +++ b/mail_report.php @@ -5,16 +5,21 @@ require_once $CFG->root . 'lib/db_factory.php'; require_once $CFG->root . 'lib/utils.inc.php'; - $util = Utils::getInstance(); + $util = new Utils; $loggedIn = $util->isLoggedIn(); if ($loggedIn && isset($_GET['id'])) { + $id = $_GET['id']; + $mail = unserialize($_SESSION['mailInfo'][$id]); + + if (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'] = "TOTAL-"; } - $plain = "?id=$id&format=plain"; - $html = "?id=$id&format=html"; + $plain = "?id=$id&format=plain"; + $html = "?id=$id&format=html"; echo '

Message ID : ' . $mail->mail_id . '

'; echo ''; echo '';