--- /dev/null
+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
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>---
** $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'));
** $Id$
**/
+ include("../src/validate.php");
+
// Function to include JavaScript code
function insert_javascript() {
?>
/* ================= 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();
** $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
** $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) {
**
** $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))
** $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);
** $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;
** $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);
** $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"));
** $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);
} else {
sqimap_mailbox_create ($imapConnection, $subfolder.$dm.$folder_name, "");
}
- fputs($imapConnection, "1 logout\n");
$location = get_location();
header ("Location: $location/folders.php?success=create");
** $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);
** $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");
** $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);
** $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";
** $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) {
** $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;
$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');
** $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
** $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) {
** $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);
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))
** $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');
?>
** $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);
** $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 = '';
** $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 = ''; }
** $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> ' . _("Use a signature?") . ' ';
else
echo '<input type=checkbox value="1" name=usesignature> ' . _("Use a signature?") . ' ';
- if ( $prefix_sig == true )
- echo '<input type="checkbox" value="1" name="prefixsig" checked>
-' . _( "Prefix signature with '--' ?" ) . '<BR>';
+ if ( ! isset($prefix_sig) || $prefix_sig == true )
+ echo '<input type="checkbox" value="1" name="prefixsig" checked> '
+ . _( "Prefix signature with '--' ?" ) . '<BR>';
else
- echo '<input type="checkbox" value="1" name="prefixsig"> ' . _( "
-Prefix signature with '--' ?" ) . '<BR>';
+ echo '<input type="checkbox" value="1" name="prefixsig"> ' .
+ _( "Prefix signature with '--' ?" ) . '<BR>';
echo "\n<textarea name=\"signature_edit\" rows=\"5\" cols=\"50\">$signature_abs</textarea><br>";
?>
</td>
** $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');
** $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);
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");
?>
** $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
/////////////////////////////////////////////////////////////////////////////////
/* $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);
** $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'));
--- /dev/null
+<?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;
+ }
+ }
+
+?>
** $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')
{
} 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";
}
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
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
page.
**/
+ global $color;
$color[0] = "#A8A8A8"; // (darkish grey) TitleBar
$color[1] = "#800000"; // (red)
$color[2] = "#CC0000"; // (light red) Warning/Error Messages
Theme Name: "Dark Grey"
**/
+ global $color;
$color[0] = "#B2B2B2"; // (gray) TitleBar
$color[1] = "#800000"; // (red)
$color[2] = "#CC0000"; // (light red) Warning/Error Messages
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
page.
**/
+ global $color;
$color[0] = "#DCDCDC"; // (light gray) TitleBar
$color[1] = "#800000"; // (red)
$color[2] = "#CC0000"; // (light red) Warning/Error Messages
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
**/
+ global $color;
$color[0] = "#818181"; // (light gray) TitleBar
$color[1] = "#FF0000"; // (red)
$color[2] = "#CC0000"; // (light red) Warning/Error Messages
Theme Name: "Ice Theme"
**/
+ global $color;
$color[0] = "#C0DAFF"; // TitleBar
$color[1] = "#800000"; // Error Message
$color[2] = "#CC0000"; // Warning/Error Messages
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
Theme Name: "Plain Blue"
**/
+ global $color;
$color[0] = "#A2BED4"; // TitleBar
$color[1] = "#800000"; //
$color[2] = "#CC0000"; // Warning/Error Messages
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
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
Theme Name: "Sea Spray Theme"
**/
+ global $color;
$color[0] = "#7CA4A4";
$color[1] = "#800000";
$color[2] = "#CC0000";
**/
+ global $color;
$color[0] = "#F1EEE3"; // (light gray) TitleBar
$color[1] = "#800000"; // (red)
$color[2] = "#CC0000"; // (light red) Warning/Error Messages
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