X-Git-Url: http://git.datanom.net/qtadmin.git/blobdiff_plain/b95d1cdbc4fe25e3f0df3b94e990f6af7b330c63..2b099ad2fc3663697e45dd16f4b82341e0267c86:/message_view.php?ds=inline diff --git a/message_view.php b/message_view.php index 751b65b..aa276d8 100644 --- a/message_view.php +++ b/message_view.php @@ -5,18 +5,23 @@ 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']; $id = urldecode($id); + $mail = unserialize($_SESSION['mailInfo'][$id]); + + if (! is_object($mail) || false == $util->authorized($mail->recipient)) { + header('Location: index.php'); + exit; + } + $util->setHeading("Message ID : $id"); echo $util->getHeader(); echo $util->getHeading(); - $mail = unserialize($_SESSION['mailInfo'][$id]); - $row = $DB->getMail($id); $string = $row->mail_text; $sa_tests = null; @@ -35,7 +40,7 @@ onclick="javascript: history.back();"/>'; echo ''; - echo '