PHP 5.3 deprecated ereg() function (#2820952)
[squirrelmail.git] / plugins / message_details / message_details_top.php
index 27fd6407f544fd62295805f7b1da207ca1bfe457..ec2bfb30e9c7fb5c35e31d11fdf706bee88d9761 100644 (file)
@@ -7,7 +7,7 @@
  *
  * @author Marc Groot Koerkamp
  * @copyright © 2002 Marc Groot Koerkamp, The Netherlands
- * @copyright © 2002-2006 The SquirrelMail Project Team
+ * @copyright © 2002-2009 The SquirrelMail Project Team
  * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  * @version $Id$
  * @package plugins
@@ -30,7 +30,9 @@ displayHtmlHeader( _("Message Details"),
              "-->\n".
              "</script>\n", FALSE );
 
-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;
 sqgetGlobalVar('mailbox', $mailbox, SQ_GET);
 
 echo "<body text=\"$color[8]\" bgcolor=\"$color[3]\" link=\"$color[7]\" vlink=\"$color[7]\" alink=\"$color[7]\">\n" .
@@ -38,12 +40,12 @@ echo "<body text=\"$color[8]\" bgcolor=\"$color[3]\" link=\"$color[7]\" vlink=\"
      addForm(SM_PATH . 'src/download.php', 'GET').
      addHidden('mailbox', $mailbox).
      addHidden('passed_id', $passed_id).
-     addHidden('ent_id', '0').
+     addHidden('ent_id', $passed_ent_id).
      addHidden('absolute_dl', 'true').
+     (checkForJavascript() ?
      '<input type="button" value="' . _("Print") . '" onclick="printPopup()" />&nbsp;&nbsp;'.
-     '<input type="button" value="' . _("Close Window") . '" onclick="window.parent.close()" />&nbsp;&nbsp;'.
+     '<input type="button" value="' . _("Close Window") . '" onclick="window.parent.close()" />&nbsp;&nbsp;' :'').
      addSubmit(_("Save Message")).
      '</form></div>'.
      '</body>'.
      "</html>\n";
-?>
\ No newline at end of file