* Got bored and copied all the validate.php and define() stuff to 1.1
authorfidian <fidian@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Thu, 19 Apr 2001 18:19:45 +0000 (18:19 +0000)
committerfidian <fidian@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Thu, 19 Apr 2001 18:19:45 +0000 (18:19 +0000)
* Cleaned up some code
* Fixed some typos
* Added a few files (documentation, translations)
* EAGERLY awaiting 1.1 to come out
* Made all global stuff "global $varname" so the new define() method we use
  will work properly (methinks)

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

49 files changed:
doc/rfc_documents.txt [new file with mode: 0644]
doc/themes.txt
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/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/help.php
src/left_main.php
src/load_prefs.php
src/login.php
src/move_messages.php
src/options.php
src/options_display.php
src/options_folder.php
src/options_highlight.php
src/options_order.php
src/options_personal.php
src/read_body.php
src/redirect.php
src/right_main.php
src/search.php
src/signout.php
src/validate.php [new file with mode: 0644]
src/webmail.php
themes/black_bean_burrito_theme.php
themes/bluesnews_theme.php
themes/bluesteel_theme.php
themes/dark_grey_theme.php
themes/deepocean_theme.php
themes/default_theme.php
themes/forest_theme.php
themes/high_contrast_theme.php
themes/ice_theme.php
themes/maize_theme.php
themes/plain_blue_theme.php
themes/purple_theme.php
themes/sandstorm_theme.php
themes/seaspray_theme.php
themes/servery_theme.php
themes/slashdot_theme.php

diff --git a/doc/rfc_documents.txt b/doc/rfc_documents.txt
new file mode 100644 (file)
index 0000000..39327b2
--- /dev/null
@@ -0,0 +1,18 @@
+SquirrelMail "talks" several protocols.  To make sure that we are
+standards-compatible, we need to refer to RFC documents.  Here's a list of
+the ones we use a lot:
+
+They are available from a wide variety of places on the net.
+For instance, if you want RFC 822, you can jump directly to it at
+    http://www.faqs.org/rfcs/rfc822.html
+    http://www.rfc-editor.org/rfc/rfc822.txt
+    http://www.imc.org/Searchable/rfc822
+
+NUMBER     DESCRIPTION
+-----------------------------------------------------------
+RFC 822    Format of an email message (sendmail)
+RFC 1730   IMAP version 4
+RFC 2060   IMAP version 4rev1
+RFC 2298   Details return receipts
+RFC 2342   The IMAP4 NAMESPACE command
+RFC 2683   IMAP4 Implementation Recommendations
index cdb6fdf..aca97a9 100644 (file)
@@ -3,7 +3,7 @@ Themes
 
 To create a theme, it is very simple.  Just go into the themes/ directory
 and create a file called yourtheme_theme.php.  You then need to create an
-array with 12 elements (0-13).  Below is an example followed by a
+array with 13 elements (0-12).  Below is an example followed by a
 description of what the different entries are for.
 
 ---<START>--- 
index 4373db8..a387df2 100644 (file)
     **  $Id$
     **/
 
-   session_start();
-
-   if (!isset($strings_php))
-      include("../functions/strings.php");
-   if (!isset($i18n_php))
-      include('../functions/i18n.php');
-   if (!isset($config_php))
-      include('../config/config.php');
-   if (!isset($page_header_php))
-      include('../functions/page_header.php');
-   if (!isset($auth_php))
-      include('../functions/auth.php');
-   if (!isset($addressbook_php))
-      include('../functions/addressbook.php');
-
-   is_logged_in();
-
+   include('../src/validate.php');
+   include("../functions/strings.php");
+   include('../functions/i18n.php');
+   include('../config/config.php');
+   include('../functions/page_header.php');
+   include('../functions/addressbook.php');
    include('../src/load_prefs.php');
    
    set_up_language(getPref($data_dir, $username, 'language'));
index cda2f1b..a4a92bb 100644 (file)
@@ -14,6 +14,8 @@
     **  $Id$
     **/
 
+   include("../src/validate.php");
+
    // Function to include JavaScript code
    function insert_javascript() {
 ?>
@@ -126,38 +128,13 @@ function bcc_address($addr) {
 
    /* ================= End of functions ================= */
 
-   session_start();
-   
-   if (!isset($strings_php))
-      include("../functions/strings.php");
-   if (!isset($i18n_php))
-      include('../functions/i18n.php');
-
-   if(!isset($logged_in) || !isset($username) || !isset($key)) {
-      include ('../themes/default_theme.php');
-      include ('../functions/display_messages.php');
-      printf('<html><BODY TEXT="%s" BGCOLOR="%s" LINK="%s" VLINK="%s" ALINK="%s">',
-              $color[8], $color[4], $color[7], $color[7], $color[7]);
-      plain_error_message(_("You need a valid user and password to access this page!")
-                          . '<br><a href="../src/login.php">'
-                          . _("Click here to log back in.") . "</a>.", $color);
-      echo '</body></html>';
-      exit;
-   }
-   if (!isset($config_php))
-      include('../config/config.php');
-   if (!isset($array_php))
-      include('../functions/array.php');
-   if (!isset($auth_php))
-      include('../functions/auth.php');
-   if (!isset($strings_php))
-      include('../functions/strings.php');
-   if (!isset($page_header_php))
-      include('../functions/page_header.php');
-   if (!isset($addressbook_php))
-      include('../functions/addressbook.php');
-
-   is_logged_in();
+   include("../functions/strings.php");
+   include('../functions/i18n.php');
+   include('../config/config.php');
+   include('../functions/array.php');
+   include('../functions/strings.php');
+   include('../functions/page_header.php');
+   include('../functions/addressbook.php');
    include('../src/load_prefs.php');
 
    displayHtmlHeader();
index 30f436b..3602ef2 100644 (file)
     **  $Id$
     **/
 
-   session_start();
-
-   if (!isset($config_php))
-      include('../config/config.php');
-   if (!isset($strings_php))
-      include('../functions/strings.php');
-   if (!isset($auth_php))
-      include('../functions/auth.php');
-   if (!isset($page_header_php))
-      include('../functions/page_header.php');
-   if (!isset($date_php))
-      include('../functions/date.php');
-   if (!isset($smtp_php))
-      include('../functions/smtp.php');
-   if (!isset($display_messages_php))
-      include('../functions/display_messages.php');
-   if (!isset($addressbook_php))
-      include('../functions/addressbook.php');
-   if (!isset($plugin_php))
-      include('../functions/plugin.php');
-
+   include('../src/validate.php');
+   include('../functions/strings.php');
+   include('../config/config.php');
+   include('../functions/page_header.php');
+   include('../functions/date.php');
+   include('../functions/smtp.php');
+   include('../functions/display_messages.php');
+   include('../functions/addressbook.php');
+   include('../functions/plugin.php');
    include('../src/load_prefs.php');
 
    // Insert hidden data
index 75b0fd7..404b06c 100644 (file)
     **  $Id$
     **/
 
-   session_start();
-
-   if (!isset($strings_php))
-      include('../functions/strings.php');
-   if (!isset($config_php))
-      include('../config/config.php');
-   if (!isset($array_php))
-      include('../functions/array.php');
-   if (!isset($auth_php))
-      include('../functions/auth.php');
-   if (!isset($page_header_php))
-      include('../functions/page_header.php');
-   if (!isset($display_messages_php))
-      include('../functions/display_messages.php');
-   if (!isset($addressbook_php))
-      include('../functions/addressbook.php');
-
-   is_logged_in();
+   include('../src/validate.php');
+   include('../functions/strings.php');
+   include('../config/config.php');
+   include('../functions/array.php');
+   include('../functions/page_header.php');
+   include('../functions/display_messages.php');
+   include('../functions/addressbook.php');
 
    // Sort array by the key "name"
    function alistcmp($a,$b) {   
index 379f8b1..bc688f6 100644 (file)
     **
     ** $Id$
     **/
-    
-   session_start();
-
-   if (!isset($strings_php))
-      include("../functions/strings.php");
-   if (!isset($config_php))
-      include("../config/config.php");
-   if (!isset($page_header_php))
-      include("../functions/page_header.php");
-   if (!isset($imap_php))
-      include("../functions/imap.php");
-   if (!isset($date_php))
-      include("../functions/date.php");
-   if (!isset($mime_php))
-      include("../functions/mime.php");
-   if (!isset($smtp_php))
-      include("../functions/smtp.php");
-   if (!isset($display_messages_php))
-      include("../functions/display_messages.php");
-   if (!isset($auth_php))
-      include ("../functions/auth.php");
-   if (!isset($plugin_php))
-      include ("../functions/plugin.php");
 
+   include('../src/validate.php');
+   include("../functions/strings.php");
+   include("../config/config.php");
+   include("../functions/page_header.php");
+   include("../functions/imap.php");
+   include("../functions/date.php");
+   include("../functions/mime.php");
+   include("../functions/smtp.php");
+   include("../functions/display_messages.php");
+   include ("../functions/plugin.php");
    include("../src/load_prefs.php");
 
    if (!isset($attachments))
    function saveAttachedFiles() {
       global $HTTP_POST_FILES, $attachment_dir, $attachments;
       
-      is_logged_in();
       $localfilename = GenerateRandomString(32, '', 7);
       while (file_exists($attachment_dir . $localfilename))
           $localfilename = GenerateRandomString(32, '', 7);
          //sqimap_logout($imapConnection);
       }
    } else if (isset($html_addr_search_done)) {
-      is_logged_in();
       displayPageHeader($color, $mailbox);
 
       if (isset($send_to_search) && is_array($send_to_search))
       displayPageHeader($color, $mailbox);
       showInputForm();
    } else if (isset($do_delete)) {
-      is_logged_in();
       displayPageHeader($color, $mailbox);
 
       if (isset($delete) && is_array($delete))
index 05e4889..072eaf6 100644 (file)
     **  $Id$
     **/
 
-   session_start();
-
-   if (!isset($strings_php))
-      include("../functions/strings.php");
-   if (!isset($config_php))
-      include("../config/config.php");
-   if (!isset($page_header_php))
-      include("../functions/page_header.php");
-   if (!isset($display_message_php))
-      include("../functions/display_messages.php");
-   if (!isset($imap_php))
-      include("../functions/imap.php");
-
+   include("../src/validate.php");
+   include("../functions/strings.php");
+   include("../config/config.php");
+   include("../functions/page_header.php");
+   include("../functions/display_messages.php");
+   include("../functions/imap.php");
    include("../src/load_prefs.php");
 
    $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);
index 78d3948..501421a 100644 (file)
     **  $Id$
     **/
 
-   if (!isset($strings_php))
-      include("../functions/strings.php");
-   if (!isset($config_php))
-      include("../config/config.php");
-   if (!isset($imap_php))
-      include("../functions/imap.php");
-   if (!isset($mime_php))
-      include("../functions/mime.php");
-   if (!isset($date_php))
-      include("../functions/date.php");
-   if (!isset($i18n_php))
-      include("../functions/i18n.php");
-
-   session_start();
+   define('download_php', true);  // Used for preferences
+
+   include('../src/validate.php');
+   include("../functions/strings.php");
+   include("../config/config.php");
+   include("../functions/imap.php");
+   include("../functions/mime.php");
+   include("../functions/date.php");
+   include("../functions/i18n.php");
+   include("../src/load_prefs.php");
+
    header("Pragma: ");
    header("Cache-Control: cache");
 
-   include("../src/load_prefs.php");
-
    function viewText($color, $body, $id, $entid, $mailbox, $type1, $wrap_at) {
       global $where, $what, $charset;
       global $startMessage;
index d462801..6605b52 100644 (file)
     **  $Id$
     **/
 
-   session_start();
-
+   include('../src/validate.php');
    include("../functions/strings.php");
    include("../config/config.php");
    include("../functions/page_header.php");
    include("../functions/display_messages.php");
    include("../functions/imap.php");
-   if (!function_exists("ary_sort"))
-      include("../functions/array.php");
-
-   if (!isset($tree_php))
-      include("../functions/tree.php");
-
+   include("../functions/array.php");
+   include("../functions/tree.php");
    include("../src/load_prefs.php");
 
    $imap_stream = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);
index 436cb36..f727337 100644 (file)
     **  $Id$
     **/
 
-   session_start();
-
-   if (!isset($strings_php))
-      include("../functions/strings.php");
-   if (!isset($config_php))
-      include("../config/config.php");
-   if (!isset($page_header_php))
-      include("../functions/page_header.php");
-   if (!isset($imap_php))
-      include("../functions/imap.php");
-   if (!isset($array_php))
-      include("../functions/array.php");
-   if (!isset($plugin_php))
-      include("../functions/plugin.php");
-
+   include('../src/validate.php');
+   include("../functions/strings.php");
+   include("../config/config.php");
+   include("../functions/page_header.php");
+   include("../functions/imap.php");
+   include("../functions/array.php");
+   include("../functions/plugin.php");
    include("../src/load_prefs.php");
 
    displayPageHeader($color, _("None"));
index 1cc0df4..30e6059 100644 (file)
     **  $Id$
     **/
 
-   session_start();
-
-   if (!isset($strings_php))
-      include("../functions/strings.php");
-   if (!isset($config_php))
-      include("../config/config.php");
-   if (!isset($page_header_php))
-      include("../functions/page_header.php");
-   if (!isset($imap_php))
-      include("../functions/imap.php");
-   if (!isset($display_messages_php))
-      include("../functions/display_messages.php");
-
+   include('../src/validate.php');
+   include("../functions/strings.php");
+   include("../config/config.php");
+   include("../functions/page_header.php");
+   include("../functions/imap.php");
+   include("../functions/display_messages.php");
    include("../src/load_prefs.php");
 
    $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);
@@ -55,7 +48,6 @@
    } else {
       sqimap_mailbox_create ($imapConnection, $subfolder.$dm.$folder_name, "");
    }
-   fputs($imapConnection, "1 logout\n");
 
    $location = get_location();
    header ("Location: $location/folders.php?success=create");
index e7d879d..65f5763 100644 (file)
     **  $Id$
     **/
 
-   session_start();
+   include('../src/validate.php');
+   include("../functions/strings.php");
+   include("../config/config.php");
+   include("../functions/page_header.php");
+   include("../functions/imap.php");
+   include("../functions/array.php");
+   include("../functions/tree.php");
+   include("../src/load_prefs.php");
 
    /*
    *  Incoming values:
    *     $mailbox - selected mailbox from the form
    */
    
-   if (!isset($strings_php))
-      include("../functions/strings.php");
-   if (!isset($config_php))
-      include("../config/config.php");
-   if (!isset($page_header_php))
-      include("../functions/page_header.php");
-   if (!isset($imap_php))
-      include("../functions/imap.php");
-   if (!isset($array_php))
-      include("../functions/array.php");
-   if (!isset($tree_php))
-      include("../functions/tree.php");
-
-   include("../src/load_prefs.php");
-
-   
    $imap_stream = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);
    $boxes = sqimap_mailbox_list ($imap_stream);
    $dm = sqimap_get_delimiter($imap_stream);
index 7c8bb47..e18a44c 100644 (file)
     **  $Id$
     **/
 
-   session_start();
-
-   if (!isset($strings_php))
-      include("../functions/strings.php");
-   if (!isset($config_php))
-      include("../config/config.php");
-   if (!isset($page_header_php))
-      include("../functions/page_header.php");
-   if (!isset($imap_php))
-      include("../functions/imap.php");
-
+   include("../src/validate.php");
+   include("../functions/strings.php");
+   include("../config/config.php");
+   include("../functions/page_header.php");
+   include("../functions/imap.php");
    include("../src/load_prefs.php");
 
 
index ca143f9..071c2d0 100644 (file)
     **  $Id$
     **/
 
-   session_start();
-
-   if (!isset($strings_php))
-      include("../functions/strings.php");
-   if (!isset($config_php))
-      include("../config/config.php");
-   if (!isset($page_header_php))
-      include("../functions/page_header.php");
-   if (!isset($imap_php))
-      include("../functions/imap.php");
-
+   include('../src/validate.php');
+   include("../functions/strings.php");
+   include("../config/config.php");
+   include("../functions/page_header.php");
+   include("../functions/imap.php");
    include("../src/load_prefs.php");
 
    $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);
index 93fa7a3..162f99e 100644 (file)
     **  $Id$
     **/
 
-   session_start();
-
-   if (!isset($strings_php))
-      include("../functions/strings.php");
-   if (!isset($config_php))
-      include("../config/config.php");
-   if (!isset($page_header_php))
-      include("../functions/page_header.php");
-   if (!isset($display_messages_php))
-      include("../functions/display_messages.php");
-   if (!isset($imap_php))
-      include("../functions/imap.php");
-   if (!isset($array_php))
-      include("../functions/array.php");
-   if (!isset($i18n_php))
-      include("../functions/i18n.php");
-   if (!isset($auth_php))
-      include ("../functions/auth.php"); 
-
+   include('../src/validate.php');
+   include("../functions/strings.php");
+   include("../config/config.php");
+   include("../functions/page_header.php");
+   include("../functions/display_messages.php");
+   include("../functions/imap.php");
+   include("../functions/array.php");
+   include("../functions/i18n.php");
    include("../src/load_prefs.php");
+
+
    displayPageHeader($color, "None");
-   is_logged_in(); 
 
        $helpdir[0] = "basic.hlp";
        $helpdir[1] = "main_folder.hlp";
index 2a0c307..2eb3af7 100644 (file)
     **  $Id$
     **/
 
-   session_start();
-
-   if (!isset($i18n_php))
-      include ("../functions/i18n.php");
-
-   if(!isset($username)) {
-      set_up_language($squirrelmail_language, true);
-          include ("../themes/default_theme.php");
-          printf('<html><BODY TEXT="%s" BGCOLOR="%s" LINK="%s" VLINK="%s" ALINK="%s">',
-                          $color[8], $color[4], $color[7], $color[7], $color[7]);
-          echo "</body></html>";
-      exit;
-   }
-
-
-   if (!isset($strings_php))
-      include("../functions/strings.php");
-   if (!isset($config_php))
-      include("../config/config.php");
-   if (!isset($array_php))
-      include("../functions/array.php");
-   if (!isset($imap_php))
-      include("../functions/imap.php");
-   if (!isset($page_header_php))
-      include("../functions/page_header.php");
-   if (!isset($i18n_php))
-      include("../functions/i18n.php");
-   if (!isset($plugin_php))
-      include("../functions/plugin.php");
+   include('../src/validate.php');
+   include ("../functions/i18n.php");
+   include("../functions/strings.php");
+   include("../config/config.php");
+   include("../functions/array.php");
+   include("../functions/imap.php");
+   include("../functions/page_header.php");
+   include("../functions/plugin.php");
+   include("../src/load_prefs.php");
 
    // open a connection on the imap port (143)
    $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 10); // the 10 is to hide the output
 
-   /** If it was a successful login, lets load their preferences **/
-   include("../src/load_prefs.php");
-
    displayHtmlHeader();
 
    function formatMailboxName($imapConnection, $box_array, $delimeter) {
index 3691d07..e23c9a5 100644 (file)
     **  $Id$
     **/
 
-   if (!isset($config_php))
-      include("../config/config.php");
-   if (!isset($prefs_php))
-      include("../functions/prefs.php");
-   if (!isset($plugin_php))
-      include("../functions/plugin.php");
+   if (defined('load_prefs_php'))
+       return;
+   define('load_prefs_php', true);
+
+   global $theme, $chosen_theme, $color;
+   $theme = array();
+   $color = array();
+   include('../src/validate.php');
+   include("../config/config.php");
+   include("../functions/prefs.php");
+   include("../functions/plugin.php");
       
-   $load_prefs_php = true;
    if (!isset($username))
        $username = '';
    checkForPrefs($data_dir, $username);
                 break;
          }
    }
+   
+   if (! $in_ary)
+       $chosen_theme = "";
 
-   if ($in_ary && (file_exists($chosen_theme))) {
-      $loaded=@include($chosen_theme);
+   if (isset($chosen_theme) && $in_ary && (file_exists($chosen_theme))) {
+      @include($chosen_theme);
    } else {
       if (file_exists($theme[0]["PATH"])) {
-         require($theme[0]["PATH"]);
+         @include($theme[0]["PATH"]);
       } else {
           #
-          #  I hard coded the theme as a last resort if no themes were
+          #  I hard coded the theme as a failsafe if no themes were
           #  found.  It makes no sense to cause the whole thing to exit
           #  just because themes were not found.  This is the absolute
           #  last resort.
           $color[11]  = "#770000"; // (dark red)       Special Folders color
       }
    }
-    if (!isset($loaded)) 
-      echo _("Unable to load chosen theme file:") . ' "' .
-       $chosen_theme . '"';
-    if (!isset($download_php)) session_register("theme_css");
 
+    if (!defined('download_php')) 
+       session_register("theme_css");
+
+   global $use_javascript_addr_book;
    $use_javascript_addr_book = getPref($data_dir, $username, "use_javascript_addr_book");
    if ($use_javascript_addr_book == "")
       $use_javascript_addr_book = $default_use_javascript_addr_book;
 
    
    /** Load the user's sent folder preferences **/
+   global $move_to_sent, $move_to_trash;
    $move_to_sent = getPref($data_dir, $username, "move_to_sent");
    if ($move_to_sent == "")
       $move_to_sent = $default_move_to_sent;
@@ -79,6 +87,7 @@
       $move_to_trash = $default_move_to_trash;
 
 
+   global $unseen_type, $unseen_notify;
    $unseen_type = getPref($data_dir, $username, "unseen_type");
    if ($default_unseen_type == "")
       $default_unseen_type = 1;
       $unseen_notify = $default_unseen_notify;
 
 
+   global $folder_prefix;
    $folder_prefix = getPref($data_dir, $username, "folder_prefix");
    if ($folder_prefix == "")
       $folder_prefix = $default_folder_prefix;
 
+
        /** Load special folders **/
+       global $trash_folder, $sent_folder;
        $new_trash_folder = getPref($data_dir, $username, "trash_folder");
        if (($new_trash_folder == "") && ($move_to_trash == true))
                $trash_folder = $folder_prefix . $trash_folder;
        else
                $sent_folder = $new_sent_folder;
 
+
+   global $show_num, $wrap_at, $left_size;
    $show_num = getPref($data_dir, $username, "show_num");
    if ($show_num == "")
       $show_num = 25;
          $left_size = 200;
    }      
 
+
+   global $editor_size, $use_signature, $prefix_sig;
    $editor_size = getPref($data_dir, $username, "editor_size");
    if ($editor_size == "")
       $editor_size = 76;
 
    $prefix_sig = getPref($data_dir, $username, "prefix_sig");
    if ($prefix_sig == "")
-      $prefix_sig = false;
+      $prefix_sig = true;
+
 
+   global $left_refresh, $sort;
    $left_refresh = getPref($data_dir, $username, "left_refresh");
    if ($left_refresh == "")
       $left_refresh = false;
    if ($sort == "")
       $sort = 6;
    
+   
    /** Load up the Signature file **/
+   global $signature_abs;
    if ($use_signature == true) {
       $signature_abs = $signature = getSig($data_dir, $username);
    } else {
       $signature_abs = getSig($data_dir, $username);
    }
 
+
    //  highlightX comes in with the form: name,color,header,value
+   global $message_highlight_list;
    for ($i=0; $hlt = getPref($data_dir, $username, "highlight$i"); $i++) {
       $ary = explode(",", $hlt);
       $message_highlight_list[$i]["name"] = $ary[0]; 
       $message_highlight_list[$i]["match_type"] = $ary[3];
    }
 
+
    #index order lets you change the order of the message index
+   global $index_order;
    $order = getPref($data_dir, $username, "order1");
    for ($i=1; $order; $i++) {
       $index_order[$i] = $order;
       $index_order[5] = 4;
    }
    
+   
+   global $location_of_bar, $location_of_buttons;
    $location_of_bar = getPref($data_dir, $username, 'location_of_bar');
    if ($location_of_bar == '')
        $location_of_bar = 'left';
    if ($location_of_buttons == '')
        $location_of_buttons = 'between';
        
+       
+   global $collapse_folders, $show_html_default;
    $collapse_folders = getPref($data_dir, $username, 'collapse_folders');
    
    $show_html_default = getPref($data_dir, $username, 'show_html_default');
index aeb0d44..2ebf129 100644 (file)
     **  $Id$
     **/
 
-   if (!isset($strings_php))
-      include("../functions/strings.php");
-   if (!isset($config_php))
-      include("../config/config.php");
-   if (!isset($i18n_php))
-      include("../functions/i18n.php");
-   if (!isset($plugin_php))
-      include("../functions/plugin.php");
+   include("../functions/strings.php");
+   include("../config/config.php");
+   include("../functions/i18n.php");
+   include("../functions/plugin.php");
 
    // $squirrelmail_language is set by a cookie when the user selects
    // language and logs out
index 1458806..ee676e2 100644 (file)
     **  $Id$
     **/
 
-   session_start();
-
-   if (!isset($strings_php))
-      include("../functions/strings.php");
-   if (!isset($config_php))
-      include("../config/config.php");
-   if (!isset($page_header_php))
-      include("../functions/page_header.php");
-   if (!isset($display_messages_php))
-      include("../functions/display_messages.php");
-   if (!isset($imap_php))
-      include("../functions/imap.php");
-
+   include('../src/validate.php');
+   include("../functions/strings.php");
+   include("../config/config.php");
+   include("../functions/page_header.php");
+   include("../functions/display_messages.php");
+   include("../functions/imap.php");
    include("../src/load_prefs.php");
 
    function putSelectedMessagesIntoString($msg) {
index 9c8662b..88f7e7a 100644 (file)
     **  $Id$
     **/
 
-   session_start();
-
-   if (!isset($strings_php))
-      include('../functions/strings.php');
-   if (!isset($config_php))
-      include('../config/config.php');
-   if (!isset($page_header_php))
-      include('../functions/page_header.php');
-   if (!isset($display_messages_php))
-      include('../functions/display_messages.php');
-   if (!isset($imap_php))
-      include('../functions/imap.php');
-   if (!isset($array_php))
-      include('../functions/array.php');
-   if (!isset($i18n_php))
-      include('../functions/i18n.php');
-   if (!isset($auth_php))
-      include ('../functions/auth.php'); 
+   include('../src/validate.php');
+   include('../functions/strings.php');
+   include('../config/config.php');
+   include('../functions/page_header.php');
+   include('../functions/display_messages.php');
+   include('../functions/imap.php');
+   include('../functions/array.php');
+   include('../functions/i18n.php');
 
    if (isset($language)) {
       setcookie('squirrelmail_language', $language, time()+2592000);
@@ -37,7 +27,7 @@
 
    include('../src/load_prefs.php');
    displayPageHeader($color, 'None');
-   is_logged_in(); 
+
 ?>
 
 <br>
       if (isset($full_name)) setPref($data_dir, $username, 'full_name', $full_name);
       if (isset($email_address)) setPref($data_dir, $username, 'email_address', $email_address);
       if (isset($reply_to)) setPref($data_dir, $username, 'reply_to', $reply_to);
-      if (isset($usesignature)) setPref($data_dir, $username, 'use_signature', $usesignature);  
-      if (isset($prefixsig)) setPref($data_dir, $username, 'prefix_sig', $prefixsig);
+      setPref($data_dir, $username, 'use_signature', $usesignature);  
+      if (! isset($prefixsig))
+         $prefixsig = 0;
+      setPref($data_dir, $username, 'prefix_sig', $prefixsig);
       if (isset($signature_edit)) setSig($data_dir, $username, $signature_edit);
       
       do_hook('options_personal_save');
       
       echo '<br><center><b>'._("Successfully saved personal information!").'</b></center><br>';
-   } else if (isset($submit_display)) {  
+   } else if (isset($submit_display)) {
+      // Do checking to make sure $chosentheme is in the array
+      $in_ary = false;
+      for ($i=0; $i < count($theme); $i++)
+      {
+          if ($theme[$i]['PATH'] == $chosentheme)
+         {
+             $in_ary = true;
+             break;
+         }
+      }
+      if (! $in_ary)
+          $chosentheme = '';
+   
       # Save display preferences
       setPref($data_dir, $username, 'chosen_theme', $chosentheme);
       setPref($data_dir, $username, 'show_num', $shownum);
          setPref($data_dir, $username, 'move_to_sent', '0');
          setPref($data_dir, $username, 'sent_folder', 'none');
       } 
-      if (isset($folderprefix))
-         setPref($data_dir, $username, 'folder_prefix', $folderprefix);
+      setPref($data_dir, $username, 'folder_prefix', $folderprefix);
       setPref($data_dir, $username, 'unseen_notify', $unseennotify);
       setPref($data_dir, $username, 'unseen_type', $unseentype);
       if (isset($collapsefolders))
index dae1856..9b433ec 100644 (file)
     **  $Id$
     **/
 
-   session_start();
-
-   if (!isset($strings_php))
-      include('../functions/strings.php');
-   if (!isset($config_php))
-      include('../config/config.php');
-   if (!isset($page_header_php))
-      include('../functions/page_header.php');
-   if (!isset($display_messages_php))
-      include('../functions/display_messages.php');
-   if (!isset($imap_php))
-      include('../functions/imap.php');
-   if (!isset($array_php))
-      include('../functions/array.php');
-   if (!isset($i18n_php))
-      include('../functions/i18n.php');
-   if (!isset($plugin_php))
-      include('../functins/plugin.php');
-
+   include('../src/validate.php');
+   include('../functions/strings.php');
+   include('../config/config.php');
+   include('../functions/page_header.php');
+   include('../functions/display_messages.php');
+   include('../functions/imap.php');
+   include('../functions/array.php');
+   include('../functions/i18n.php');
+   include('../functins/plugin.php');
    include('../src/load_prefs.php');
+   
    displayPageHeader($color, 'None');
    $chosen_language = getPref($data_dir, $username, 'language');  
 ?>
index 9e50d84..dd5f21f 100644 (file)
     **  $Id$
     **/
 
-   session_start();
-
-   if (!isset($strings_php))
-      include('../functions/strings.php');
-   if (!isset($config_php))
-      include('../config/config.php');
-   if (!isset($page_header_php))
-      include('../functions/page_header.php');
-   if (!isset($display_messages_php))
-      include('../functions/display_messages.php');
-   if (!isset($imap_php))
-      include('../functions/imap.php');
-   if (!isset($array_php))
-      include('../functions/array.php');
-   if (!isset($i18n_php))
-      include('../functions/i18n.php');
-   if (!isset($plugin_php))
-      include('../functions/plugin.php');
-
+   include('../src/validate.php');
+   include('../functions/strings.php');
+   include('../config/config.php');
+   include('../functions/page_header.php');
+   include('../functions/display_messages.php');
+   include('../functions/imap.php');
+   include('../functions/array.php');
+   include('../functions/i18n.php');
+   include('../functions/plugin.php');
    include('../src/load_prefs.php');
+   
    displayPageHeader($color, 'None');
 
    $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);
index a5ac5ab..de804a1 100644 (file)
     **  $Id$
     **/
 
-   session_start();
-
-   if (!isset($strings_php))
-      include('../functions/strings.php');
-   if (!isset($config_php))
-      include('../config/config.php');
-   if (!isset($page_header_php))
-      include('../functions/page_header.php');
-   if (!isset($display_messages_php))
-      include('../functions/display_messages.php');
-   if (!isset($imap_php))
-      include('../functions/imap.php');
-   if (!isset($array_php))
-      include('../functions/array.php');
-   if (!isset($i18n_php))
-      include('../functions/i18n.php');
-   if (!isset($plugin_php))
-      include('../functions/plugin.php');
+   include('../src/validate.php');
+   include('../functions/strings.php');
+   include('../config/config.php');
+   include('../functions/page_header.php');
+   include('../functions/display_messages.php');
+   include('../functions/imap.php');
+   include('../functions/array.php');
+   include('../functions/i18n.php');
+   include('../functions/plugin.php');
 
    if (! isset($action))
        $action = '';
index 670a548..15c9fb7 100644 (file)
     **  $Id$
     **/
 
-   session_start();
-
-   if (!isset($strings_php))
-      include('../functions/strings.php');
-   if (!isset($config_php))
-      include('../config/config.php');
-   if (!isset($page_header_php))
-      include('../functions/page_header.php');
-   if (!isset($display_messages_php))
-      include('../functions/display_messages.php');
-   if (!isset($imap_php))
-      include('../functions/imap.php');
-   if (!isset($array_php))
-      include('../functions/array.php');
-   if (!isset($i18n_php))
-      include('../functions/i18n.php');
-   if (!isset($plugin_php))
-      include('../functions/plugin.php');
+   include('../src/validate.php');
+   include('../functions/strings.php');
+   include('../config/config.php');
+   include('../functions/page_header.php');
+   include('../functions/display_messages.php');
+   include('../functions/imap.php');
+   include('../functions/array.php');
+   include('../functions/i18n.php');
+   include('../functions/plugin.php');
 
 
    if (! isset($action)) { $action = ''; }
index a382dad..2937a5c 100644 (file)
     **  $Id$
     **/
 
-   session_start();
-
-   if (!isset($strings_php))
-      include('../functions/strings.php');
-   if (!isset($config_php))
-      include('../config/config.php');
-   if (!isset($page_header_php))
-      include('../functions/page_header.php');
-   if (!isset($display_messages_php))
-      include('../functions/display_messages.php');
-   if (!isset($imap_php))
-      include('../functions/imap.php');
-   if (!isset($array_php))
-      include('../functions/array.php');
-   if (!isset($i18n_php))
-      include('../functions/i18n.php');
-   if (!isset($plugin_php))
-      include('../functions/plugin.php');
-
+   include('../src/validate.php');
+   include('../functions/strings.php');
+   include('../config/config.php');
+   include('../functions/page_header.php');
+   include('../functions/display_messages.php');
+   include('../functions/imap.php');
+   include('../functions/array.php');
+   include('../functions/i18n.php');
+   include('../functions/plugin.php');
    include('../src/load_prefs.php');
+   
    displayPageHeader($color, 'None');
 
    $fullname = getPref($data_dir, $username, 'full_name');
       echo '<input type=checkbox value="1" name=usesignature checked>&nbsp;&nbsp;' . _("Use a signature?") . '&nbsp;&nbsp;';
    else
       echo '<input type=checkbox value="1" name=usesignature>&nbsp;&nbsp;' . _("Use a signature?") . '&nbsp;&nbsp;';
-  if ( $prefix_sig == true )
-    echo '<input type="checkbox" value="1" name="prefixsig" checked>&nbsp;&nbsp;
-' . _( "Prefix signature with '--' ?" ) . '<BR>';
+  if ( ! isset($prefix_sig) || $prefix_sig == true )
+    echo '<input type="checkbox" value="1" name="prefixsig" checked>&nbsp;&nbsp;
+        . _( "Prefix signature with '--' ?" ) . '<BR>';
   else
-    echo '<input type="checkbox" value="1" name="prefixsig">&nbsp;&nbsp;' . _( "
-Prefix signature with '--' ?" ) . '<BR>';
+    echo '<input type="checkbox" value="1" name="prefixsig">&nbsp;&nbsp;' . 
+        _( "Prefix signature with '--' ?" ) . '<BR>';
    echo "\n<textarea name=\"signature_edit\" rows=\"5\" cols=\"50\">$signature_abs</textarea><br>";
 ?>
             </td>
index 84997f6..9436d2c 100644 (file)
    **  $Id$
    **/
 
-   session_start();
-
-   if (!isset($strings_php))
-      include('../functions/strings.php');
-   if (!isset($config_php))
-      include('../config/config.php');
-   if (!isset($page_header_php))
-      include('../functions/page_header.php');
-   if (!isset($imap_php))
-      include('../functions/imap.php');
-   if (!isset($mime_php))
-      include('../functions/mime.php');
-   if (!isset($date_php))
-      include('../functions/date.php');
-       if (!isset($url_parser_php)) 
-               include('../functions/url_parser.php');
-
+   include("../src/validate.php");
+   include('../functions/strings.php');
+   include('../config/config.php');
+   include('../functions/page_header.php');
+   include('../functions/imap.php');
+   include('../functions/mime.php');
+   include('../functions/date.php');
+   include('../functions/url_parser.php');
    include('../src/load_prefs.php');
+   
    $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);
    sqimap_mailbox_select($imapConnection, $mailbox);
    do_hook('html_top');
index 4a4097a..5e7f9d0 100644 (file)
@@ -13,8 +13,7 @@
     **  $Id$
     **/
 
-   if (!isset($strings_php))
-      include ('../functions/strings.php');
+   include ('../functions/strings.php');
    include('../config/config.php');
 
    // Before starting the session, the base URI must be known.
    session_set_cookie_params (0, $base_uri);
    session_start();
 
+   session_unregister ('user_is_logged_in');
    session_register ('base_uri');
 
    if(!isset($login_username)) {
+      echo "<html><body bgcolor=\"ffffff\">\n";
+      echo "<br><br>";
+      echo "<center>";
+      echo "<b>"._("You must be logged in to access this page.")."</b><br>";
+      echo "<a href=\"../src/login.php\">"._("Go to the login page")."</a>\n";
+      echo "</center>";
+      echo "</body></html>\n";
       exit;
    }
 
    }
 
 
-   include ('../config/config.php');
    include ('../functions/prefs.php');
    include ('../functions/imap.php');
-   if (!isset($plugin_php))
-      include ('../functions/plugin.php');
-   if (!isset($auth_php))
-      include ('../functions/auth.php');
-   if (!isset($strings_php))
-      include ('../functions/strings.php');
+   include ('../functions/plugin.php');
 
    if (!session_is_registered('user_is_logged_in') || $logged_in != 1) {
       do_hook ('login_before');
           $login_username = strtolower($login_username);
       $imapConnection = sqimap_login($login_username, $key, $imapServerAddress, $imapPort, 0);
          if (!$imapConnection) {
-               exit;
+             echo "<html><body bgcolor=\"ffffff\">\n";
+            echo "<br><br>";
+            echo "<center>";
+            echo "<b>"._("There was an error contacting the mail server.")."</b><br>";
+            echo _("Contact your administrator for help.")."\n";
+            echo "</center>";
+            echo "</body></html>\n";
+            exit;
          }
       sqimap_logout($imapConnection);
 
@@ -72,8 +80,8 @@
       do_hook ('login_verified');
    }
 
-   session_register ('user_is_logged_in');
    $user_is_logged_in = true;
+   session_register ('user_is_logged_in');
 
-   header("Location: $location/webmail.php");
+   header("Location: webmail.php");
 ?>
index 1f3873a..7c33892 100644 (file)
     **  $Id$
     **/
 
-   if (!isset($i18n_php))
-      include('../functions/i18n.php');
+   include('../src/validate.php');
+   include('../functions/i18n.php');
+   include('../functions/strings.php');
+   include('../config/config.php');
+   include('../functions/imap.php');
+   include('../functions/date.php');
+   include('../functions/page_header.php');
+   include('../functions/array.php');
+   include('../functions/mime.php');
+   include('../functions/mailbox_display.php');
+   include('../functions/display_messages.php');
 
-   session_start();
-
-   if(!isset($logged_in) || !isset($username) || !isset($key)) {
-      include ('../themes/default_theme.php');
-      include ('../functions/display_messages.php');
-      printf('<html><BODY TEXT="%s" BGCOLOR="%s" LINK="%s" VLINK="%s" ALINK="%s">',
-              $color[8], $color[4], $color[7], $color[7], $color[7]);
-      plain_error_message(_("You need a valid user and password to access this page!")
-                          . '<br><a href="../src/login.php">'
-                          . _("Click here to log back in.") . "</a>.", $color);
-      echo '</body></html>';
-      exit;
-   }
-
-   if (!isset($strings_php))
-      include('../functions/strings.php');
-   if (!isset($config_php))
-      include('../config/config.php');
-   if (!isset($imap_php))
-      include('../functions/imap.php');
-   if (!isset($date_php))
-      include('../functions/date.php');
-   if (!isset($page_header_php))
-      include('../functions/page_header.php');
-   if (!isset($array_php))
-      include('../functions/array.php');
-   if (!isset($mime_php))
-      include('../functions/mime.php');
-   if (!isset($mailbox_display_php))
-      include('../functions/mailbox_display.php');
-   if (!isset($display_messages_php))
-      include('../functions/display_messages.php');
 ?>
 <?php
    /////////////////////////////////////////////////////////////////////////////////
index da18910..2c0874f 100644 (file)
@@ -2,40 +2,14 @@
 
    /* $Id$ */
 
-   session_start();
-
-   if(!isset($logged_in)) {
-      set_up_language($squirrelmail_language, true);
-      echo _("You must login first.");
-      exit;
-   }
-   if(!isset($username) || !isset($key)) {
-      include ('../themes/default_theme.php');
-      include ('../functions/display_messages.php');
-      printf('<html><BODY TEXT="%s" BGCOLOR="%s" LINK="%s" VLINK="%s" ALINK="%s">',
-              $color[8], $color[4], $color[7], $color[7], $color[7]);
-      plain_error_message(_("You need a valid user and password to access this page!")
-                          . '<br><a href="../src/login.php">'
-                          . _("Click here to log back in.") . '</a>.', $color);
-      echo '</body></html>';
-      exit;
-   }
-
-   if (!isset($strings_php))
-      include('../functions/strings.php');
-   if (!isset($i18n_php))
-      include('../functions/i18n.php');
-   if (!isset($config_php))
-      include('../config/config.php');
-   if (!isset($page_header_php))
-      include('../functions/page_header.php');
-   if (!isset($imap_php))
-      include('../functions/imap.php');
-   if (!isset($imap_search_php))
-      include('../functions/imap_search.php');
-   if (!isset($array_php))
-      include('../functions/array.php');
-
+   include('../src/validate.php');
+   include('../functions/strings.php');
+   include('../functions/i18n.php');
+   include('../config/config.php');
+   include('../functions/page_header.php');
+   include('../functions/imap.php');
+   include('../functions/imap_search.php');
+   include('../functions/array.php');
    include('../src/load_prefs.php');
 
    displayPageHeader($color, $mailbox);
index 22449ff..83c78cc 100644 (file)
     **  $Id$
     **/
 
-   session_start();
-
-   if (!isset($strings_php))
-      include('../functions/strings.php');
-
+   include('../src/validate.php');
+   include('../functions/strings.php');
    include ('../src/load_prefs.php');
+   include('../config/config.php');
+   include('../functions/i18n.php');
+   include ('../functions/prefs.php');
+   include ('../functions/plugin.php');
+
 
-   if (!isset($config_php))
-      include('../config/config.php');
-   if (!isset($i18n_php))
-      include('../functions/i18n.php');
-   if (!isset($prefs_php))
-      include ('../functions/prefs.php');
-   if (!isset($plugin_php))
-      include ('../functions/plugin.php');
+   // Erase any lingering attachments
+   foreach ($attachments as $info)
+   {
+       if (file_exists($attachment_dir . $info['localfilename']))
+       {
+           unlink($attachment_dir . $info['localfilename']);
+       }
+   }
 
    set_up_language(getPref($data_dir, $username, 'language'));
 
diff --git a/src/validate.php b/src/validate.php
new file mode 100644 (file)
index 0000000..0594d87
--- /dev/null
@@ -0,0 +1,102 @@
+<?php
+   /**
+    **  validate.php
+    **
+    **  Copyright (c) 1999-2000 The SquirrelMail development team
+    **  Licensed under the GNU GPL. For full terms see the file COPYING.
+    **
+    **  $Id$
+    **/
+
+   if (defined ('validate_php')) { 
+      return; 
+   } else { 
+      define ('validate_php', true); 
+   }
+
+   session_start();
+   include ("../functions/auth.php");
+   is_logged_in();
+
+
+   // Remove all slashes for form values
+   if (get_magic_quotes_gpc())
+   {
+       global $REQUEST_METHOD;
+       if ($REQUEST_METHOD == "POST")
+       {
+           global $HTTP_POST_VARS;
+           RemoveSlashes($HTTP_POST_VARS);
+       }
+       elseif ($REQUEST_METHOD == "GET")
+       {
+           global $HTTP_GET_VARS;
+           RemoveSlashes($HTTP_GET_VARS);
+       }
+   }
+
+   // Auto-detection
+   //
+   // if $send (the form button's name) contains "\n" as the first char
+   // and the script is compose.php, then trim everything.  Otherwise,
+   // we don't have to worry.
+   //
+   // This is for a RedHat package bug and a Konqueror (pre 2.1.1?) bug
+   global $send, $PHP_SELF;
+   if (isset($send) && substr($send, 0, 1) == "\n" &&
+       substr($PHP_SELF, -12) == '/compose.php')
+   {
+      if ($REQUEST_METHOD == "POST") {
+         global $HTTP_POST_VARS;
+         TrimArray($HTTP_POST_VARS);
+      } else {
+         global $HTTP_GET_VARS;
+         TrimArray($HTTP_GET_VARS);
+      }
+   }
+
+   //**************************************************************************
+   // Trims every element in the array
+   //**************************************************************************
+   function TrimArray(&$array) {
+      foreach ($array as $k => $v) {
+         global $$k;
+         if (is_array($$k)) {
+            foreach ($$k as $k2 => $v2) {
+              $$k[$k2] = substr($v2, 1);
+            }
+         } else {
+            $$k = substr($v, 1);
+         }
+        // Re-assign back to array
+        $array[$k] = $$k;
+      }
+   }
+   
+   
+   //**************************************************************************
+   // Removes slashes from every element in the array
+   //**************************************************************************
+   function RemoveSlashes(&$array)
+   {
+       foreach ($array as $k => $v)
+       {
+           global $$k;
+           if (is_array($$k))
+           {
+               foreach ($$k as $k2 => $v2)
+               {
+                   $newArray[stripslashes($k2)] = stripslashes($v2);
+               }
+               $$k = $newArray;
+           }
+           else
+           {
+               $$k = stripslashes($v);
+           }
+          // Re-assign back to the array
+          $array[$k] = $$k;
+       }
+   }
+
+?>
index 37ac05d..ebd365b 100644 (file)
     **  $Id$
     **/
 
-   session_start();
-
-   if (!isset($i18n_php))
-      include ('../functions/i18n.php');
-
-   if(!isset($username)) {
-      set_up_language($squirrelmail_language);
-         include ('../themes/default_theme.php');
-         include ('../functions/display_messages.php');
-         printf('<html><BODY TEXT="%s" BGCOLOR="%s" LINK="%s" VLINK="%s" ALINK="%s">',
-                         $color[8], $color[4], $color[7], $color[7], $color[7]);
-         plain_error_message(_("You need a valid user and password to access this page!") 
-                             . "<br><a href=\"../src/login.php\">" 
-                                                 . _("Click here to log back in.") . "</a>.", $color);
-         echo '</body></html>';
-      exit;
-   }
-
-   if (!isset($strings_php))
-      include ('../functions/strings.php');
+   include ('../functions/i18n.php');
+   include ('../functions/strings.php');
    include ('../config/config.php');
    include ('../functions/prefs.php');
    include ('../functions/imap.php');
-   if (!isset($plugin_php))
-      include ('../functions/plugin.php');
-   if (!isset($auth_php))
-      include ('../functions/auth.php');
+   include ('../functions/plugin.php');
+   include ('../functions/auth.php');
 
-   include ('../src/load_prefs.php');
+   session_start();
+   is_logged_in();
+   checkForPrefs($data_dir, $username);
 
    // We'll need this to later have a noframes version
    //
    echo $org_title;
    echo '</TITLE>';
    
-   $bar_size = $left_size;
+   $left_size = getPref($data_dir, $username, "left_size");
+   $location_of_bar = getPref($data_dir, $username, "location_of_bar");
+   if ($location_of_bar == '')
+       $location_of_bar = 'left';
+   if ($left_size == "") {
+      if (isset($default_left_size))
+         $left_size = $default_left_size;
+      else  
+         $left_size = 200;
+   }      
    
    if ($location_of_bar == 'right')
    {
@@ -90,7 +81,7 @@
    } else if ($right_frame == 'folders.php') {
       $right_frame_url = 'folders.php';
    } else {
-      if (!isset($just_logged_in)) $just_logged_in = 1;
+      if (!isset($just_logged_in)) $just_logged_in = 0;
       $right_frame_url = "right_main.php?just_logged_in=$just_logged_in";
    }
 
index 57bf70f..23464e0 100644 (file)
@@ -4,6 +4,7 @@
        Theme Name:   "Black Bean Burrito"
     **/
 
+    global $color;
     $color[0]   = "#595959"; // (mid-dark gray)                TitleBar
     $color[1]   = "#F88888"; // (light red)                    Quoted Replies in Emails
     $color[2]   = "#ff7171"; // (pinkish)                      Warning/Error Messages
index 590c623..be165c5 100644 (file)
@@ -7,6 +7,7 @@
                                         contrast colorset, easy to read with very little eye strain.
     **/
 
+    global $color;
     $color[0]   = "#181818"; // (off-black)                    TitleBar
     $color[1]   = "#A0A0A0"; // (gray)                         Quoted Replies in Emails
     $color[2]   = "#800000"; // (red)                          Warning/Error Messages
index 6123b46..8c42a54 100644 (file)
@@ -16,6 +16,7 @@
        page.
     **/
 
+    global $color;
     $color[0]   = "#A8A8A8"; // (darkish grey)   TitleBar
     $color[1]   = "#800000"; // (red)
     $color[2]   = "#CC0000"; // (light red)      Warning/Error Messages
index 7852bd2..2fd996e 100644 (file)
@@ -4,6 +4,7 @@
        Theme Name:   "Dark Grey"
     **/
 
+    global $color;
     $color[0]   = "#B2B2B2"; // (gray)           TitleBar
     $color[1]   = "#800000"; // (red)
     $color[2]   = "#CC0000"; // (light red)      Warning/Error Messages
index 34cba15..9b55e84 100644 (file)
@@ -6,6 +6,7 @@
        Deep Ocean is a theme that is very blue.
     **/
 
+    global $color;
     $color[0]   = "#6188A9"; // (light gray)     TitleBar
     $color[1]   = "#800000"; // (red)
     $color[2]   = "#CC0000"; // (light red)      Warning/Error Messages
index 183b75e..d25d765 100644 (file)
@@ -16,6 +16,7 @@
        page.
     **/
 
+    global $color;
     $color[0]   = "#DCDCDC"; // (light gray)     TitleBar
     $color[1]   = "#800000"; // (red)
     $color[2]   = "#CC0000"; // (light red)      Warning/Error Messages
index 302d710..4384f69 100644 (file)
@@ -6,6 +6,7 @@
        This theme uses Forest-ish colors (mostly green)
     **/
 
+    global $color;
     $color[0]   = "#9EBFA7"; // (light purp)     TitleBar
     $color[1]   = "#800000"; // (red)
     $color[2]   = "#CC0000"; // (light red)      Warning/Error Messages
index d0e7f80..056289f 100644 (file)
@@ -5,6 +5,7 @@
 
     **/
 
+    global $color;
     $color[0]   = "#818181"; // (light gray)     TitleBar
     $color[1]   = "#FF0000"; // (red)
     $color[2]   = "#CC0000"; // (light red)      Warning/Error Messages
index f177269..7ae715d 100644 (file)
@@ -4,6 +4,7 @@
        Theme Name:   "Ice Theme"
     **/
 
+    global $color;
     $color[0]   = "#C0DAFF"; // TitleBar
     $color[1]   = "#800000"; // Error Message
     $color[2]   = "#CC0000"; // Warning/Error Messages
index 690bf1a..e00e6b4 100644 (file)
@@ -10,6 +10,7 @@
                                         necessary.
     **/
 
+    global $color;
     $color[0]   = "#B0B0B0"; // (gray)                         TitleBar
     $color[1]   = "#A04040"; // (dull red)                     Quoted Replies in Emails
     $color[2]   = "#F04040"; // (bright red)           Warning/Error Messages
index 4ae5737..257a867 100644 (file)
@@ -4,6 +4,7 @@
        Theme Name:   "Plain Blue"
     **/
 
+    global $color;
     $color[0]   = "#A2BED4"; // TitleBar
     $color[1]   = "#800000"; // 
     $color[2]   = "#CC0000"; // Warning/Error Messages
index f757c19..8cd6cc7 100644 (file)
@@ -6,6 +6,7 @@
        This Theme is composed entirely of shades of purple.
     **/
 
+    global $color;
     $color[0]   = "#AC9ECB"; // (light purp)     TitleBar
     $color[1]   = "#800000"; // (red)
     $color[2]   = "#CC0000"; // (light red)      Warning/Error Messages
index 483f718..af72b9a 100644 (file)
@@ -6,6 +6,7 @@
        This is a theme using Tan as its main color.
     **/
 
+    global $color;
     $color[0]   = "#CFB789"; // (darker tan)     TitleBar
     $color[1]   = "#800000"; // (red)
     $color[2]   = "#CC0000"; // (light red)      Warning/Error Messages
index 41832b0..4f43384 100644 (file)
@@ -4,6 +4,7 @@
        Theme Name:   "Sea Spray Theme"
     **/
 
+    global $color;
     $color[0]   = "#7CA4A4"; 
     $color[1]   = "#800000";
     $color[2]   = "#CC0000";
index 04ad90b..1499c08 100644 (file)
@@ -20,6 +20,7 @@
 
     **/
 
+    global $color;
     $color[0]   = "#F1EEE3"; // (light gray)     TitleBar
     $color[1]   = "#800000"; // (red)
     $color[2]   = "#CC0000"; // (light red)      Warning/Error Messages
index eb818c3..670a1e7 100644 (file)
@@ -7,6 +7,7 @@
        for Nerds" web site, www.slashdot.org.
     **/
 
+    global $color;
     $color[0]   = "#DCDCDC"; // (light gray)     TitleBar
     $color[1]   = "#800000"; // (red)
     $color[2]   = "#CC0000"; // (light red)      Warning/Error Messages