Part 1 of switch to use of SM_PATH with require_once.
authorthomppj <thomppj@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 6 Sep 2002 00:19:37 +0000 (00:19 +0000)
committerthomppj <thomppj@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 6 Sep 2002 00:19:37 +0000 (00:19 +0000)
Feel free to convert things in functions/, class/, plugins/, etc too. I
have everything in src/ done.

git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@3577 7612ce4b-ef26-0410-bec9-ea0150e637f0

41 files changed:
src/addrbook_popup.php
src/addrbook_search.php
src/addrbook_search_html.php
src/addressbook.php
src/compose.php
src/delete_message.php
src/download.php
src/draft_actions.php
src/empty_trash.php
src/folders.php
src/folders_create.php
src/folders_delete.php
src/folders_rename_do.php
src/folders_rename_getname.php
src/folders_subscribe.php
src/help.php
src/image.php
src/left_main.php
src/load_prefs.php
src/login.php
src/move_messages.php
src/options.php
src/options_folder.php
src/options_highlight.php
src/options_identities.php
src/options_order.php
src/options_personal.php
src/printer_friendly_bottom.php
src/printer_friendly_main.php
src/printer_friendly_top.php
src/read_body.php
src/redirect.php
src/retrievalerror.php
src/right_main.php
src/search.php
src/signout.php
src/validate.php
src/vcard.php
src/view_header.php
src/view_text.php
src/webmail.php

index c38a379aa423fe9edcb1e872cb96a1cdc5bf4018..c45976272589b13a675b5052af320fd8a5484fff 100644 (file)
  * $Id$
  */
 
-require_once('../src/validate.php');
-require_once('../functions/addressbook.php');
+/* Path for SquirrelMail required files. */
+define('SM_PATH','../');
+
+/* SquirrelMail required files. */
+require_once(SM_PATH . 'src/validate.php');
+require_once(SM_PATH . 'functions/addressbook.php');
    
 ?>
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN">
index 7fd7ee8e44eec45c7ffa7b13e5f6be48404771d7..e6beddef3e6369fa9f13a71f77946816a8296696 100644 (file)
  * $Id$
  */
 
-require_once('../src/validate.php');
-require_once('../functions/strings.php');
-require_once('../functions/html.php');
+/* Path for SquirrelMail required files. */
+define('SM_PATH','../');
+
+/* SquirrelMail required files. */
+require_once(SM_PATH . 'src/validate.php');
+require_once(SM_PATH . 'functions/strings.php');
+require_once(SM_PATH . 'functions/html.php');
 
 /* Function to include JavaScript code */
 function insert_javascript() {
index 54de9f8ff27c002704a2beb7c7e6e63ce4b83ae1..0614557903b4652feebd32af7cd67fcd626852ef 100644 (file)
  * $Id$
  */
 
-require_once('../src/validate.php');
-require_once('../functions/date.php');
-require_once('../functions/smtp.php');
-require_once('../functions/display_messages.php');
-require_once('../functions/addressbook.php');
-require_once('../functions/plugin.php');
-require_once('../functions/strings.php');
-require_once('../functions/html.php');
+/* Path for SquirrelMail required files. */
+define('SM_PATH','../');
+
+/* SquirrelMail required files. */
+require_once(SM_PATH . 'src/validate.php');
+require_once(SM_PATH . 'functions/date.php');
+require_once(SM_PATH . 'functions/smtp.php');
+require_once(SM_PATH . 'functions/display_messages.php');
+require_once(SM_PATH . 'functions/addressbook.php');
+require_once(SM_PATH . 'functions/plugin.php');
+require_once(SM_PATH . 'functions/strings.php');
+require_once(SM_PATH . 'functions/html.php');
 
 /* Insert hidden data */
 function addr_insert_hidden() {
index 9f8e039e6da044b11671ad102b4e8bb96bef1813..5f2907bbcd8a678c9c8adaa9ab90282c6d4bd66a 100644 (file)
  * $Id$
  */
 
-require_once('../src/validate.php');
-require_once('../functions/array.php');
-require_once('../functions/display_messages.php');
-require_once('../functions/addressbook.php');
-require_once('../functions/strings.php');
-require_once('../functions/html.php');
+/* Path for SquirrelMail required files. */
+define('SM_PATH','../');
+
+/* SquirrelMail required files. */
+require_once(SM_PATH . 'src/validate.php');
+require_once(SM_PATH . 'functions/array.php');
+require_once(SM_PATH . 'functions/display_messages.php');
+require_once(SM_PATH . 'functions/addressbook.php');
+require_once(SM_PATH . 'functions/strings.php');
+require_once(SM_PATH . 'functions/html.php');
 
 /* Make an input field */
 function adressbook_inp_field($label, $field, $name, $size, $values, $add) {
index 73ff63fba381d79e6482db0b7a98d530c1d21f05..b0b8257b7795ab6ad1c0dc5c0d5c90ee08e165c2 100644 (file)
  * $Id$
  */
 
-require_once('../src/validate.php');
-require_once('../functions/imap.php');
-require_once('../functions/date.php');
-require_once('../functions/mime.php');
-//require_once('../functions/smtp.php');
-require_once('../functions/plugin.php');
-require_once('../functions/display_messages.php');
-require_once('../class/deliver/Deliver.class.php');
+/* Path for SquirrelMail required files. */
+define('SM_PATH','../');
+
+/* SquirrelMail required files. */
+require_once(SM_PATH . 'src/validate.php');
+require_once(SM_PATH . 'functions/imap.php');
+require_once(SM_PATH . 'functions/date.php');
+require_once(SM_PATH . 'functions/mime.php');
+//require_once(SM_PATH . 'functions/smtp.php');
+require_once(SM_PATH . 'functions/plugin.php');
+require_once(SM_PATH . 'functions/display_messages.php');
+require_once(SM_PATH . 'class/deliver/Deliver.class.php');
 
 /* --------------------- Specific Functions ------------------------------ */
 
@@ -1206,7 +1210,7 @@ function sendMessage($composeMessage, $draft=false) {
     $composeMessage->rfc822_header = $rfc822_header;
 
     if (!$useSendmail && !$draft) {
-       require_once('../class/deliver/Deliver_SMTP.class.php');
+       require_once(SM_PATH . 'class/deliver/Deliver_SMTP.class.php');
        $deliver = new Deliver_SMTP();
        global $smtpServerAddress, $smtpPort, $use_authenticated_smtp, $pop_before_smtp;
        if ($use_authenticated_smtp) {
@@ -1221,18 +1225,18 @@ function sendMessage($composeMessage, $draft=false) {
        $stream = $deliver->initStream($composeMessage,$domain,0,
                          $smtpServerAddress, $smtpPort, $authPop);
     } elseif (!$draft) {
-       require_once('../class/deliver/Deliver_SendMail.class.php');
+       require_once(SM_PATH . 'class/deliver/Deliver_SendMail.class.php');
        global $sendmail_path;
        $deliver = new Deliver_SendMail();
        $stream = $deliver->initStream($composeMessage,$sendmail_path);
     } elseif ($draft) {
        global $draft_folder;
-       require_once('../class/deliver/Deliver_IMAP.class.php');
+       require_once(SM_PATH . 'class/deliver/Deliver_IMAP.class.php');
        $imap_deliver = new Deliver_IMAP();
        $imap_stream = sqimap_login($username, $key, $imapServerAddress,
                       $imapPort, 0);
        if (sqimap_mailbox_exists ($imap_stream, $draft_folder)) {
-           require_once('../class/deliver/Deliver_IMAP.class.php');
+           require_once(SM_PATH . 'class/deliver/Deliver_IMAP.class.php');
            $imap_deliver = new Deliver_IMAP();
            $length = $imap_deliver->mail($composeMessage);
            sqimap_append ($imap_stream, $draft_folder, $length);        
@@ -1258,7 +1262,7 @@ function sendMessage($composeMessage, $draft=false) {
         $imapPort, 0);
        if (sqimap_mailbox_exists ($imap_stream, $sent_folder)) {
            sqimap_append ($imap_stream, $sent_folder, $length);
-           require_once('../class/deliver/Deliver_IMAP.class.php');
+           require_once(SM_PATH . 'class/deliver/Deliver_IMAP.class.php');
            $imap_deliver = new Deliver_IMAP();
            $imap_deliver->mail($composeMessage, $imap_stream);
            sqimap_append_done ($imap_stream);
index 7cc08b1cf2924f7b340844f918c238d95f7493c8..711a665a3256427b627c15ea7b7eaf6d0d027ee2 100644 (file)
  * $Id$
  */
 
-require_once('../src/validate.php');
-require_once('../functions/display_messages.php');
-require_once('../functions/imap.php');
+/* Path for SquirrelMail required files. */
+define('SM_PATH','../');
+
+/* SquirrelMail required files. */
+require_once(SM_PATH . 'src/validate.php');
+require_once(SM_PATH . 'functions/display_messages.php');
+require_once(SM_PATH . 'functions/imap.php');
 
 $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);
 
index 7778bb7385124e622523222db5b4e9b582c0860d..f3ec5775088afd33780acad9f0eb5a01256abfbe 100644 (file)
  * $Id$
  */
 
-require_once('../src/validate.php');
-require_once('../functions/imap.php');
-require_once('../functions/mime.php');
+/* Path for SquirrelMail required files. */
+define('SM_PATH','../');
+
+/* SquirrelMail required files. */
+require_once(SM_PATH . 'src/validate.php');
+require_once(SM_PATH . 'functions/imap.php');
+require_once(SM_PATH . 'functions/mime.php');
 
 header('Pragma: ');
 header('Cache-Control: cache');
index 1bb549ad299630da98d68be4e47c2bc5489f6a4d..b6c0afd4b24e8df89db4eb390159bda0502dc72e 100644 (file)
@@ -9,7 +9,11 @@
  * $Id$
  */
 
-require_once ('../src/validate.php');
+/* Path for SquirrelMail required files. */
+define('SM_PATH','../');
+
+/* SquirrelMail required files. */
+require_once(SM_PATH . 'src/validate.php');
 
 /* Print all the needed RFC822 headers */
 function write822HeaderForDraft ($fp, $t, $c, $b, $subject, $more_headers, $session) {
index 18d89d94ec35777a19a41b29967ac010280b8955..c3d79a59da529631cee1ce2d324c490e7fdeba70 100644 (file)
  * $Id$
  */
 
-require_once('../src/validate.php');
-require_once('../functions/display_messages.php');
-require_once('../functions/imap.php');
-require_once('../functions/array.php');
-require_once('../functions/tree.php');
+/* Path for SquirrelMail required files. */
+define('SM_PATH','../');
+
+/* SquirrelMail required files. */
+require_once(SM_PATH . 'src/validate.php');
+require_once(SM_PATH . 'functions/display_messages.php');
+require_once(SM_PATH . 'functions/imap.php');
+require_once(SM_PATH . 'functions/array.php');
+require_once(SM_PATH . 'functions/tree.php');
 
 $imap_stream = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);
 
index 69ee1a29e9a6a78c6183e32c934732116ac75816..c01063617d000f655c541f1783684037d0b81794 100644 (file)
  * $Id$
  */
 
-require_once('../src/validate.php');
-require_once('../functions/imap_utf7_decode_local.php');
-require_once('../functions/imap.php');
-require_once('../functions/array.php');
-require_once('../functions/plugin.php');
-require_once('../functions/html.php');
+/* Path for SquirrelMail required files. */
+define('SM_PATH','../');
+
+/* SquirrelMail required files. */
+require_once(SM_PATH . 'src/validate.php');
+require_once(SM_PATH . 'functions/imap_utf7_decode_local.php');
+require_once(SM_PATH . 'functions/imap.php');
+require_once(SM_PATH . 'functions/array.php');
+require_once(SM_PATH . 'functions/plugin.php');
+require_once(SM_PATH . 'functions/html.php');
 
 displayPageHeader($color, 'None');
 
index d3309f68120250581d4ec0d02c093fa8efdc36c4..3a5da96008baa2117b71f097e977870a3c21499b 100644 (file)
  * $Id$
  */
 
-require_once('../src/validate.php');
-require_once('../functions/imap.php');
-require_once('../functions/display_messages.php');
+/* Path for SquirrelMail required files. */
+define('SM_PATH','../');
+
+/* SquirrelMail required files. */
+require_once(SM_PATH . 'src/validate.php');
+require_once(SM_PATH . 'functions/imap.php');
+require_once(SM_PATH . 'functions/display_messages.php');
 
 $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);
 global $delimiter;
index 6775f677667f786d857779b62919d732e29c2b54..fd501b89e6a899cfd325bc9bceda5e096a54ef17 100644 (file)
  * $Id$
  */
 
-
-require_once('../src/validate.php');
-require_once('../functions/imap.php');
-require_once('../functions/array.php');
-require_once('../functions/tree.php');
-require_once('../functions/display_messages.php');
+/* Path for SquirrelMail required files. */
+define('SM_PATH','../');
+
+/* SquirrelMail required files. */
+require_once(SM_PATH . 'src/validate.php');
+require_once(SM_PATH . 'functions/imap.php');
+require_once(SM_PATH . 'functions/array.php');
+require_once(SM_PATH . 'functions/tree.php');
+require_once(SM_PATH . 'functions/display_messages.php');
 
 /*
 *  Incoming values:
index 79175d1b379224f1d83a15d5ec62c98f1ab9d088..2918ea58f4017f8df8d03346aac727696dc5c319 100644 (file)
 
 global $delimiter, $base_uri;
 
-require_once('../src/validate.php');
-require_once('../functions/imap.php');
+/* Path for SquirrelMail required files. */
+define('SM_PATH','../');
+
+/* SquirrelMail required files. */
+require_once(SM_PATH . 'src/validate.php');
+require_once(SM_PATH . 'functions/imap.php');
 
 $new_name = trim($new_name);
 
index 633c3ea50cbff748cd6f3baa631f0f7c509b8ef1..ab147e2b4832c9cf9bac51bc46f0c847a8df95a0 100644 (file)
 
 global $delimiter;
 
-require_once('../src/validate.php');
-require_once('../functions/imap.php');
-require_once('../functions/html.php');
+/* Path for SquirrelMail required files. */
+define('SM_PATH','../');
+
+/* SquirrelMail required files. */
+require_once(SM_PATH . 'src/validate.php');
+require_once(SM_PATH . 'functions/imap.php');
+require_once(SM_PATH . 'functions/html.php');
 
 if ($old == '') {
     displayPageHeader($color, 'None');
index ae7eb17900aa60a972b5aa825b92d0b8cf185f7c..f49f56234cac1648b8c55fc51669aac13f3bf63f 100644 (file)
  * $Id$
  */
 
-require_once('../src/validate.php');
-require_once('../functions/imap.php');
-require_once('../functions/display_messages.php');
+/* Path for SquirrelMail required files. */
+define('SM_PATH','../');
+
+/* SquirrelMail required files. */
+require_once(SM_PATH . 'src/validate.php');
+require_once(SM_PATH . 'functions/imap.php');
+require_once(SM_PATH . 'functions/display_messages.php');
 
 $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);
 
index 3c3d838745c960f5b83a388b632eb583ab182bf4..e72d3bc42e571f9e509a2dbbbb15273e9282499f 100644 (file)
  * $Id$
  */
 
-require_once('../src/validate.php');
-require_once('../functions/display_messages.php');
-require_once('../functions/imap.php');
-require_once('../functions/array.php');
+/* Path for SquirrelMail required files. */
+define('SM_PATH','../');
+
+/* SquirrelMail required files. */
+require_once(SM_PATH . 'src/validate.php');
+require_once(SM_PATH . 'functions/display_messages.php');
+require_once(SM_PATH . 'functions/imap.php');
+require_once(SM_PATH . 'functions/array.php');
 
 displayPageHeader($color, 'None' );
 
index 776549db8118e25506c5abf3c5276d1f8800757d..ca830b59422dae480e4488d6494b219264a2bdc3 100644 (file)
  * $Id$
  */
 
-require_once('../src/validate.php');
-require_once('../functions/date.php');
-require_once('../functions/page_header.php');
-require_once('../functions/html.php');
-require_once('../src/load_prefs.php');
+/* Path for SquirrelMail required files. */
+define('SM_PATH','../');
+
+/* SquirrelMail required files. */
+require_once(SM_PATH . 'src/validate.php');
+require_once(SM_PATH . 'functions/date.php');
+require_once(SM_PATH . 'functions/page_header.php');
+require_once(SM_PATH . 'functions/html.php');
+require_once(SM_PATH . 'src/load_prefs.php');
 
 displayPageHeader($color, 'None');
 
index 16f8bd4fef4c70262b41ce83d208cae5f38172de..6b9190589d984dc7851e956cb53f0c6eb571f816 100644 (file)
  * $Id$
  */
 
-require_once('../src/validate.php');
-require_once('../functions/array.php');
-require_once('../functions/imap.php');
-require_once('../functions/plugin.php');
-require_once('../functions/page_header.php');
-require_once('../functions/html.php');
+/* Path for SquirrelMail required files. */
+define('SM_PATH','../');
+
+/* SquirrelMail required files. */
+require_once(SM_PATH . 'src/validate.php');
+require_once(SM_PATH . 'functions/array.php');
+require_once(SM_PATH . 'functions/imap.php');
+require_once(SM_PATH . 'functions/plugin.php');
+require_once(SM_PATH . 'functions/page_header.php');
+require_once(SM_PATH . 'functions/html.php');
 
 /* These constants are used for folder stuff. */
 define('SM_BOX_UNCOLLAPSED', 0);
index 0e8f7a9d197b58aebedb5bf67c95449374ebc8de..965c6c11fcfadc1c298511660bb9eca1d530ec76 100644 (file)
  * $Id$
  */
 
-require_once('../src/validate.php');
-require_once('../functions/prefs.php');
-require_once('../functions/plugin.php');
-require_once('../functions/constants.php');
+/* Path for SquirrelMail required files. */
+define('SM_PATH','../');
+
+/* SquirrelMail required files. */
+require_once(SM_PATH . 'src/validate.php');
+require_once(SM_PATH . 'functions/prefs.php');
+require_once(SM_PATH . 'functions/plugin.php');
+require_once(SM_PATH . 'functions/constants.php');
 
 $username = ( !isset($username) ? '' : $username );
 
index dd73704f69a6504119d72a40de2ce88dfad0987a..d87f7497578a56f692767eb5ad06945260c71dc1 100644 (file)
  * $Id$
  */
 
-require_once('../functions/strings.php');
-require_once('../config/config.php');
-require_once('../functions/i18n.php');
-require_once('../functions/plugin.php');
-require_once('../functions/constants.php');
-require_once('../functions/page_header.php');
-require_once('../functions/html.php');
+/* Path for SquirrelMail required files. */
+define('SM_PATH','../');
+
+/* SquirrelMail required files. */
+require_once(SM_PATH . 'functions/strings.php');
+require_once(SM_PATH . 'config/config.php');
+require_once(SM_PATH . 'functions/i18n.php');
+require_once(SM_PATH . 'functions/plugin.php');
+require_once(SM_PATH . 'functions/constants.php');
+require_once(SM_PATH . 'functions/page_header.php');
+require_once(SM_PATH . 'functions/html.php');
 
 /*
  * $squirrelmail_language is set by a cookie when the user selects
@@ -30,7 +34,7 @@ set_up_language($squirrelmail_language, TRUE);
  * Find out the base URI to set cookies.
  */
 if (!function_exists('sqm_baseuri')){
-    require_once('../functions/display_messages.php');
+    require_once(SM_PATH . 'functions/display_messages.php');
 }
 $base_uri = sqm_baseuri();
 @session_destroy();
index 121a18cc876d0e13fa9c297bd60694c38e96676c..2188ef88447ec9d3aba3a79027b4f1db619df39a 100644 (file)
  * $Id$
  */
 
-require_once('../src/validate.php');
-require_once('../functions/display_messages.php');
-require_once('../functions/imap.php');
-require_once('../functions/html.php');
+/* Path for SquirrelMail required files. */
+define('SM_PATH','../');
+
+/* SquirrelMail required files. */
+require_once(SM_PATH . 'src/validate.php');
+require_once(SM_PATH . 'functions/display_messages.php');
+require_once(SM_PATH . 'functions/imap.php');
+require_once(SM_PATH . 'functions/html.php');
+
 global $compose_new_win;
 
 function putSelectedMessagesIntoString($msg) {
index d913187f1f3db61723d2d38c34dd6cf280c60f60..65fd9cdb65b71107dd31e7a1e0262995910e86a4 100644 (file)
  * $Id$
  */
 
-require_once('../src/validate.php');
-require_once('../functions/display_messages.php');
-require_once('../functions/imap.php');
-require_once('../functions/array.php');
-require_once('../functions/options.php');
-require_once('../functions/strings.php');
-require_once('../functions/html.php');
+/* Path for SquirrelMail required files. */
+define('SM_PATH','../');
+
+/* SquirrelMail required files. */
+require_once(SM_PATH . 'src/validate.php');
+require_once(SM_PATH . 'functions/display_messages.php');
+require_once(SM_PATH . 'functions/imap.php');
+require_once(SM_PATH . 'functions/array.php');
+require_once(SM_PATH . 'functions/options.php');
+require_once(SM_PATH . 'functions/strings.php');
+require_once(SM_PATH . 'functions/html.php');
 
 /*********************************/
 /*** Build the resultant page. ***/
index 3ee491017ee85e37ce2f8a12c51bf9e3da96986f..f103cbc96794e8d69fbce239cccd636c55fe84e4 100644 (file)
  * $Id$
  */
 
-require_once('../functions/imap.php');
+/* Path for SquirrelMail required files. */
+define('SM_PATH','../');
+
+/* SquirrelMail required files. */
+require_once(SM_PATH . 'functions/imap.php');
 
 /* Define the group constants for the folder options page. */   
 define('SMOPT_GRP_SPCFOLDER', 0);
index 0739a1be419bee1b8f63c32dcd83dac98d89e0dc..b429ab0573c93d51486ae2ec614484c82bd5f0b5 100644 (file)
  * $Id$
  */
 
-require_once('../src/validate.php');
-require_once('../functions/display_messages.php');
-require_once('../functions/imap.php');
-require_once('../functions/array.php');
-require_once('../functions/plugin.php');
-require_once('../functions/strings.php');
-require_once('../functions/html.php');
+/* Path for SquirrelMail required files. */
+define('SM_PATH','../');
+
+/* SquirrelMail required files. */
+require_once(SM_PATH . 'src/validate.php');
+require_once(SM_PATH . 'functions/display_messages.php');
+require_once(SM_PATH . 'functions/imap.php');
+require_once(SM_PATH . 'functions/array.php');
+require_once(SM_PATH . 'functions/plugin.php');
+require_once(SM_PATH . 'functions/strings.php');
+require_once(SM_PATH . 'functions/html.php');
 
 function oh_opt( $val, $sel, $tit ) {
     echo "<option value=\"$val\"";
index 25e087ae5d89a4527fc720b3038240cca756ad51..91560c79e45e2f01e2898caf1292b1acac6452a8 100644 (file)
  * $Id$
  */
 
-require_once('../src/validate.php');
-require_once('../functions/display_messages.php');
-require_once('../functions/html.php');
+/* Path for SquirrelMail required files. */
+define('SM_PATH','../');
+
+/* SquirrelMail required files. */
+require_once(SM_PATH . 'src/validate.php');
+require_once(SM_PATH . 'functions/display_messages.php');
+require_once(SM_PATH . 'functions/html.php');
 
     if (isset($return)) {
        SaveUpdateFunction();
@@ -337,4 +341,4 @@ function ShowTableInfo($full_name, $email_address, $reply_to, $signature, $post)
 
     return ($return_val);
 }
-?>
\ No newline at end of file
+?>
index 2f64907e927cbbfc0289aff5cb46ec40be2b6351..cb26a7452a8b2dd3d65bca9806879032d554a1d6 100644 (file)
  * $Id$
  */
 
-require_once('../src/validate.php');
-require_once('../functions/display_messages.php');
-require_once('../functions/imap.php');
-require_once('../functions/array.php');
-require_once('../functions/plugin.php');
-require_once('../functions/html.php');
+/* Path for SquirrelMail required files. */
+define('SM_PATH','../');
+
+/* SquirrelMail required files. */
+require_once(SM_PATH . 'src/validate.php');
+require_once(SM_PATH . 'functions/display_messages.php');
+require_once(SM_PATH . 'functions/imap.php');
+require_once(SM_PATH . 'functions/array.php');
+require_once(SM_PATH . 'functions/plugin.php');
+require_once(SM_PATH . 'functions/html.php');
 
 if (! isset($action)) { $action = ''; }
 if ($action == 'delete' && isset($theid)) {
index dae0c92b7cae51585bd432cf84c96ca976f6b94c..c91b21791073387b2d809430cfbf6a951108d664 100644 (file)
  * $Id$
  */
 
-require_once('../functions/imap.php');
-require_once('../functions/array.php');
+/* Path for SquirrelMail required files. */
+define('SM_PATH','../');
+
+/* SquirrelMail required files. */
+require_once(SM_PATH . 'functions/imap.php');
+require_once(SM_PATH . 'functions/array.php');
 
 /* Define the group constants for the personal options page. */
 define('SMOPT_GRP_CONTACT', 0);
index 9e8aba7d62ef665b523030f14f3b98c242201c45..bbab3b79e31c6d5c0881bb0c9085a5aaf16afc48 100644 (file)
  * $Id$
  */
 
-require_once('../src/validate.php');
-require_once('../functions/strings.php');
-require_once('../config/config.php');
-require_once('../src/load_prefs.php');
-require_once('../functions/imap.php');
-require_once('../functions/page_header.php');
-require_once('../functions/html.php');
+/* Path for SquirrelMail required files. */
+define('SM_PATH','../');
+
+/* SquirrelMail required files. */
+require_once(SM_PATH . 'src/validate.php');
+require_once(SM_PATH . 'functions/strings.php');
+require_once(SM_PATH . 'config/config.php');
+require_once(SM_PATH . 'src/load_prefs.php');
+require_once(SM_PATH . 'functions/imap.php');
+require_once(SM_PATH . 'functions/page_header.php');
+require_once(SM_PATH . 'functions/html.php');
 
 $pf_cleandisplay = getPref($data_dir, $username, 'pf_cleandisplay');
 $mailbox = urldecode($mailbox);
index 3013c5a66ca5cb873c94e5fe5a2c5851975943bf..29e5eb8fb8bc8d6245dacdb0501caf03da95ee74 100644 (file)
@@ -9,8 +9,12 @@
  * $Id$
  */
 
-require_once('../src/validate.php');
-require_once('../functions/page_header.php');
+/* Path for SquirrelMail required files. */
+define('SM_PATH','../');
+
+/* SquirrelMail required files. */
+require_once(SM_PATH . 'src/validate.php');
+require_once(SM_PATH . 'functions/page_header.php');
 
 displayHtmlHeader( _("Printer Friendly"), '', FALSE );
 
index 7375ac86b790ad39655e511e1cc9538a38303d6d..6fe4da1be5dfb5429d76a9a7ca6d6a2315c465e3 100644 (file)
  * $Id$
  */
 
-require_once('../src/validate.php');
-require_once('../functions/strings.php');
-require_once('../config/config.php');
-require_once('../src/load_prefs.php');
-require_once('../functions/page_header.php');
-require_once('../functions/html.php');
+/* Path for SquirrelMail required files. */
+define('SM_PATH','../');
+
+/* SquirrelMail required files. */
+require_once(SM_PATH . 'src/validate.php');
+require_once(SM_PATH . 'functions/strings.php');
+require_once(SM_PATH . 'config/config.php');
+require_once(SM_PATH . 'src/load_prefs.php');
+require_once(SM_PATH . 'functions/page_header.php');
+require_once(SM_PATH . 'functions/html.php');
 
 displayHtmlHeader( _("Printer Friendly"),
              "<script language=\"javascript\" type=\"text/javascript\">\n".
index 33a5d6bfcbd3c630306ecd108a83f6fbcbab14c2..102b683532ab00996124c5652e6a46070ed5399c 100644 (file)
  * $Id$
  */
 
-require_once('../src/validate.php');
-require_once('../functions/imap.php');
-require_once('../functions/mime.php');
-require_once('../functions/date.php');
-require_once('../functions/url_parser.php');
-require_once('../functions/html.php');
+/* Path for SquirrelMail required files. */
+define('SM_PATH','../');
+
+/* SquirrelMail required files. */
+require_once(SM_PATH . 'src/validate.php');
+require_once(SM_PATH . 'functions/imap.php');
+require_once(SM_PATH . 'functions/mime.php');
+require_once(SM_PATH . 'functions/date.php');
+require_once(SM_PATH . 'functions/url_parser.php');
+require_once(SM_PATH . 'functions/html.php');
 
 /**
  * Given an IMAP message id number, this will look it up in the cached
@@ -272,7 +276,7 @@ function SendMDN ( $mailbox, $passed_id, $sender, $message, $imapConnection) {
 
 
     if (!$useSendmail) {
-       require_once('../class/deliver/Deliver_SMTP.class.php');
+       require_once(SM_PATH . 'class/deliver/Deliver_SMTP.class.php');
        $deliver = new Deliver_SMTP();
        global $smtpServerAddress, $smtpPort, $use_authenticated_smtp, $pop_before_smtp;
        if ($use_authenticated_smtp) {
@@ -287,7 +291,7 @@ function SendMDN ( $mailbox, $passed_id, $sender, $message, $imapConnection) {
        $stream = $deliver->initStream($composeMessage,$domain,0,
                          $smtpServerAddress, $smtpPort, $authPop);
     } else {
-       require_once('../class/deliver/Deliver_SendMail.class.php');
+       require_once(SM_PATH . 'class/deliver/Deliver_SendMail.class.php');
        global $sendmail_path;
        $deliver = new Deliver_SendMail();
        $stream = $deliver->initStream($composeMessage,$sendmail_path);
@@ -299,13 +303,13 @@ function SendMDN ( $mailbox, $passed_id, $sender, $message, $imapConnection) {
     }
     if (!$succes) {
         $msg  = $deliver->dlv_msg . '<br>Server replied: '.$deliver->dlv_ret_nr;
-       require_once('../functions/display_messages.php');
+       require_once(SM_PATH . 'functions/display_messages.php');
         plain_error_message($msg, $color);
     } else {
         unset ($deliver);
        if (sqimap_mailbox_exists ($imapConnection, $sent_folder)) {
            sqimap_append ($imapConnection, $sent_folder, $length);
-           require_once('../class/deliver/Deliver_IMAP.class.php');
+           require_once(SM_PATH . 'class/deliver/Deliver_IMAP.class.php');
            $imap_deliver = new Deliver_IMAP();
            $imap_deliver->mail($composeMessage, $imapConnection);
            sqimap_append_done ($imapConnection);
index 826e21dec05a057f0cccbfd24fca42f0d9714fea..31b73adf39d606864cbd9c1df5526ad9c1d1de9a 100644 (file)
 * $Id$
 */
 
-require_once('../functions/i18n.php');
-require_once('../functions/strings.php');
-require_once('../config/config.php');
-require_once('../functions/prefs.php');
-require_once('../functions/imap.php');
-require_once('../functions/plugin.php');
-require_once('../functions/constants.php');
-require_once('../functions/page_header.php');
-require_once('../functions/global.php');
+/* Path for SquirrelMail required files. */
+define('SM_PATH','../');
+
+/* SquirrelMail required files. */
+require_once(SM_PATH . 'functions/i18n.php');
+require_once(SM_PATH . 'functions/strings.php');
+require_once(SM_PATH . 'config/config.php');
+require_once(SM_PATH . 'functions/prefs.php');
+require_once(SM_PATH . 'functions/imap.php');
+require_once(SM_PATH . 'functions/plugin.php');
+require_once(SM_PATH . 'functions/constants.php');
+require_once(SM_PATH . 'functions/page_header.php');
+require_once(SM_PATH . 'functions/global.php');
 
 // Remove slashes if PHP added them
 if (get_magic_quotes_gpc()) {
@@ -38,7 +42,7 @@ if (get_magic_quotes_gpc()) {
 /* Before starting the session, the base URI must be known. Assuming */
 /* that this file is in the src/ subdirectory (or something).        */
 if (!function_exists('sqm_baseuri')){
-    require_once('../functions/display_messages.php');
+    require_once(SM_PATH . 'functions/display_messages.php');
 }
 $base_uri = sqm_baseuri();
 
@@ -197,4 +201,4 @@ function attachment_common_parse($str, $debug) {
 }
 
 
-?>
\ No newline at end of file
+?>
index 9f9bbacedfc2e7aaaf9eccf694ddfa0c07ff59fe..2bfc9c865fa03390cc017799e9f4d9107d91e1eb 100644 (file)
  * $Id$
  */
 
-require_once('../src/validate.php');
-require_once('../functions/imap.php');
-require_once('../functions/smtp.php');
-require_once('../functions/page_header.php');
-require_once('../src/load_prefs.php');
+/* Path for SquirrelMail required files. */
+define('SM_PATH','../');
+
+/* SquirrelMail required files. */
+require_once(SM_PATH . 'src/validate.php');
+require_once(SM_PATH . 'functions/imap.php');
+require_once(SM_PATH . 'functions/smtp.php');
+require_once(SM_PATH . 'functions/page_header.php');
+require_once(SM_PATH . 'src/load_prefs.php');
 
 $destination = 'retrievalerror@squirrelmail.org';
 $attachments = array();
index fb68c39281d7740ca234857a4125f17583916049..aadcc70e8f12f7eae553240e0baf6122c22de7e7 100644 (file)
  * $Id$
  */
 
-require_once('../src/validate.php');
-require_once('../functions/imap.php');
-require_once('../functions/date.php');
-require_once('../functions/array.php');
-require_once('../functions/mime.php');
-require_once('../functions/mailbox_display.php');
-require_once('../functions/display_messages.php');
-require_once('../functions/html.php');
+/* Path for SquirrelMail required files. */
+define('SM_PATH','../');
+
+/* SquirrelMail required files. */
+require_once(SM_PATH . 'src/validate.php');
+require_once(SM_PATH . 'functions/imap.php');
+require_once(SM_PATH . 'functions/date.php');
+require_once(SM_PATH . 'functions/array.php');
+require_once(SM_PATH . 'functions/mime.php');
+require_once(SM_PATH . 'functions/mailbox_display.php');
+require_once(SM_PATH . 'functions/display_messages.php');
+require_once(SM_PATH . 'functions/html.php');
 
 /***********************************************************
  * incoming variables from URL:                            *
index 5c2a865ce21188f5f0ed3edc2a1c7c81a67088b1..01be5ff14f02b923fbb5c3f9e03be66adfb7d239 100644 (file)
@@ -9,12 +9,16 @@
  * $Id$
  */
 
-require_once('../src/validate.php');
-require_once('../functions/imap.php');
-require_once('../functions/imap_search.php');
-require_once('../functions/imap_mailbox.php');
-require_once('../functions/array.php');
-require_once('../functions/strings.php');
+/* Path for SquirrelMail required files. */
+define('SM_PATH','../');
+
+/* SquirrelMail required files. */
+require_once(SM_PATH . 'src/validate.php');
+require_once(SM_PATH . 'functions/imap.php');
+require_once(SM_PATH . 'functions/imap_search.php');
+require_once(SM_PATH . 'functions/imap_mailbox.php');
+require_once(SM_PATH . 'functions/array.php');
+require_once(SM_PATH . 'functions/strings.php');
 
 global $allow_thread_sort;
 
index 706088f9207a1a94a090fc25c0b0e8c30a5e8f4b..151a5d7f0aeab5781defb59fa331abfe159abc5e 100644 (file)
  * $Id$
  */
 
-require_once('../src/validate.php');
-require_once('../functions/prefs.php');
-require_once('../functions/plugin.php');
-require_once('../functions/strings.php');
-require_once('../functions/html.php');
+/* Path for SquirrelMail required files. */
+define('SM_PATH','../');
+
+/* SquirrelMail required files. */
+require_once(SM_PATH . 'src/validate.php');
+require_once(SM_PATH . 'functions/prefs.php');
+require_once(SM_PATH . 'functions/plugin.php');
+require_once(SM_PATH . 'functions/strings.php');
+require_once(SM_PATH . 'functions/html.php');
 
 /* Erase any lingering attachments */
 if (isset($attachments) && is_array($attachments) 
@@ -37,7 +41,7 @@ if (!isset($frame_top)) {
  * because it was deleted with the session. */
 if (!isset($base_uri)) {
     if (!function_exists('sqm_baseuri')){
-        require_once('../functions/display_messages.php');
+        require_once(SM_PATH . 'functions/display_messages.php');
     }
     $base_uri = sqm_baseuri();
 }
@@ -87,4 +91,4 @@ html_tag( 'table',
 'center', $color[4], 'width="50%" cols="1" cellpadding="2" cellspacing="0" border="0"' )
 ?>
 </body>
-</html>
\ No newline at end of file
+</html>
index 12c26191ba7d3808eece7932471102a649425046..69e0994df376ba7c71462876861c0efe2188669f 100644 (file)
  * messages with a session_register.
  */
  
-require_once('../class/mime.class.php');
+/* Path for SquirrelMail required files. */
+define('SM_PATH','../');
+
+/* SquirrelMail required files. */
+require_once(SM_PATH . 'class/mime.class.php');
 
 session_start();
 
-require_once('../functions/i18n.php');
-require_once('../functions/auth.php');
-require_once('../functions/strings.php');
-require_once('../functions/global.php');
+require_once(SM_PATH . 'functions/i18n.php');
+require_once(SM_PATH . 'functions/auth.php');
+require_once(SM_PATH . 'functions/strings.php');
+require_once(SM_PATH . 'functions/global.php');
 
 is_logged_in();
 
@@ -77,10 +81,10 @@ global $theme;
 unset($theme);
 $theme=array();
 
-require_once('../config/config.php');
-require_once('../src/load_prefs.php');
-require_once('../functions/page_header.php');
-require_once('../functions/prefs.php');
+require_once(SM_PATH . 'config/config.php');
+require_once(SM_PATH . 'src/load_prefs.php');
+require_once(SM_PATH . 'functions/page_header.php');
+require_once(SM_PATH . 'functions/prefs.php');
 
 /* Set up the language (i18n.php was included by auth.php). */
 global $username, $data_dir;
index 21b5133861802312ba463d9d5d6a5c76b39d9dec..213711aa7bfca7ff8edbe63e23dc4135bd07abcd 100644 (file)
  * $Id$
  */
 
-require_once('../src/validate.php');
-require_once('../functions/date.php');
-require_once('../functions/page_header.php');
-require_once('../functions/mime.php');
-require_once('../src/load_prefs.php');
+/* Path for SquirrelMail required files. */
+define('SM_PATH','../');
+
+/* SquirrelMail required files. */
+require_once(SM_PATH . 'src/validate.php');
+require_once(SM_PATH . 'functions/date.php');
+require_once(SM_PATH . 'functions/page_header.php');
+require_once(SM_PATH . 'functions/mime.php');
+require_once(SM_PATH . 'src/load_prefs.php');
 
 $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);
 sqimap_mailbox_select($imapConnection, $mailbox);
index 2cf9d1faf8ed8e29a369f09986a97f27920f7683..96f2e99efb992d2b12fc95eb2a6d829b099abe28 100644 (file)
  *
  * $Id$
  */
-require_once('../src/validate.php');
-require_once('../functions/imap.php');
-require_once('../functions/html.php');
-require_once('../functions/url_parser.php');
+
+/* Path for SquirrelMail required files. */
+define('SM_PATH','../');
+
+/* SquirrelMail required files. */
+require_once(SM_PATH . 'src/validate.php');
+require_once(SM_PATH . 'functions/imap.php');
+require_once(SM_PATH . 'functions/html.php');
+require_once(SM_PATH . 'functions/url_parser.php');
 
 function  parse_viewheader($imapConnection,$id, $passed_ent_id) {
    global $uid_support;
index b1ed0c438151b4a1193cab73e8511edb50bec4dd..e152b438c8ddd8323f0956ee543e40adaac69fa7 100644 (file)
@@ -1,57 +1,73 @@
 <?php
 
-   require_once('../src/validate.php');
-   require_once('../functions/imap.php');
-   require_once('../functions/mime.php');
-   require_once('../functions/html.php');
+/**
+ * view_text.php -- Displays the main frameset
+ *
+ * Copyright (c) 1999-2002 The SquirrelMail development team
+ * Licensed under the GNU GPL. For full terms see the file COPYING.
+ *
+ * Who knows what this file does. However PUT IT HERE DID NOT PUT
+ * A SINGLE FREAKING COMMENT IN! Whoever is responsible for this,
+ * be very ashamed.
+ *
+ * $Id$
+ */
+
+/* Path for SquirrelMail required files. */
+define('SM_PATH','../');
+
+/* SquirrelMail required files. */
+require_once(SM_PATH . 'src/validate.php');
+require_once(SM_PATH . 'functions/imap.php');
+require_once(SM_PATH . 'functions/mime.php');
+require_once(SM_PATH . 'functions/html.php');
    
-   $mailbox = urldecode($mailbox);
-   if (!isset($passed_ent_id)) {
-      $passed_ent_id = '';
-   }
-
-   $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);
-   $mbx_response =  sqimap_mailbox_select($imapConnection, $mailbox);
-
-   $message = &$messages[$mbx_response['UIDVALIDITY']]["$passed_id"];
-   $message_ent = &$message->getEntity($ent_id);
-   if ($passed_ent_id) {
-      $message = &$message->getEntity($passed_ent_id);
-   }
+$mailbox = urldecode($mailbox);
+if (!isset($passed_ent_id)) {
+    $passed_ent_id = '';
+}
+
+$imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);
+$mbx_response =  sqimap_mailbox_select($imapConnection, $mailbox);
+
+$message = &$messages[$mbx_response['UIDVALIDITY']]["$passed_id"];
+$message_ent = &$message->getEntity($ent_id);
+if ($passed_ent_id) {
+    $message = &$message->getEntity($passed_ent_id);
+}
    
-   $header = $message_ent->header;
-   $charset = $header->getParameter('charset');
-   $type0 = $header->type0;
-   $type1 = $header->type1;
-   $encoding = strtolower($header->encoding);
-
-   $msg_url = 'read_body.php?' . $QUERY_STRING;
-   $msg_url = set_url_var($msg_url, 'ent_id', 0);
-
-   $body = mime_fetch_body($imapConnection, $passed_id, $ent_id);
-   $body = decodeBody($body, $encoding);
-
-    displayPageHeader($color, 'None');
-
-    echo "<BR><TABLE WIDTH=\"100%\" BORDER=0 CELLSPACING=0 CELLPADDING=2 ALIGN=CENTER><TR><TD BGCOLOR=\"$color[0]\">".
-         "<B><CENTER>".
-         _("Viewing a text attachment") . " - ";
-    echo '<a href="'.$msg_url.'">'. _("View message") . '</a>';
-
-    $dwnld_url = '../src/download.php?'. $QUERY_STRING.'&amp;absolute_dl=true';
-    echo '</b></td><tr><tr><td><CENTER><A HREF="'.$dwnld_url. '">'.
-         _("Download this as a file").
-         "</A></CENTER><BR>".
-         "</CENTER></B>".
-         "</TD></TR></TABLE>".
-         "<TABLE WIDTH=\"98%\" BORDER=0 CELLSPACING=0 CELLPADDING=2 ALIGN=CENTER><TR><TD BGCOLOR=\"$color[0]\">".
-         "<TR><TD BGCOLOR=\"$color[4]\"><TT>";
-    if ($type1 == 'html' || 
-         (isset($override_type1) &&  $override_type1 == 'html')) {
-        $body = MagicHTML( $body, $passed_id, $message, $mailbox);
-    } else {
-        translateText($body, $wrap_at, $charset);
-    }
-    echo $body .
-         "</TT></TD></TR></TABLE>";
+$header = $message_ent->header;
+$charset = $header->getParameter('charset');
+$type0 = $header->type0;
+$type1 = $header->type1;
+$encoding = strtolower($header->encoding);
+
+$msg_url = 'read_body.php?' . $QUERY_STRING;
+$msg_url = set_url_var($msg_url, 'ent_id', 0);
+
+$body = mime_fetch_body($imapConnection, $passed_id, $ent_id);
+$body = decodeBody($body, $encoding);
+
+displayPageHeader($color, 'None');
+
+echo "<BR><TABLE WIDTH=\"100%\" BORDER=0 CELLSPACING=0 CELLPADDING=2 ALIGN=CENTER><TR><TD BGCOLOR=\"$color[0]\">".
+     "<B><CENTER>".
+     _("Viewing a text attachment") . " - ";
+echo '<a href="'.$msg_url.'">'. _("View message") . '</a>';
+
+$dwnld_url = '../src/download.php?'. $QUERY_STRING.'&amp;absolute_dl=true';
+echo '</b></td><tr><tr><td><CENTER><A HREF="'.$dwnld_url. '">'.
+     _("Download this as a file").
+     "</A></CENTER><BR>".
+     "</CENTER></B>".
+     "</TD></TR></TABLE>".
+     "<TABLE WIDTH=\"98%\" BORDER=0 CELLSPACING=0 CELLPADDING=2 ALIGN=CENTER><TR><TD BGCOLOR=\"$color[0]\">".
+     "<TR><TD BGCOLOR=\"$color[4]\"><TT>";
+if ($type1 == 'html' || (isset($override_type1) &&  $override_type1 == 'html')) {
+    $body = MagicHTML( $body, $passed_id, $message, $mailbox);
+} else {
+    translateText($body, $wrap_at, $charset);
+}
+echo $body . "</TT></TD></TR></TABLE>";
+
 ?>
index 0466064132b3f8bfa75daa4b661861da1a901a9c..6498291fa3277824d2d38c16cb862fc6ba944205 100644 (file)
  * $Id$
  */
 
-require_once('../functions/strings.php');
-require_once('../config/config.php');
-require_once('../functions/prefs.php');
-require_once('../functions/imap.php');
-require_once('../functions/plugin.php');
-require_once('../functions/i18n.php');
-require_once('../functions/auth.php');
+/* Path for SquirrelMail required files. */
+define('SM_PATH','../');
+
+/* SquirrelMail required files. */
+require_once(SM_PATH . 'functions/strings.php');
+require_once(SM_PATH . 'config/config.php');
+require_once(SM_PATH . 'functions/prefs.php');
+require_once(SM_PATH . 'functions/imap.php');
+require_once(SM_PATH . 'functions/plugin.php');
+require_once(SM_PATH . 'functions/i18n.php');
+require_once(SM_PATH . 'functions/auth.php');
 
 if (!function_exists('sqm_baseuri')){
-    require_once('../functions/display_messages.php');
+    require_once(SM_PATH . 'functions/display_messages.php');
 }
 $base_uri = sqm_baseuri();