X-Git-Url: http://git.datanom.net/qtadmin.git/blobdiff_plain/6b3d5ba966ffd150d635a618593295958233baef..e9bc08fcf82464f04a3fc04be9ecbf301bb906ab:/message_view.php?ds=sidebyside diff --git a/message_view.php b/message_view.php index 5228ebb..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; @@ -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'); }