<?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$
-**/
+ *
+ * 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$
+ * @package plugins
+ * @subpackage message_details
+ */
-chdir('..');
-define('SM_PATH','../');
+/** @ignore */
+define('SM_PATH','../../');
/* SquirrelMail required files. */
require_once(SM_PATH . 'include/validate.php');
require_once(SM_PATH . 'functions/strings.php');
require_once(SM_PATH . 'config/config.php');
-
-displayHtmlHeader( _("Message details"),
+displayHtmlHeader( _("Message Details"),
"<script language=\"javascript\">\n".
"<!--\n".
"function printPopup() {\n".
"-->\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()">   '.
- '<input type="button" value="' . _("Close Window") . '" onClick="window.parent.close()">  '.
- '<input type="submit" value="' . _("Save Message") . '"> '.
- '<input type="hidden" name="mailbox" value="'. "$mailbox" . '"> ' .
+ '<center><b>' .
+ '<form action="' . SM_PATH . 'src/download.php" method="GET">' .
+ '<input type="button" value="' . _("Print") . '" onClick="printPopup()" /> '.
+ '<input type="button" value="' . _("Close Window") . '" onClick="window.parent.close()" /> '.
+ '<input type="submit" value="' . _("Save Message") . '" /> '.
+ '<input type="hidden" name="mailbox" value="' . urlencode($mailbox) . '" />' .
+ '<input type="hidden" name="passed_id" value="' . urlencode($passed_id) . '" />' .
+ '<input type="hidden" name="ent_id" value="0" />' .
+ '<input type="hidden" name="absolute_dl" value="true" />' .
'</form>'.
'</b>'.
'</body>'.
"</html>\n";
-?>
\ No newline at end of file
+?>