Move always included vars to init.php because it is confusing when not logged in.
[squirrelmail.git] / src / printer_friendly_main.php
index a2842efe4f3295aee7981fa06dc4f8b1203d780d..45050fabdd89b5f2b8200f242afb6fea17763e2a 100644 (file)
@@ -3,20 +3,16 @@
 /**
  * printer_friendly frameset
  *
- * @copyright © 1999-2005 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;
@@ -24,7 +20,7 @@ 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"),$color);
+    error_box(_("Invalid URL"));
 } else {
     $passed_id= (int) $passed_id;
     $view_unsafe_images = (bool) $_GET['view_unsafe_images'];