X-Git-Url: http://git.datanom.net/qtadmin.git/blobdiff_plain/7ef22e2126b630156852e59acdb9d54283ab3462..HEAD:/message_view.php diff --git a/message_view.php b/message_view.php index c65a0f5..93cc339 100644 --- a/message_view.php +++ b/message_view.php @@ -1,5 +1,5 @@ root . 'lib/db_factory.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; @@ -35,7 +40,7 @@ onclick="javascript: history.back();"/>'; echo ''; - echo ''; + echo '
'; $from = $headers['from']; $from = str_replace("<", "<", $from); $from = str_replace(">", ">", $from); @@ -90,7 +95,7 @@ echo '
'; echo $util->getFooter(); } else if ($loggedIn) { - header('Location: index.php'); + header('Location: qtadmin.php'); } else { header('Location: auth.php'); }