updating pot
[squirrelmail.git] / src / printer_friendly_main.php
index 2a1d78d72d8902badfe480d9f548bd5daa6af30a..45050fabdd89b5f2b8200f242afb6fea17763e2a 100644 (file)
@@ -1,42 +1,43 @@
 <?php
 
 /**
- * printer_friendly_main.php
+ * printer_friendly frameset
  *
- * Copyright (c) 1999-2002 The SquirrelMail Project Team
- * Licensed under the GNU GPL. For full terms see the file COPYING.
- *
- * $Id$
+ * @copyright &copy; 1999-2006 The SquirrelMail Project Team
+ * @license http://opensource.org/licenses/gpl-license.php GNU Public License
+ * @version $Id$
+ * @package squirrelmail
  */
 
-/*****************************************************************/
-/*** THIS FILE NEEDS TO HAVE ITS FORMATTING FIXED!!!           ***/
-/*** PLEASE DO SO AND REMOVE THIS COMMENT SECTION.             ***/
-/***    + Base level indent should begin at left margin, as    ***/
-/***      the require_once below looks.                        ***/
-/***    + All identation should consist of four space blocks   ***/
-/***    + Tab characters are evil.                             ***/
-/***    + all comments should use "slash-star ... star-slash"  ***/
-/***      style -- no pound characters, no slash-slash style   ***/
-/***    + FLOW CONTROL STATEMENTS (if, while, etc) SHOULD      ***/
-/***      ALWAYS USE { AND } CHARACTERS!!!                     ***/
-/***    + Please use ' instead of ", when possible. Note "     ***/
-/***      should always be used in _( ) function calls.        ***/
-/*** Thank you for your help making the SM code more readable. ***/
-/*****************************************************************/
-
-require_once('../src/validate.php');
-require_once('../functions/page_header.php');
-
-    displayHtmlHeader( _("Printer Friendly"), '', FALSE );
+/**
+ * Include the SquirrelMail initialization file.
+ */
+include('../include/init.php');
 
-    echo "<frameset rows=\"50, *\" noresize border=\"0\">\n".
-         "<frame src=\"printer_friendly_top.php\" name=\"top_frame\" scrolling=\"off\">".
-         '<frame src="printer_friendly_bottom.php?passed_ent_id=';
-    echo $passed_ent_id . '&mailbox=' . urlencode($mailbox) .
-         '&passed_id=' . $passed_id;
-    echo "\" name=\"bottom_frame\">".
-         "</frameset>\n".
-         "</html>\n";
+/* get those globals into gear */
+global $color;
+if ( ! sqgetGlobalVar('passed_ent_id',$passed_ent_id,SQ_GET))
+    $passed_ent_id = 0;
+if ( ! sqgetGlobalVar('mailbox',$mailbox,SQ_GET) ||
+     ! sqgetGlobalVar('passed_id',$passed_id,SQ_GET)) {
+    error_box(_("Invalid URL"));
+} 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";
+    echo '<frame src="printer_friendly_top.php" name="top_frame" '
+        . 'scrolling="no" noresize="noresize" frameborder="0" />' . "\n";
+    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>