Centralized init
[squirrelmail.git] / src / printer_friendly_main.php
index 6dc1bca5e1f0c52751fe1450c866ac8744c9108e..fa6de8f44d51cd8c9a303cc5ac6716c2cc630ea2 100644 (file)
@@ -3,20 +3,16 @@
 /**
  * printer_friendly frameset
  *
- * @copyright (c) 1999-2004 The SquirrelMail Project Team
+ * @copyright © 1999-2006 The SquirrelMail Project Team
  * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  * @version $Id$
  * @package squirrelmail
  */
 
 /**
- * Path for SquirrelMail required files.
- * @ignore
+ * Include the SquirrelMail initialization file.
  */
-define('SM_PATH','../');
-
-/* SquirrelMail required files. */
-require_once(SM_PATH . 'include/validate.php');
+include('../include/init.php');
 
 /* get those globals into gear */
 global $color;
@@ -27,6 +23,8 @@ if ( ! sqgetGlobalVar('mailbox',$mailbox,SQ_GET) ||
     error_box(_("Invalid URL"),$color);
 } else {
     $passed_id= (int) $passed_id;
+    $view_unsafe_images = (bool) $_GET['view_unsafe_images'];
+    sqgetGlobalVar('show_html_default', $show_html_default, SQ_FORM);
 /* end globals */
     displayHtmlHeader( _("Printer Friendly"), '', false, true );
     echo '<frameset rows="60, *">' . "\n";
@@ -35,8 +33,11 @@ if ( ! sqgetGlobalVar('mailbox',$mailbox,SQ_GET) ||
     echo '<frame src="printer_friendly_bottom.php?passed_ent_id='
         . urlencode($passed_ent_id) . '&amp;mailbox=' . urlencode($mailbox)
         . '&amp;passed_id=' . $passed_id
+        . '&amp;view_unsafe_images='.$view_unsafe_images
+        . '&amp;show_html_default='.$show_html_default
         . '" name="bottom_frame" frameborder="0" />' . "\n";
     echo "</frameset>\n";
 }
+
 ?>
-</html>
\ No newline at end of file
+</html>