add PAGE_NAME constant to every page under src/.
[squirrelmail.git] / src / printer_friendly_top.php
index 3e7376d28a30e3da9e0e007bc3d4e0cc41e57bd8..2473f1a55346d15ca063947b61534b2eaec45bfa 100644 (file)
@@ -1,54 +1,28 @@
 <?php
 
-  /**
-   **  printer_friendly_top.php
  **
-   **  Copyright (c) 1999-2000 The SquirrelMail development team
-   **  Licensed under the GNU GPL. For full terms see the file COPYING.
  **
-   **  top frame of printer_friendly_main.php
-   **  displays some javascript buttons for printing & closing
-   **
-   **  $Id$
  **/
+/**
+ * printer_friendly top frame
+ *
+ * top frame of printer_friendly_main.php
+ * displays some javascript buttons for printing & closing
+ *
+ * @copyright &copy; 1999-2007 The SquirrelMail Project Team
+ * @license http://opensource.org/licenses/gpl-license.php GNU Public License
+ * @version $Id$
+ * @package squirrelmail
+ */
 
-    require_once('../src/validate.php');
-    require_once('../functions/strings.php');
-    require_once('../config/config.php');
-    require_once('../src/load_prefs.php');
+/** This is the printer_friendly_top page */
+define('PAGE_NAME', 'printer_friendly_top');
 
-?>
-<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">
-<html>
-  <head>
-  <script language="javascript">
-  <!--
-    function printPopup() {
-        parent.frames[1].focus();
-        parent.frames[1].print();
-    }
-  -->
-  </script>
-  </head>
-<?php
+/**
+ * Include the SquirrelMail initialization file.
+ */
+include('../include/init.php');
 
-    if ($theme_css != "")
-    {
-        printf ('<LINK REL="stylesheet" TYPE="text/css" HREF="%s">', $theme_css);
-        echo "\n";
-    }
+displayHtmlHeader( _("Printer Friendly"));
+$oErrorHandler->setDelayedErrors(true);
 
+$oTemplate->display('printer_friendly_top.tpl');
 
-    printf('<body text="%s" bgcolor="%s" link="%s" vlink="%s" alink="%s">',
-        $color[8], $color[3], $color[7], $color[7], $color[7]);
-?>
-    <table width="100%" height="100%" cellpadding="0" cellspacing="0" border="0"><tr><td valign="middle" align="center">
-      <b>
-      <form>
-      <input type="button" value="Print" onClick="printPopup()">
-      <input type="button" value="Close Window" onClick="window.parent.close()">
-      </form>
-      </b>
-    </td></tr></table>
-  </body>
-</html>
+$oTemplate->display('footer.tpl');