From: fidian Date: Thu, 19 Apr 2001 18:19:45 +0000 (+0000) Subject: * Got bored and copied all the validate.php and define() stuff to 1.1 X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=commitdiff_plain;h=f740c049d91feb836dd9633be9e8ff52c00d066f * Got bored and copied all the validate.php and define() stuff to 1.1 * 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 --- diff --git a/doc/rfc_documents.txt b/doc/rfc_documents.txt new file mode 100644 index 00000000..39327b24 --- /dev/null +++ b/doc/rfc_documents.txt @@ -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 diff --git a/doc/themes.txt b/doc/themes.txt index cdb6fdf6..aca97a98 100644 --- a/doc/themes.txt +++ b/doc/themes.txt @@ -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. ------ diff --git a/src/addrbook_popup.php b/src/addrbook_popup.php index 4373db8b..a387df21 100644 --- a/src/addrbook_popup.php +++ b/src/addrbook_popup.php @@ -10,23 +10,12 @@ ** $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')); diff --git a/src/addrbook_search.php b/src/addrbook_search.php index cda2f1bc..a4a92bb5 100644 --- a/src/addrbook_search.php +++ b/src/addrbook_search.php @@ -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('', - $color[8], $color[4], $color[7], $color[7], $color[7]); - plain_error_message(_("You need a valid user and password to access this page!") - . '
' - . _("Click here to log back in.") . ".", $color); - echo ''; - 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(); diff --git a/src/addrbook_search_html.php b/src/addrbook_search_html.php index 30f436b8..3602ef24 100644 --- a/src/addrbook_search_html.php +++ b/src/addrbook_search_html.php @@ -16,27 +16,15 @@ ** $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 diff --git a/src/addressbook.php b/src/addressbook.php index 75b0fd75..404b06c5 100644 --- a/src/addressbook.php +++ b/src/addressbook.php @@ -10,24 +10,13 @@ ** $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) { diff --git a/src/compose.php b/src/compose.php index 379f8b1f..bc688f6e 100644 --- a/src/compose.php +++ b/src/compose.php @@ -14,30 +14,17 @@ ** ** $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)) @@ -376,7 +363,6 @@ 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); @@ -453,7 +439,6 @@ //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)) @@ -494,7 +479,6 @@ displayPageHeader($color, $mailbox); showInputForm(); } else if (isset($do_delete)) { - is_logged_in(); displayPageHeader($color, $mailbox); if (isset($delete) && is_array($delete)) diff --git a/src/delete_message.php b/src/delete_message.php index 05e48899..072eaf6b 100644 --- a/src/delete_message.php +++ b/src/delete_message.php @@ -10,19 +10,12 @@ ** $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); diff --git a/src/download.php b/src/download.php index 78d3948d..501421a4 100644 --- a/src/download.php +++ b/src/download.php @@ -11,25 +11,20 @@ ** $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; diff --git a/src/empty_trash.php b/src/empty_trash.php index d4628014..6605b52a 100644 --- a/src/empty_trash.php +++ b/src/empty_trash.php @@ -11,19 +11,14 @@ ** $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); diff --git a/src/folders.php b/src/folders.php index 436cb362..f727337b 100644 --- a/src/folders.php +++ b/src/folders.php @@ -12,21 +12,13 @@ ** $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")); diff --git a/src/folders_create.php b/src/folders_create.php index 1cc0df49..30e60596 100644 --- a/src/folders_create.php +++ b/src/folders_create.php @@ -11,19 +11,12 @@ ** $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"); diff --git a/src/folders_delete.php b/src/folders_delete.php index e7d879db..65f57630 100644 --- a/src/folders_delete.php +++ b/src/folders_delete.php @@ -11,29 +11,20 @@ ** $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); diff --git a/src/folders_rename_do.php b/src/folders_rename_do.php index 7c8bb47b..e18a44ce 100644 --- a/src/folders_rename_do.php +++ b/src/folders_rename_do.php @@ -11,17 +11,11 @@ ** $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"); diff --git a/src/folders_rename_getname.php b/src/folders_rename_getname.php index ca143f9b..071c2d04 100644 --- a/src/folders_rename_getname.php +++ b/src/folders_rename_getname.php @@ -11,17 +11,11 @@ ** $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); diff --git a/src/help.php b/src/help.php index 93fa7a35..162f99eb 100644 --- a/src/help.php +++ b/src/help.php @@ -10,28 +10,18 @@ ** $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"; diff --git a/src/left_main.php b/src/left_main.php index 2a0c307d..2eb3af71 100644 --- a/src/left_main.php +++ b/src/left_main.php @@ -10,42 +10,19 @@ ** $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('', - $color[8], $color[4], $color[7], $color[7], $color[7]); - echo ""; - 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) { diff --git a/src/load_prefs.php b/src/load_prefs.php index 3691d079..e23c9a5e 100644 --- a/src/load_prefs.php +++ b/src/load_prefs.php @@ -11,14 +11,18 @@ ** $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); @@ -31,15 +35,18 @@ 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. @@ -58,17 +65,18 @@ $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; @@ -92,11 +101,14 @@ $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; @@ -110,6 +122,8 @@ 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; @@ -128,6 +142,8 @@ $left_size = 200; } + + global $editor_size, $use_signature, $prefix_sig; $editor_size = getPref($data_dir, $username, "editor_size"); if ($editor_size == "") $editor_size = 76; @@ -138,8 +154,10 @@ $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; @@ -148,14 +166,18 @@ 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]; @@ -164,7 +186,9 @@ $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; @@ -178,6 +202,8 @@ $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'; @@ -186,6 +212,8 @@ 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'); diff --git a/src/login.php b/src/login.php index aeb0d44c..2ebf129d 100644 --- a/src/login.php +++ b/src/login.php @@ -11,14 +11,10 @@ ** $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 diff --git a/src/move_messages.php b/src/move_messages.php index 14588066..ee676e20 100644 --- a/src/move_messages.php +++ b/src/move_messages.php @@ -10,19 +10,12 @@ ** $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) { diff --git a/src/options.php b/src/options.php index 9c8662b4..88f7e7aa 100644 --- a/src/options.php +++ b/src/options.php @@ -11,24 +11,14 @@ ** $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(); + ?>
@@ -52,14 +42,29 @@ 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 '
'._("Successfully saved personal information!").'

'; - } 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); @@ -96,8 +101,7 @@ 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)) diff --git a/src/options_display.php b/src/options_display.php index dae18568..9b433ec4 100644 --- a/src/options_display.php +++ b/src/options_display.php @@ -10,26 +10,17 @@ ** $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'); ?> diff --git a/src/options_folder.php b/src/options_folder.php index 9e50d846..dd5f21f0 100644 --- a/src/options_folder.php +++ b/src/options_folder.php @@ -10,26 +10,17 @@ ** $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); diff --git a/src/options_highlight.php b/src/options_highlight.php index a5ac5abc..de804a11 100644 --- a/src/options_highlight.php +++ b/src/options_highlight.php @@ -10,24 +10,15 @@ ** $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 = ''; diff --git a/src/options_order.php b/src/options_order.php index 670a5489..15c9fb77 100644 --- a/src/options_order.php +++ b/src/options_order.php @@ -10,24 +10,15 @@ ** $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 = ''; } diff --git a/src/options_personal.php b/src/options_personal.php index a382dad3..2937a5c6 100644 --- a/src/options_personal.php +++ b/src/options_personal.php @@ -10,26 +10,17 @@ ** $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'); @@ -70,12 +61,12 @@ echo '  ' . _("Use a signature?") . '  '; else echo '  ' . _("Use a signature?") . '  '; - if ( $prefix_sig == true ) - echo '   -' . _( "Prefix signature with '--' ?" ) . '
'; + if ( ! isset($prefix_sig) || $prefix_sig == true ) + echo '  ' + . _( "Prefix signature with '--' ?" ) . '
'; else - echo '  ' . _( " -Prefix signature with '--' ?" ) . '
'; + echo '  ' . + _( "Prefix signature with '--' ?" ) . '
'; echo "\n
"; ?> diff --git a/src/read_body.php b/src/read_body.php index 84997f6c..9436d2c2 100644 --- a/src/read_body.php +++ b/src/read_body.php @@ -11,24 +11,16 @@ ** $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'); diff --git a/src/redirect.php b/src/redirect.php index 4a4097a4..5e7f9d05 100644 --- a/src/redirect.php +++ b/src/redirect.php @@ -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. @@ -29,9 +28,17 @@ session_set_cookie_params (0, $base_uri); session_start(); + session_unregister ('user_is_logged_in'); session_register ('base_uri'); if(!isset($login_username)) { + echo "\n"; + echo "

"; + echo "
"; + echo ""._("You must be logged in to access this page.")."
"; + echo ""._("Go to the login page")."\n"; + echo "
"; + echo "\n"; exit; } @@ -41,15 +48,9 @@ } - 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'); @@ -62,7 +63,14 @@ $login_username = strtolower($login_username); $imapConnection = sqimap_login($login_username, $key, $imapServerAddress, $imapPort, 0); if (!$imapConnection) { - exit; + echo "\n"; + echo "

"; + echo "
"; + echo ""._("There was an error contacting the mail server.")."
"; + echo _("Contact your administrator for help.")."\n"; + echo "
"; + echo "\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"); ?> diff --git a/src/right_main.php b/src/right_main.php index 1f3873a4..7c338929 100644 --- a/src/right_main.php +++ b/src/right_main.php @@ -11,41 +11,18 @@ ** $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('', - $color[8], $color[4], $color[7], $color[7], $color[7]); - plain_error_message(_("You need a valid user and password to access this page!") - . '
' - . _("Click here to log back in.") . ".", $color); - echo ''; - 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'); ?> ', - $color[8], $color[4], $color[7], $color[7], $color[7]); - plain_error_message(_("You need a valid user and password to access this page!") - . '
' - . _("Click here to log back in.") . '.', $color); - echo ''; - 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); diff --git a/src/signout.php b/src/signout.php index 22449ffd..83c78ccd 100644 --- a/src/signout.php +++ b/src/signout.php @@ -11,21 +11,23 @@ ** $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 index 00000000..0594d870 --- /dev/null +++ b/src/validate.php @@ -0,0 +1,102 @@ + $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; + } + } + +?> diff --git a/src/webmail.php b/src/webmail.php index 37ac05da..ebd365b6 100644 --- a/src/webmail.php +++ b/src/webmail.php @@ -13,35 +13,17 @@ ** $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('', - $color[8], $color[4], $color[7], $color[7], $color[7]); - plain_error_message(_("You need a valid user and password to access this page!") - . "
" - . _("Click here to log back in.") . ".", $color); - echo ''; - 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 // @@ -59,7 +41,16 @@ echo $org_title; echo ''; - $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"; } diff --git a/themes/black_bean_burrito_theme.php b/themes/black_bean_burrito_theme.php index 57bf70f8..23464e0e 100644 --- a/themes/black_bean_burrito_theme.php +++ b/themes/black_bean_burrito_theme.php @@ -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 diff --git a/themes/bluesnews_theme.php b/themes/bluesnews_theme.php index 590c623e..be165c5c 100644 --- a/themes/bluesnews_theme.php +++ b/themes/bluesnews_theme.php @@ -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 diff --git a/themes/bluesteel_theme.php b/themes/bluesteel_theme.php index 6123b46c..8c42a544 100644 --- a/themes/bluesteel_theme.php +++ b/themes/bluesteel_theme.php @@ -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 diff --git a/themes/dark_grey_theme.php b/themes/dark_grey_theme.php index 7852bd2d..2fd996ea 100644 --- a/themes/dark_grey_theme.php +++ b/themes/dark_grey_theme.php @@ -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 diff --git a/themes/deepocean_theme.php b/themes/deepocean_theme.php index 34cba159..9b55e847 100644 --- a/themes/deepocean_theme.php +++ b/themes/deepocean_theme.php @@ -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 diff --git a/themes/default_theme.php b/themes/default_theme.php index 183b75ed..d25d765e 100644 --- a/themes/default_theme.php +++ b/themes/default_theme.php @@ -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 diff --git a/themes/forest_theme.php b/themes/forest_theme.php index 302d710a..4384f691 100644 --- a/themes/forest_theme.php +++ b/themes/forest_theme.php @@ -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 diff --git a/themes/high_contrast_theme.php b/themes/high_contrast_theme.php index d0e7f806..056289f1 100644 --- a/themes/high_contrast_theme.php +++ b/themes/high_contrast_theme.php @@ -5,6 +5,7 @@ **/ + global $color; $color[0] = "#818181"; // (light gray) TitleBar $color[1] = "#FF0000"; // (red) $color[2] = "#CC0000"; // (light red) Warning/Error Messages diff --git a/themes/ice_theme.php b/themes/ice_theme.php index f177269d..7ae715d5 100644 --- a/themes/ice_theme.php +++ b/themes/ice_theme.php @@ -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 diff --git a/themes/maize_theme.php b/themes/maize_theme.php index 690bf1a9..e00e6b44 100644 --- a/themes/maize_theme.php +++ b/themes/maize_theme.php @@ -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 diff --git a/themes/plain_blue_theme.php b/themes/plain_blue_theme.php index 4ae57373..257a8673 100644 --- a/themes/plain_blue_theme.php +++ b/themes/plain_blue_theme.php @@ -4,6 +4,7 @@ Theme Name: "Plain Blue" **/ + global $color; $color[0] = "#A2BED4"; // TitleBar $color[1] = "#800000"; // $color[2] = "#CC0000"; // Warning/Error Messages diff --git a/themes/purple_theme.php b/themes/purple_theme.php index f757c195..8cd6cc79 100644 --- a/themes/purple_theme.php +++ b/themes/purple_theme.php @@ -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 diff --git a/themes/sandstorm_theme.php b/themes/sandstorm_theme.php index 483f7181..af72b9a1 100644 --- a/themes/sandstorm_theme.php +++ b/themes/sandstorm_theme.php @@ -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 diff --git a/themes/seaspray_theme.php b/themes/seaspray_theme.php index 41832b02..4f433846 100644 --- a/themes/seaspray_theme.php +++ b/themes/seaspray_theme.php @@ -4,6 +4,7 @@ Theme Name: "Sea Spray Theme" **/ + global $color; $color[0] = "#7CA4A4"; $color[1] = "#800000"; $color[2] = "#CC0000"; diff --git a/themes/servery_theme.php b/themes/servery_theme.php index 04ad90b4..1499c083 100644 --- a/themes/servery_theme.php +++ b/themes/servery_theme.php @@ -20,6 +20,7 @@ **/ + global $color; $color[0] = "#F1EEE3"; // (light gray) TitleBar $color[1] = "#800000"; // (red) $color[2] = "#CC0000"; // (light red) Warning/Error Messages diff --git a/themes/slashdot_theme.php b/themes/slashdot_theme.php index eb818c32..670a1e7a 100644 --- a/themes/slashdot_theme.php +++ b/themes/slashdot_theme.php @@ -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