Centralized init
[squirrelmail.git] / src / view_html.php
index 0763b191560bd499b54a0996e183a45f1361826d..b33bd79c226b9e818d6465eab32c6cf90f45bbb5 100644 (file)
  */
 
 /**
- * Path for SquirrelMail required files.
- * @ignore
+ * Include the SquirrelMail initialization file.
  */
-define('SM_PATH','../');
+require('../include/init.php');
 
 /** SquirrelMail required files. */
-include_once(SM_PATH . 'include/validate.php');
-include_once(SM_PATH . 'functions/imap.php');
+require_once(SM_PATH . 'functions/imap.php');
+require_once(SM_PATH . 'functions/mime.php');
+require_once(SM_PATH . 'functions/date.php');
 
 /** Get globals */
 sqgetGlobalVar('key',        $key,          SQ_COOKIE);
@@ -78,5 +78,4 @@ $body = MagicHTML( $body, $passed_id, $message, $mailbox);
 /** TODO: charset might be part of html code. */
 header('Content-Type: text/html; charset=' . $charset);
 echo $body;
-
 ?>
\ No newline at end of file