X-Git-Url: http://git.datanom.net/qtadmin.git/blobdiff_plain/8335f35a34539c3d782c804cfc692ab5117ffda2..HEAD:/message_view.php diff --git a/message_view.php b/message_view.php index fabf698..93cc339 100644 --- a/message_view.php +++ b/message_view.php @@ -11,12 +11,17 @@ $id = $_GET['id']; $id = urldecode($id); + $mail = unserialize($_SESSION['mailInfo'][$id]); + + if (! is_object($mail) || false == $util->authorized($mail->recipient)) { + header('Location: qtadmin.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; @@ -90,7 +95,7 @@ echo ''; echo $util->getFooter(); } else if ($loggedIn) { - header('Location: index.php'); + header('Location: qtadmin.php'); } else { header('Location: auth.php'); }