]> git.datanom.net - qtadmin.git/blobdiff - mail_report.php
More functions for wblist page
[qtadmin.git] / mail_report.php
index bc7c05e7fea5f42dbee985141438e77f077e3e01..3607ba2e1c8772ae34353e1b298b821fef2e81c8 100644 (file)
@@ -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('Spam 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;
@@ -89,8 +94,8 @@
         } else {
             $bayes['total'] = "<tr><td class=\"label\">TOTAL</td><td class=\"value\">-</td></tr>";
         }
-        $plain = "?id=$id&format=plain";
-        $html = "?id=$id&format=html";
+        $plain = "?id=$id&amp;format=plain";
+        $html = "?id=$id&amp;format=html";
         echo '<p class="ruler">Message ID : ' . $mail->mail_id . '</p>';
         echo '<table class="button-menu">';
         echo '<tr class="button-row">';
         echo '</table>';
         echo $util->getFooter();
     } else if ($loggedIn) {
-        header('Location: index.php');
+        header('Location: qtadmin.php');
     } else {
         header('Location: auth.php');
     }
This page took 0.029842 seconds and 5 git commands to generate.