Add compatibility with Dovecot's bigint UIDs
[squirrelmail.git] / plugins / message_details / message_details_main.php
index 1300d23e60fd49fffddb6ad543885b03ecf0b4ba..5abe46cc0c771e643ced4bb6a9afeaaaf28bfcd9 100644 (file)
@@ -1,27 +1,39 @@
 <?php
-/** Message Source  
+
+/**
+ * Message Details plugin - main frame
  *
  * Plugin to view the RFC822 raw message output and the bodystructure of a message
  *
- * Copyright (c) 2002 Marc Groot Koerkamp, The Netherlands
- * Licensed under the GNU GPL. For full terms see the file COPYING.
- * 
- * $Id$
+ * @author Marc Groot Koerkamp
+ * @copyright &copy; 2002 Marc Groot Koerkamp, The Netherlands
+ * @copyright &copy; 2002-2007 The SquirrelMail Project Team
+ * @license http://opensource.org/licenses/gpl-license.php GNU Public License
+ * @version $Id$
+ * @package plugins
+ * @subpackage message_details
  */
 
-/* Path for SquirrelMail required files. */
-chdir('..');
-define('SM_PATH','../');
+/**
+ * Include the SquirrelMail initialization file.
+ */
+require('../../include/init.php');
 
-/* SquirrelMail required files. */
-require_once(SM_PATH . 'include/validate.php');
-require_once(SM_PATH . 'functions/page_header.php');
-require_once(SM_PATH . 'functions/strings.php');
+displayHtmlHeader( _("Message Details"), '', FALSE );
 
-displayHtmlHeader( _("Message details"), '', FALSE );
+sqgetGlobalVar('mailbox', $mailbox, 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;
 
-echo "<frameset rows=\"60, *\" noresize border=\"0\">\n";
-echo '<frame src="message_details_top.php?mailbox=' . urlencode($mailbox) .'&passed_id=' . "$passed_id". '" name="top_frame" scrolling="off">';
-echo '<frame src="message_details_bottom.php?mailbox=' . urlencode($mailbox) .'&passed_id=' . "$passed_id" . '" name="bottom_frame">';
+//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 
+    . '&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";
 ?>