Fix for security token missing in newmail plugin (#2919418).
[squirrelmail.git] / plugins / message_details / message_details_main.php
index 47257c2d3297d1ba18721c776e6bc738db9347cf..bfe70600e5ea0584601c2f91aa2bfc504b69caeb 100644 (file)
@@ -1,12 +1,13 @@
 <?php
+
 /**
  * Message Details plugin - main frame
  *
  * Plugin to view the RFC822 raw message output and the bodystructure of a message
  *
  * @author Marc Groot Koerkamp
- * @copyright Copyright &copy; 2002 Marc Groot Koerkamp, The Netherlands
- * @copyright Copyright &copy; 2004-2005 The SquirrelMail Project Team
+ * @copyright 2002 Marc Groot Koerkamp, The Netherlands
+ * @copyright 2002-2009 The SquirrelMail Project Team
  * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  * @version $Id$
  * @package plugins
  */
 
 /**
- * Path for SquirrelMail required files.
- * @ignore
+ * Include the SquirrelMail initialization file.
  */
-define('SM_PATH','../../');
-
-/* SquirrelMail required files. */
-require_once(SM_PATH . 'include/validate.php');
+require('../../include/init.php');
 
 displayHtmlHeader( _("Message Details"), '', FALSE );
 
 sqgetGlobalVar('mailbox', $mailbox, SQ_GET);
-sqgetGlobalVar('passed_id', $passed_id, SQ_GET);
+sqgetGlobalVar('passed_id', $passed_id, SQ_GET, NULL, SQ_TYPE_BIGINT);
+if (!sqgetGlobalVar('passed_ent_id', $passed_ent_id, SQ_GET))
+    $passed_ent_id = 0;
 
+//FIXME: Don't echo HTML directly - need to "templatize" this
 echo "<frameset rows=\"60, *\" >\n";
-echo '<frame src="message_details_top.php?mailbox=' . urlencode($mailbox) .'&amp;passed_id=' . "$passed_id".
-    '" name="top_frame" scrolling="no" noresize="noresize" frameborder="0" />';
-echo '<frame src="message_details_bottom.php?mailbox=' . urlencode($mailbox) .
-    '&amp;get_message_details=yes&amp;passed_id=' . "$passed_id" .
-    '" name="bottom_frame" frameborder="0" />';
+echo '<frame src="message_details_top.php?mailbox=' . urlencode($mailbox) .'&amp;passed_id=' . $passed_id 
+    . '&amp;passed_ent_id=' . $passed_ent_id
+    . '" name="top_frame" scrolling="no" noresize="noresize" frameborder="0" />';
+echo '<frame src="message_details_bottom.php?mailbox=' . urlencode($mailbox) 
+    . '&amp;get_message_details=yes&amp;passed_id=' . $passed_id 
+    . '&amp;passed_ent_id=' . $passed_ent_id
+    . '" name="bottom_frame" frameborder="0" />';
 echo  '</frameset>'."\n"."</html>\n";
-?>
\ No newline at end of file