removed includes that are already loaded by include/validate.php.
[squirrelmail.git] / plugins / message_details / message_details_top.php
index 8e97c09c1586281496a895efd9a5bd38c3bdd952..9655f7662ff8adf31c84ff62a245830df44653ff 100644 (file)
@@ -1,21 +1,26 @@
 <?php
-/** Message Source  
-*
-* 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$
-**/
+/**
+ * Message Details plugin - top frame with buttons  
+ *
+ * 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 The SquirrelMail Project Team
+ * @license http://opensource.org/licenses/gpl-license.php GNU Public License
+ * @version $Id$
+ * @package plugins
+ * @subpackage message_details
+ */
 
-    chdir('..');
-    require_once ('../src/validate.php');
-    require_once ('../functions/strings.php');
-    require_once ('../config/config.php');
+/** @ignore */
+define('SM_PATH','../../');
 
+/* SquirrelMail required files. */
+require_once(SM_PATH . 'include/validate.php');
+require_once(SM_PATH . 'functions/forms.php');
 
-displayHtmlHeader( _("Message details"),
+displayHtmlHeader( _("Message Details"),
              "<script language=\"javascript\">\n".
              "<!--\n".
              "function printPopup() {\n".
@@ -25,16 +30,21 @@ displayHtmlHeader( _("Message details"),
              "-->\n".
              "</script>\n", FALSE );
 
+sqgetGlobalVar('passed_id', $passed_id, SQ_GET);
+sqgetGlobalVar('mailbox', $mailbox, SQ_GET);
 
 echo "<body text=\"$color[8]\" bgcolor=\"$color[3]\" link=\"$color[7]\" vlink=\"$color[7]\" alink=\"$color[7]\">\n" .
-     '<center><b>'.
-     '<FORM name=rfc822 action="message_details_download.php?savemessage=1&passed_id='."$passed_id".'" METHOD=POST>' .     
-     '<input type="button" value="' . _("Print") . '" onClick="printPopup()">&nbsp&nbsp '.
-     '<input type="button" value="' . _("Close Window") . '" onClick="window.parent.close()">&nbsp&nbsp'.
-     '<input type="submit" value="' . _("Save Message") . '"> '.
-     '<input type="hidden" name="mailbox" value="'. "$mailbox" . '"> ' .
+     '<center><b>' .
+     addForm(SM_PATH . 'src/download.php', 'GET').
+     addHidden('mailbox', $mailbox).
+     addHidden('passed_id', $passed_id).
+     addHidden('ent_id', '0').
+     addHidden('absolute_dl', 'true').
+     '<input type="button" value="' . _("Print") . '" onClick="printPopup()" />&nbsp;&nbsp;'.
+     '<input type="button" value="' . _("Close Window") . '" onClick="window.parent.close()" />&nbsp;&nbsp;'.
+     addSubmit(_("Save Message")).
      '</form>'.
      '</b>'.
      '</body>'.
      "</html>\n";
-?>
\ No newline at end of file
+?>