X-Git-Url: http://git.datanom.net/qtadmin.git/blobdiff_plain/b95d1cdbc4fe25e3f0df3b94e990f6af7b330c63..HEAD:/show_headers.php diff --git a/show_headers.php b/show_headers.php index e1bef17..34ca065 100644 --- a/show_headers.php +++ b/show_headers.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 (! is_object($mail) || false == $util->authorized($mail->recipient)) { + header('Location: qtadmin.php'); + exit; + } + $util->setHeading('Full Headers 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; @@ -51,7 +56,7 @@ echo $output; echo $util->getFooter(); } else if ($loggedIn) { - header('Location: index.php'); + header('Location: qtadmin.php'); } else { header('Location: auth.php'); }