X-Git-Url: http://git.datanom.net/qtadmin.git/blobdiff_plain/3056d1173b4c0225eea764cd1bdfae965b198c14..70c7fd5765720621553b3ddaff1009c795f49a76:/show_headers.php diff --git a/show_headers.php b/show_headers.php index 7cee6dc..34ca065 100644 --- a/show_headers.php +++ b/show_headers.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: 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'); }