Moving some HTML out of PHP
[squirrelmail.git] / src / printer_friendly_main.php
index 95a19c3074a784b4c4aa3d0793003b4a67dc34b9..b8493e23a6cc9ba5182da8e93e85084b13e45ceb 100644 (file)
@@ -1,26 +1,38 @@
 <?php
 
-  /**
-   **  printer_friendly_main.php
-   **
-   **  Copyright (c) 1999-2001 The SquirrelMail development team
-   **  Licensed under the GNU GPL. For full terms see the file COPYING.
-   **
-   **  $Id$
-   **/
+/**
+ * printer_friendly_main.php
+ *
+ * Copyright (c) 1999-2004 The SquirrelMail Project Team
+ * Licensed under the GNU GPL. For full terms see the file COPYING.
+ *
+ * @version $Id$
+ * @package squirrelmail
+ */
 
-    require_once('../src/validate.php');
-    require_once('../functions/page_header.php');
+/**
+ * Path for SquirrelMail required files.
+ * @ignore
+ */
+define('SM_PATH','../');
 
-    displayHtmlHeader( _("Printer Friendly"), '', FALSE );
+/* SquirrelMail required files. */
+require_once(SM_PATH . 'include/validate.php');
+require_once(SM_PATH . 'functions/page_header.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";
+displayHtmlHeader( _("Printer Friendly"), '', FALSE );
 
+/* get those globals into gear */
+$passed_ent_id = $_GET['passed_ent_id'];
+$passed_id = (int) $_GET['passed_id'];
+$mailbox = $_GET['mailbox'];
+/* end globals */
 ?>
+<frameset rows="60, *" noresize="noresize" border="0">
+    <frame src="printer_friendly_top.php" name="top_frame" scrolling="no" />
+    <frame src="printer_friendly_bottom.php?passed_ent_id=<?php
+        echo urlencode($passed_ent_id) . '&amp;mailbox=' . urlencode($mailbox) .
+             '&amp;passed_id=' . $passed_id;
+        ?>" name="bottom_frame" />
+</frameset>
+</html>