# Luke Ehresman (luke@squirrelmail.org)
#
# A simple configure script to configure squirrelmail
+#
+# $Id$
############################################################
$conf_pl_version = "x62";
**
** NOTE. This class should not be used directly. Use the
** "AddressBook" class instead.
+ **
+ ** $Id$
**/
require_once("DB.php");
**
** NOTE. This class should not be used directly. Use the
** "AddressBook" class instead.
+ **
+ ** $Id$
**/
class abook_ldap_server extends addressbook_backend {
**
** NOTE. This class should not be used directly. Use the
** "AddressBook" class instead.
+ **
+ ** $Id$
**/
class abook_local_file extends addressbook_backend {
**
** Functions and classes for the addressbook system.
**
+ ** $Id$
**/
$addressbook_php = true;
** This contains functions that work with array manipulation. They
** will help sort, and do other types of things with arrays
**
+ ** $Id$
**/
$array_php = true;
$GLOBALS["col"] = $col; // Column or Columns as an array
$GLOBALS["dir"] = $dir; // Direction, a positive number for ascending a negative for descending
- usort($ary,comp2);
+ usort($ary,'comp2');
return $ary;
}
**
** Contains functions used to do authentication.
**
+ ** $Id$
**/
$auth_php = true;
** <Tue,> 29 Jun 1999 09:52:11 -0500 (EDT)
** (as specified in RFC 822) -- "Tue" is optional
**
+ ** $Id$
**/
$date_php = true;
** This contains all messages, including information, error, and just
** about any other message you can think of.
**
+ ** $Id$
**/
$display_messages_php = true;
<?php
/** This just includes the different sections of the imap functions.
** They have been organized into these sections for simplicity sake.
+ **
+ ** $Id$
**/
$imap_php = true;
** imap.php
**
** This implements all functions that do general imap functions.
+ **
+ ** $Id$
**/
$imap_general_debug = false;
global $color, $squirrelmail_language, $imap_general_debug;
$read = fgets($imap_stream, 9096);
+
if (ereg("^\* [0-9]+ FETCH.*{([0-9]+)}", $read, $regs)) {
$size = $regs[1];
+ } else {
+ $size = 0;
}
+ $data = Array();
+
$continue = true;
while ($continue) {
// Continue if needed for this single line
$c = explode(' ', $read[0]);
for ($i=2; $i < count($c); $i++) {
- list($k, $v) = explode('=', $c[$i]);
- $sqimap_capabilities[$k] = ($v)?$v:TRUE;
+ $cap_list = explode('=', $c[$i]);
+ if (isset($cap_list[1]))
+ $sqimap_capabilities[$cap_list[0]] = $cap_list[1];
+ else
+ $sqimap_capabilities[$cap_list[0]] = TRUE;
}
}
return $sqimap_capabilities[$capability];
** imap_mailbox.php
**
** This impliments all functions that manipulate mailboxes
+ **
+ ** $Id$
**/
/******************************************************************************
if ($list_special_folders_first == true) {
// Then list special folders and their subfolders
- for ($i = 0 ; $i <= count($boxes) ; $i++) {
+ for ($i = 0 ; $i < count($boxes) ; $i++) {
if ($move_to_trash &&
eregi("^" . quotemeta($trash_folder) . "(" .
quotemeta($dm) . ".*)?$", $boxes[$i]["unformatted"])) {
}
// Put INBOX.* folders ahead of the rest
- for ($i = 0; $i <= count($boxes); $i++) {
+ for ($i = 0; $i < count($boxes); $i++) {
if (eregi("^inbox\.", $boxes[$i]["unformatted"]) &&
- ($boxes[$i]["used"] == false)) {
+ (!isset($boxes[$i]["used"]) || $boxes[$i]["used"] == false)) {
$boxesnew[] = $boxes[$i];
$boxes[$i]["used"] = true;
}
/**
** imap_messages.php
**
- ** This implements functions that manipulate messages
+ ** This implements functions that manipulate messages
+ **
+ ** $Id$
**/
if (!isset($mime_php)) include "../functions/mime.php";
** Returns some general header information -- FROM, DATE, and SUBJECT
******************************************************************************/
class small_header {
- var $from, $subject, $date, $to, $priority, $message_id;
+ var $from = '', $subject = '', $date = '', $to = '',
+ $priority = 0, $message_id = 0, $cc = '';
}
function sqimap_get_small_header ($imap_stream, $id, $sent) {
$from = _("Unknown Sender");
$priority = "0";
$messageid = "<>";
+ $cc = "";
+ $to = "";
+ $date = "";
+ $type[0] = "";
+ $type[1] = "";
$g = 0;
for ($i = 0; $i < count($read); $i++) {
$header->size = $size;
$header->type0 = $type[0];
$header->type1 = $type[1];
-
+
return $header;
}
******************************************************************************/
function sqimap_get_message ($imap_stream, $id, $mailbox) {
$header = sqimap_get_message_header($imap_stream, $id, $mailbox);
- $msg = sqimap_get_message_body($imap_stream, &$header);
- return $msg;
+ return sqimap_get_message_body($imap_stream, &$header);
}
/******************************************************************************
/** FROM **/
else if (strtolower(substr($read[$i], 0, 5)) == "from:") {
$hdr->from = trim(substr($read[$i], 5, strlen($read[$i]) - 6));
- if ($hdr->replyto == "")
+ if (! isset($hdr->replyto) || $hdr->replyto == "")
$hdr->replyto = $hdr->from;
$i++;
}
******************************************************************************/
function sqimap_get_message_body ($imap_stream, &$header) {
$id = $header->id;
- return decodeMime($imap_stream, $body, &$header);
+ return decodeMime($imap_stream, &$header);
}
-<?php
+<?php
/******************************************************************
** IMAP SEARCH ROUTIES
+ ** $Id$
*****************************************************************/
if (!isset($imap_php))
include("../functions/imap.php");
** This contains functions that display mailbox information, such as the
** table row that has sender, date, subject, etc...
**
+ ** $Id$
**/
$mailbox_display_php = true;
echo "<TR>\n";
- if ($msg["FLAG_FLAGGED"] == true) { $flag = "<font color=$color[2]>"; $flag_end = "</font>"; }
- if ($msg["FLAG_SEEN"] == false) { $bold = "<b>"; $bold_end = "</b>"; }
- if ($mailbox == $sent_folder) { $italic = "<i>"; $italic_end = "</i>"; }
- if ($msg["FLAG_DELETED"]) { $fontstr = "<font color=\"$color[9]\">"; $fontstr_end = "</font>"; }
+ if (isset($msg['FLAG_FLAGGED']) && $msg["FLAG_FLAGGED"] == true)
+ {
+ $flag = "<font color=$color[2]>";
+ $flag_end = "</font>";
+ }
+ else
+ {
+ $flag = "";
+ $flag_end = "";
+ }
+ if (isset($msg['FLAG_SEEN']) && $msg["FLAG_SEEN"] == false)
+ {
+ $bold = "<b>";
+ $bold_end = "</b>";
+ }
+ else
+ {
+ $bold = "";
+ $bold_end = "";
+ }
+ if ($mailbox == $sent_folder)
+ {
+ $italic = "<i>";
+ $italic_end = "</i>";
+ }
+ else
+ {
+ $italic = "";
+ $italic_end = "";
+ }
+ if (isset($msg['FLAG_DELETED']) && $msg["FLAG_DELETED"])
+ {
+ $fontstr = "<font color=\"$color[9]\">";
+ $fontstr_end = "</font>";
+ }
+ else
+ {
+ $fontstr = "";
+ $fontstr_end = "";
+ }
for ($i=0; $i < count($message_highlight_list); $i++) {
if (trim($message_highlight_list[$i]["value"]) != "") {
}
}
- if (!$hlt_color)
+ if (!isset($hlt_color))
$hlt_color = $color[4];
if ($where && $what) {
break;
case 4: # subject
echo " <td bgcolor=$hlt_color>$bold";
- echo "<a href=\"read_body.php?mailbox=$urlMailbox&passed_id=".$msg["ID"]."&startMessage=$startMessage&show_more=0$search_stuff\"";
- do_hook("subject_link");
- echo ">$flag$subject$flag_end</a>$bold_end</td>\n";
+ if (! isset($search_stuff))
+ $search_stuff = "";
+ echo "<a href=\"read_body.php?mailbox=$urlMailbox&passed_id=".$msg["ID"]."&startMessage=$startMessage&show_more=0$search_stuff\"";
+ do_hook("subject_link");
+ echo ">$flag$subject$flag_end</a>$bold_end</td>\n";
break;
case 5: # flags
$stuff = false;
echo " <td bgcolor=$hlt_color align=center width=1% nowrap><b><small>\n";
- if ($msg["FLAG_ANSWERED"] == true) {
+ if (isset($msg['FLAG_ANSWERED']) &&
+ $msg["FLAG_ANSWERED"] == true) {
echo "A\n";
$stuff = true;
}
echo "<font color=$color[1]>!</font>\n";
$stuff = true;
}
- if ($msg["FLAG_DELETED"]) {
+ if (isset($msg['FLAG_DELETED']) && $msg["FLAG_DELETED"]) {
echo "<font color=\"$color[1]\">D</font>\n";
$stuff = true;
}
} else {
$end = $numMessages;
}
+ if ($end > $numMessages) $end = $numMessages;
while ($j < $end) {
$date[$j] = ereg_replace(" ", " ", $date[$j]);
$tmpdate = explode(" ", trim($date[$j]));
/* Only ignore messages flagged as deleted if we are using a
* trash folder or auto_expunge */
- if (($move_to_trash || $auto_expunge) && $sort != 6)
+ if (((isset($move_to_trash) && $move_to_trash)
+ || (isset($auto_expunge) && $auto_expunge)) && $sort != 6)
{
/** Find and remove the ones that are deleted */
$i = 0;
}
$numMessages = $i;
} else {
+ if (! isset($messages))
+ $messages = array();
$msgs = $messages;
}
}
$More .= "<A HREF=\"right_main.php?use_mailbox_cache=$use&startMessage=$nextGroup&mailbox=$urlMailbox\" TARGET=\"right\">". _("Next") ."</A>\n";
}
+ if (! isset($msg))
+ $msg = "";
mail_message_listing_beginning($imapConnection,
"move_messages.php?msg=$msg&mailbox=$urlMailbox&startMessage=$startMessage",
$mailbox, $sort, $Message, $More, $startMessage);
else
$i = 1;
reset($msort);
+ $k = 0;
do {
$key = key($msort);
next($msort);
** This contains the functions necessary to detect and decode MIME
** messages.
**
+ ** $Id$
**/
$debug_mime = false;
/** msg_header contains generic variables for values that **/
/** could be in a header. **/
- var $type0, $type1, $boundary, $charset, $encoding, $size;
- var $to, $from, $date, $cc, $bcc, $reply_to, $subject;
- var $id, $mailbox, $description;
- var $entity_id, $message_id, $charset;
+ var $type0 = '', $type1 = '', $boundary = '', $charset = '';
+ var $encoding = '', $size = 0, $to = '', $from = '', $date = '';
+ var $cc = '', $bcc = '', $reply_to = '', $subject = '';
+ var $id = 0, $mailbox = '', $description = '';
+ var $entity_id = 0, $message_id = 0;
}
class message {
$id = $header->id;
fputs ($imap_stream, "a001 FETCH $id BODYSTRUCTURE\r\n");
+ //
+ // This should use sqimap_read_data instead of reading it itself
+ //
$read = fgets ($imap_stream, 10000);
$response = substr($read, 0, 4);
+ $bodystructure = "";
while ($response != "a001") {
$bodystructure .= $read;
$read = fgets ($imap_stream, 10000);
$response = substr($read, 0, 4);
}
- // $read = strtolower($bodystructure);
$read = $bodystructure;
if ($debug_mime) echo "<tt>$read</tt><br><br>\n";
// loop through until we find the matching quote, and return that as a string
$pos = 1;
$char = substr($structure, $pos, 1);
+ $text = "";
while ($char != "\"" && $pos < strlen($structure)) {
$text .= $char;
$pos++;
// comment me
$end = mime_match_parenthesis (0, $structure);
$sub = substr($structure, 1, $end-1);
+ if (! isset($properties))
+ $properties = array();
$properties = mime_get_props($properties, $sub);
$structure = substr($structure, strlen($sub) + 2);
} else {
if ($char == "\"") {
$pos = 1;
$char = substr($structure, $pos, 1);
+ $tmp = "";
while ($char != "\"" && $pos < strlen($structure)) {
$tmp .= $char;
$pos++;
if ($char == "\"") {
$pos = 1;
$char = substr($structure, $pos, 1);
+ $value = "";
while ($char != "\"" && $pos < strlen($structure)) {
$value .= $char;
$pos++;
} else if ($char == "(") {
$end = mime_match_parenthesis (0, $structure);
$sub = substr($structure, 1, $end-1);
+ if (! isset($props))
+ $props = array();
$props = mime_get_props($props, $sub);
$structure = substr($structure, strlen($sub) + 2);
}
/** This is the first function called. It decides if this is a multipart
message or if it should be handled as a single entity
**/
- function decodeMime ($imap_stream, $body, $header) {
+ function decodeMime ($imap_stream, $header) {
global $username, $key, $imapServerAddress, $imapPort;
return mime_structure ($imap_stream, $header);
}
if ($message->header->type0 == "text") {
if ($message->header->type1 == "plain" ||
$message->header->type1 == "html") {
- return $message->header->entity_id;
+ if (isset($message->header->entity_id))
+ return $message->header->entity_id;
+ return 0;
}
} else {
for ($i=0; $message->entities[$i]; $i++) {
/** Display the ATTACHMENTS: message if there's more than one part **/
$body .= "</TD></TR></TABLE>";
- if ($message->entities) {
+ if (isset($message->entities)) {
$body .= formatAttachments ($message, $ent_num, $message->header->mailbox, $id);
}
} else {
**
** Prints the page header (duh)
**
+ ** $Id$
**/
session_start();
**
** Documentation on how to write plugins might show up some time.
**
+ ** $Id$
**/
function do_hook ($name) {
global $squirrelmail_plugin_hooks;
$Data = func_get_args();
- if (is_array($squirrelmail_plugin_hooks[$name])) {
+ if (isset($squirrelmail_plugin_hooks[$name]) &&
+ is_array($squirrelmail_plugin_hooks[$name])) {
foreach ($squirrelmail_plugin_hooks[$name] as $id => $function) {
// Add something to set correct gettext domain for plugin
if (function_exists($function)) {
}
// On startup, register all plugins configured for use
- if (is_array($plugins))
+ if (isset($plugins) && is_array($plugins))
foreach ($plugins as $id => $name)
use_plugin($name);
** prefs.php
**
** This contains functions for manipulating user preferences
+ **
+ ** $Id$
**/
$prefs_php = true;
**
** This contains all the functions needed to send messages through
** an smtp server or sendmail.
+ **
+ ** $Id$
**/
$smtp_php = true;
// stored in a cookie.
function OneTimePadEncrypt ($string, $epad) {
$pad = base64_decode($epad);
+ $encrypted = "";
for ($i = 0; $i < strlen ($string); $i++) {
$encrypted .= chr (ord($string[$i]) ^ ord($pad[$i]));
}
function OneTimePadDecrypt ($string, $epad) {
$pad = base64_decode($epad);
$encrypted = base64_decode ($string);
-
+ $decrypted = "";
for ($i = 0; $i < strlen ($encrypted); $i++) {
$decrypted .= chr (ord($encrypted[$i]) ^ ord($pad[$i]));
}
// getrusage
if (function_exists("getrusage")) {
$dat = getrusage();
- sq_mt_seed(md5($dat["ru_nswap"] . $dat["ru_majflt"] .
- $dat["ru_utime.tv_sec"] . $dat["ru_utime.tv_usec"]));
+ $Str = "";
+ foreach ($dat as $k => $v)
+ {
+ $Str .= "$k = $v\n";
+ }
+ sq_mt_seed(md5($Str));
}
// Apache-specific
function OneTimePadCreate ($length=100) {
sq_mt_randomize();
-
+
+ $pad = "";
for ($i = 0; $i < $length; $i++) {
$pad .= chr(mt_rand(0,255));
}
<?php
+
+ /* $Id$ */
+
$tree_php = true;
if (!isset($imap_php))
<?php
/* URL Passing code to allow links from with in emails */
+ /* $Id$ */
$url_parser_php = true;
**
** Frameset for the JavaScript version of the address book.
**
+ ** $Id$
**/
session_start();
** NOTE: A lot of this code is similar to the code in
** addrbook_search_html.html -- If you change one,
** change the other one too!
+ **
+ ** $Id$
**/
// Function to include JavaScript code
** NOTE: A lot of this code is similar to the code in
** addrbook_search.html -- If you change one, change
** the other one too!
+ **
+ ** $Id$
**/
session_start();
print "<CENTER>\n";
printf(" <nobr><STRONG>%s</STRONG>\n", _("Search for"));
addr_insert_hidden();
+ if (! isset($addrquery))
+ $addrquery = "";
printf(" <INPUT TYPE=text NAME=addrquery VALUE=\"%s\" SIZE=26>\n",
htmlspecialchars($addrquery));
// Show personal addressbook
if(!isset($addrquery) || !empty($listall)) {
- if($backend != -1 || !isset($addrquery)) {
+ if((isset($backend) && $backend != -1) || !isset($addrquery)) {
if(!isset($addrquery))
$backend = $abook->localbackend;
**
** Manage personal address book.
**
+ ** $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($strings_php))
- include("../functions/strings.php");
if (!isset($page_header_php))
include("../functions/page_header.php");
if (!isset($display_messages_php))
printf("<TD BGCOLOR=\"%s\" ALIGN=left>".
"<INPUT NAME=\"%s[nickname]\" SIZE=15 VALUE=\"%s\">".
" <SMALL>%s</SMALL></TD></TR>\n",
- $color[4], $name, htmlspecialchars($values["nickname"]),
+ $color[4], $name,
+ (isset($values["nickname"]))?
+ htmlspecialchars($values["nickname"]):"",
_("Must be unique"));
printf("<TR><TD WIDTH=50 BGCOLOR=\"$color[4]\" ALIGN=RIGHT>%s:</TD>",
_("E-mail address"));
printf("<TD BGCOLOR=\"%s\" ALIGN=left>".
"<INPUT NAME=\"%s[email]\" SIZE=45 VALUE=\"%s\"></TD></TR>\n",
- $color[4], $name, htmlspecialchars($values["email"]));
+ $color[4], $name,
+ (isset($values["email"]))?
+ htmlspecialchars($values["email"]):"");
printf("<TR><TD WIDTH=50 BGCOLOR=\"$color[4]\" ALIGN=RIGHT>%s:</TD>",
_("First name"));
printf("<TD BGCOLOR=\"%s\" ALIGN=left>".
"<INPUT NAME=\"%s[firstname]\" SIZE=45 VALUE=\"%s\"></TD></TR>\n",
- $color[4], $name, htmlspecialchars($values["firstname"]));
+ $color[4], $name,
+ (isset($values["firstname"]))?
+ htmlspecialchars($values["firstname"]):"");
printf("<TR><TD WIDTH=50 BGCOLOR=\"$color[4]\" ALIGN=RIGHT>%s:</TD>",
_("Last name"));
printf("<TD BGCOLOR=\"%s\" ALIGN=left>".
"<INPUT NAME=\"%s[lastname]\" SIZE=45 VALUE=\"%s\"></TD></TR>\n",
- $color[4], $name, htmlspecialchars($values["lastname"]));
+ $color[4], $name,
+ (isset($values["lastname"]))?
+ htmlspecialchars($values["lastname"]):"");
printf("<TR><TD WIDTH=50 BGCOLOR=\"$color[4]\" ALIGN=RIGHT>%s:</TD>",
_("Additional info"));
printf("<TD BGCOLOR=\"%s\" ALIGN=left>".
"<INPUT NAME=\"%s[label]\" SIZE=45 VALUE=\"%s\"></TD></TR>\n",
- $color[4], $name, htmlspecialchars($values["label"]));
+ $color[4], $name,
+ (isset($values["label"]))?
+ htmlspecialchars($values["label"]):"");
printf("<TR><TD COLSPAN=2 BGCOLOR=\"%s\" ALIGN=center>\n".
"<INPUT TYPE=submit NAME=\"%s[SUBMIT]\" VALUE=\"%s\"></TD></TR>\n",
** - Start new mail
** - Add an attachment
** - Send mail
+ **
+ ** $Id$
**/
session_start();
- if (!isset($config_php))
- include("../config/config.php");
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))
$id = $reply_id;
- if ($id) {
+ if (isset($id)) {
sqimap_mailbox_select($imapConnection, $mailbox);
$message = sqimap_get_message($imapConnection, $id, $mailbox);
$orig_header = $message->header;
$mailbox = "INBOX";
if(isset($send)) {
- if ($HTTP_POST_FILES['attachfile']['tmp_name'] &&
+ if (isset($HTTP_POST_FILES['attachfile']) &&
+ $HTTP_POST_FILES['attachfile']['tmp_name'] &&
$HTTP_POST_FILES['attachfile']['tmp_name'] != 'none')
$AttachFailure = saveAttachedFiles();
- if (checkInput(false) && ! $AttachFailure) {
+ if (checkInput(false) && ! isset($AttachFailure)) {
$urlMailbox = urlencode ($mailbox);
+ if (! isset($reply_id))
+ $reply_id = 0;
sendMessage($send_to, $send_to_cc, $send_to_bcc, $subject, $body, $reply_id);
header ("Location: right_main.php?mailbox=$urlMailbox&sort=$sort&startMessage=1");
} else {
showInputForm();
//sqimap_logout($imapConnection);
}
- } else if ($html_addr_search_done) {
+ } else if (isset($html_addr_search_done)) {
is_logged_in();
displayPageHeader($color, $mailbox);
}
showInputForm();
- } else if ($html_addr_search) {
+ } else if (isset($html_addr_search)) {
// I am using an include so as to elminiate an extra unnecessary click. If you
// can think of a better way, please implement it.
include ("./addrbook_search_html.php");
}
showInputForm();
- } else if ($smtpErrors) {
+ } else if (isset($smtpErrors)) {
$imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);
displayPageHeader($color, $mailbox);
$newmail = true;
- if ($forward_id && $ent_num) getAttachments(0);
+ if (isset($forward_id) && isset($ent_num)) getAttachments(0);
newMail();
showInputForm();
** Licensed under the GNU GPL. For full terms see the file COPYING.
**
** Deletes a meesage from the IMAP server
- **
+ **
+ ** $Id$
**/
session_start();
- if (!isset($config_php))
- include("../config/config.php");
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))
**
** Handles attachment downloads to the users computer.
** Also allows displaying of attachments when possible.
+ **
+ ** $Id$
**/
if (!isset($config_php))
**
** Handles deleting messages from the trash folder without
** deleting subfolders.
+ **
+ ** $Id$
**/
session_start();
** Handles all interaction between the user and the other folder
** scripts which do most of the work. Also handles the Special
** Folders.
+ **
+ ** $Id$
**/
session_start();
- if (!isset($config_php))
- include("../config/config.php");
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))
echo " </b></TD></TR>\n";
echo "</TABLE>\n";
- if ($success || $sent_create == "true" || $trash_create == "true") {
+ if ((isset($success) && $success) ||
+ (isset($sent_create) && $sent_create == "true") ||
+ (isset($trash_create) && $trash_create == "true")) {
echo "<table width=100% align=center cellpadding=3 cellspacing=0 border=0>\n";
echo " <tr><td><center>\n";
if ($success == "subscribe") {
**
** Creates folders on the IMAP server.
** Called from folders.php
+ **
+ ** $Id$
**/
session_start();
**
** Deltes folders from the IMAP server.
** Called from the folders.php
+ **
+ ** $Id$
**/
session_start();
**
** Does the actual renaming of files on the IMAP server.
** Called from the folders.php
+ **
+ ** $Id$
**/
session_start();
**
** Gets folder names and enables renaming
** Called from folders.php
+ **
+ ** $Id$
**/
session_start();
**
** Subscribe and unsubcribe form folders.
** Called from folders.php
+ **
+ ** $Id$
**/
session_start();
**
** Displays help for the user
**
+ ** $Id$
**/
session_start();
** This is the code for the left bar. The left bar shows the folders
** available, and has cookie information.
**
+ ** $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($strings_php))
- include("../functions/strings.php");
if (!isset($imap_php))
include("../functions/imap.php");
if (!isset($page_header_php))
}
}
- $line .= "<NOBR>";
+ $line = "<NOBR>";
if ($unseen > 0)
$line .= "<B>";
if ($unseen > 0)
$line .= "</B>";
- if ($unseen_found) {
+ if (isset($unseen_found) && $unseen_found) {
$line .= " <small>$unseen_string</small>";
}
$line .= replace_spaces($mailbox);
$line .= "</FONT>";
} else {
+ if (! isset($boxes[$i]["unseen"]))
+ $boxes[$i]["unseen"] = 0;
$line .= formatMailboxName($imapConnection, $mailbox, $boxes[$i]["unformatted"], $delimeter, $boxes[$i]["unseen"]);
}
} else {
** Loads preferences from the $username.pref file used by almost
** every other script in the source directory and alswhere.
**
+ ** $Id$
**/
if (!isset($config_php))
}
}
- if (!$download_php) session_register("theme_css");
+ if (!isset($download_php)) session_register("theme_css");
$use_javascript_addr_book = getPref($data_dir, $username, "use_javascript_addr_book");
if ($use_javascript_addr_book == "")
** Licensed under the GNU GPL. For full terms see the file COPYING.
**
** Enables message moving between folders on the IMAP server.
+ **
+ ** $Id$
**/
session_start();
- if (!isset($config_php))
- include("../config/config.php");
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))
sqimap_mailbox_select($imapConnection, $mailbox);
// expunge-on-demand if user isn't using move_to_trash or auto_expunge
- if($expungeButton) {
+ if(isset($expungeButton)) {
sqimap_mailbox_expunge($imapConnection, $mailbox, true);
$location = get_location();
if ($where && $what)
header ("Location: $location/right_main.php?sort=$sort&startMessage=$startMessage&mailbox=". urlencode($mailbox));
}
// undelete messages if user isn't using move_to_trash or auto_expunge
- elseif($undeleteButton) {
+ elseif(isset($undeleteButton)) {
if (is_array($msg) == 1) {
// Removes \Deleted flag from selected messages
$j = 0;
}
}
// If the delete button was pressed, the moveButton variable will not be set.
- elseif (!$moveButton) {
+ elseif (!isset($moveButton)) {
if (is_array($msg) == 1) {
// Marks the selected messages ad 'Deleted'
$j = 0;
** Displays the options page. Pulls from proper user preference files
** and config.php. Displays preferences as selected and other options.
**
+ ** $Id$
**/
session_start();
- if (!isset($config_php))
- include("../config/config.php");
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))
</td></tr></table>
<?php
- if ($submit_personal) {
+ if (isset($submit_personal)) {
# Save personal information
if (isset($full_name)) setPref($data_dir, $username, "full_name", sqStripSlashes($full_name));
if (isset($email_address)) setPref($data_dir, $username, "email_address", sqStripSlashes($email_address));
do_hook("options_personal_save");
echo "<br><center><b>"._("Successfully saved personal information!")."</b></center><br>";
- } else if ($submit_display) {
+ } else if (isset($submit_display)) {
# Save display preferences
setPref($data_dir, $username, "chosen_theme", $chosentheme);
setPref($data_dir, $username, "show_num", $shownum);
echo "<br><center><b>"._("Successfully saved display preferences!")."</b><br>";
echo "<a href=\"../src/webmail.php\" target=_top>" . _("Refresh Page") . "</a></center><br>";
- } else if ($submit_folder) {
+ } else if (isset($submit_folder)) {
# Save folder preferences
if ($trash != "none") {
setPref($data_dir, $username, "move_to_trash", true);
**
** Displays all optinos about display preferences
**
+ ** $Id$
**/
session_start();
**
** Displays all options relating to folders
**
+ ** $Id$
**/
session_start();
**
** Displays message highlighting options
**
+ ** $Id$
**/
session_start();
**
** Displays message highlighting options
**
+ ** $Id$
**/
session_start();
**
** Displays all options relating to personal information
**
+ ** $Id$
**/
session_start();
- if (!isset($config_php))
- include("../config/config.php");
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))
**
** This file is used for reading the msgs array and displaying
** the resulting emails in the right frame.
+ **
+ ** $Id$
**/
session_start();
- if (!isset($config_php))
- include("../config/config.php");
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))
do_hook("html_top");
displayPageHeader($color, $mailbox);
- if ($view_hdr) {
+ if (isset($view_hdr)) {
fputs ($imapConnection, "a003 FETCH $passed_id BODY[HEADER]\r\n");
$read = sqimap_read_data ($imapConnection, "a003", true, $a, $b);
** prevents users from reposting their form data after a
** successful logout
**
+ ** $Id$
**/
if (!isset($strings_php))
** This is where the mailboxes are listed. This controls most of what
** goes on in SquirrelMail.
**
+ ** $Id$
**/
if (!isset($i18n_php))
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($strings_php))
- include("../functions/strings.php");
if (!isset($date_php))
include("../functions/date.php");
if (!isset($page_header_php))
do_hook("right_main_after_header");
- if ($just_logged_in == 1 && strlen(trim($motd)) > 0) {
+ if (isset($just_logged_in) && $just_logged_in == 1 &&
+ strlen(trim($motd)) > 0) {
echo "<center><br>\n";
echo "<table width=70% cellpadding=0 cellspacing=0 border=0><tr><td bgcolor=\"$color[9]\">\n";
echo "<table width=100% cellpadding=5 cellspacing=1 border=0><tr><td bgcolor=\"$color[4]\">\n";
// Check to see if we can use cache or not. Currently the only time when you wont use it is
// when a link on the left hand frame is used. Also check to make sure we actually have the
// array in the registered session data. :)
+ if (! isset($use_mailbox_cache))
+ $use_mailbox_cache = 0;
if ($use_mailbox_cache && session_is_registered("msgs")) {
showMessagesForMailbox($imapConnection, $mailbox, $numMessages, $startMessage, $sort, $color, $show_num, $use_mailbox_cache);
} else {
<?php
+
+ /* $Id$ */
+
session_start();
if(!isset($logged_in)) {
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($strings_php))
- include("../functions/strings.php");
if (!isset($page_header_php))
include("../functions/page_header.php");
if (!isset($imap_php))
echo " </SELECT></SMALL></TT>";
echo " </TD>\n";
echo " <TD ALIGN=\"CENTER\" WIDTH=33%>\n";
+ if (!isset($what))
+ $what = "";
$what_disp = ereg_replace(",", " ", $what);
$what_disp = str_replace("\\\\", "\\", $what_disp);
$what_disp = str_replace("\\\"", "\"", $what_disp);
echo "</FORM>";
echo "</td></tr></table>";
do_hook("search_after_form");
- if ($where && $what) {
+ if (isset($where) && $where && isset($what) && $what) {
sqimap_mailbox_select($imapConnection, $mailbox);
sqimap_search($imapConnection, $where, $what, $mailbox, $color);
}
<?php
- session_start();
-
/**
** signout.php -- cleans up session and logs the user out
**
** Cleans up after the user. Resets cookies and terminates
** session.
**
+ ** $Id$
**/
+ session_start();
+
include ("../src/load_prefs.php");
if (!isset($config_php))
** shown can be given as parameters. If the user is not logged in
** this file will verify username and password.
**
+ ** $Id$
**/
session_start();
exit;
}
+ if (!isset($strings_php))
+ include ("../functions/strings.php");
include ("../config/config.php");
include ("../functions/prefs.php");
include ("../functions/imap.php");
include ("../functions/plugin.php");
if (!isset($auth_php))
include ("../functions/auth.php");
- if (!isset($strings_php))
- include ("../functions/strings.php");
+
include ("../src/load_prefs.php");