**
**/
+ $array_php = true;
+
function ary_sort($ary,$col, $dir = 1){
// The globals are used because USORT determines what is passed to comp2
// These should be $this->col and $this->dir in a class
**
**/
+ $date_php = true;
+
function getMinutes($hour) {
$date = $hour;
** and everything would be bumped up one.
**/
- // Simply check to see if the first element in the dateParts array is an integer or not.
+ // Simply check to see if the first element in the dateParts
+ // array is an integer or not.
// Since the day of week is optional, this check is needed.
//
- // The old code used eregi("mon|tue|wed|thu|fri|sat|sun", $dateParts[0], $tmp)
- // to find if the first element was the day of week or day of month. This is an
- // expensive call (processing time) to have inside a loop. Doing it this way saves
- // quite a bit of time for large mailboxes.
+ // The old code used eregi("mon|tue|wed|thu|fri|sat|sun",
+ // $dateParts[0], $tmp) to find if the first element was the
+ // day of week or day of month. This is an expensive call
+ // (processing time) to have inside a loop. Doing it this way
+ // saves quite a bit of time for large mailboxes.
//
- // It is also quicker to call explode only once rather than the 3 times it was getting
- // called by calling the functions getHour, getMinute, and getSecond.
+ // It is also quicker to call explode only once rather than
+ // the 3 times it was getting called by calling the functions
+ // getHour, getMinute, and getSecond.
//
if (intval(trim($dateParts[0])) > 0) {
$time = explode(":", $dateParts[3]);
return getGMTSeconds(mktime($d[0], $d[1], $d[2], $d[3], $d[4], $d[5]), $dateParts[5]);
}
- // I use this function for profiling. Should never be called in actual versions of squirrelmail
- // released to public.
+ // I use this function for profiling. Should never be called in
+ // actual versions of squirrelmail released to public.
function getmicrotime() {
$mtime = microtime();
$mtime = explode(" ",$mtime);
**
**/
+ $display_messages_php = true;
+
function error_username_password_incorrect($color) {
echo "<BR>";
echo "<TABLE COLS=1 WIDTH=75% NOBORDER BGCOLOR=\"$color[4]\" ALIGN=CENTER>";
/** This just includes the different sections of the imap functions.
** They have been organized into these sections for simplicity sake.
**/
+
+ $imap_php = true;
include ("../functions/imap_mailbox.php");
include ("../functions/imap_messages.php");
**
**/
+ $mailbox_info = true;
+
function printMessageInfo($imapConnection, $t, $i, $from, $subject, $dateString, $answered, $seen, $mailbox, $sort, $startMessage) {
require ("../config/config.php");
<?
/** mime.php
**
- ** This contains the functions necessary to detect and decode MIME messages.
+ ** This contains the functions necessary to detect and decode MIME
+ ** messages.
+ **
**/
+ $mime_php = true;
if (!isset($i18n_php))
include "../functions/i18n.php";
$p = 0;
/** Lets find the header for this entity **/
- /** If the first line after the boundary is blank, we use default values **/
+ /** If the first line after the boundary is blank, we
+ use default values **/
if (trim($body[$j]) == "") {
$ent_type0 = "text";
$ent_type1 = "plain";
$charset = "us-ascii";
$j++;
- /** If the first line ISNT blank, read in the header for this entity **/
+ /** If the first line ISNT blank, read in the header
+ for this entity **/
} else {
while ((substr(trim($body[$j]), 0, strlen("--$bound")) != "--$bound") && (trim($body[$j]) != "")) {
$entity_header[$p] = $body[$j];
}
- /** OK, we have the header information, now lets decide what to do with it **/
+ /** OK, we have the header information, now lets decide
+ what to do with it **/
if ($ent_type0 == "multipart") {
$y = 0;
while (substr($body[$j], 0, strlen("--$bound--")) != "--$bound--") {
return false;
}
- /** This returns a parsed string called $body. That string can then be displayed
- as the actual message in the HTML. It contains everything needed, including
- HTML Tags, Attachments at the bottom, etc.
+ /** This returns a parsed string called $body. That string can then
+ be displayed as the actual message in the HTML. It contains
+ everything needed, including HTML Tags, Attachments at the
+ bottom, etc.
**/
function formatBody($message, $color, $wrap_at) {
- /** this if statement checks for the entity to show as the primary message. To
- add more of them, just put them in the order that is their priority.
+ /** this if statement checks for the entity to show as the
+ primary message. To add more of them, just put them in the
+ order that is their priority.
**/
$id = $message["INFO"]["ID"];
$urlmailbox = urlencode($message["INFO"]["MAILBOX"]);
}
}
- /** If there are other types that shouldn't be formatted, add them here **/
+ /** If there are other types that shouldn't be formatted, add
+ them here **/
if ($message["ENTITIES"][$ent_num]["TYPE1"] != "html")
$body = translateText($body, $wrap_at);
**
**/
+ $page_header_php = true;
+
// This is done to ensure that the character set is correct when
// receiving input from HTTP forms
header ("Content-Type: text/html; charset=iso-8859-1");
** This contains functions for manipulating user preferences
**/
+ $prefs_php = true;
+
/** returns the value for $string **/
function getPref($data_dir, $username, $string) {
$filename = "$data_dir$username.pref";
- /** This checks if there is a pref file, if there isn't, it will create it. **/
+ /** This checks if there is a pref file, if there isn't, it will
+ create it. **/
function checkForPrefs($data_dir, $username) {
$filename = "$data_dir$username.pref";
if (!file_exists($filename)) {
** an smtp server or sendmail.
**/
+ $smtp_php = true;
// Returns true only if this message is multipart
function isMultipart () {
<?
+ $strings_php = true;
+
//*************************************************************************
// Count the number of occurances of $needle are in $haystack.
//*************************************************************************
** - Send mail
**/
- include("../config/config.php");
- include("../functions/strings.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");
+ 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))
+ 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");
include("../src/load_prefs.php");
<?
- include("../config/config.php");
- include("../functions/strings.php");
- include("../functions/page_header.php");
- include("../functions/display_messages.php");
- include("../functions/imap.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($display_message_php))
+ include("../functions/display_messages.php");
+ if (!isset($imap_php))
+ include("../functions/imap.php");
include("../src/load_prefs.php");
<?
- include("../config/config.php");
- include("../functions/strings.php");
- include("../functions/page_header.php");
- include("../functions/imap.php");
- include("../functions/mime.php");
- include("../functions/date.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))
+ include("../functions/imap.php");
+ if (!isset($mime_php))
+ include("../functions/mime.php");
+ if (!isset($date_php))
+ include("../functions/date.php");
include("../src/load_prefs.php");
<?
- include("../config/config.php");
- include("../functions/strings.php");
- include("../functions/page_header.php");
- include("../functions/imap.php");
- include("../functions/array.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))
+ include("../functions/imap.php");
+ if (!isset($array_php))
+ include("../functions/array.php");
include("../src/load_prefs.php");
<?
- include("../config/config.php");
- include("../functions/strings.php");
- include("../functions/page_header.php");
- include("../functions/imap.php");
- include("../functions/display_messages.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))
+ include("../functions/imap.php");
+ if (!isset($display_messages_php))
+ include("../functions/display_messages.php");
include("../src/load_prefs.php");
<?
- include("../config/config.php");
- include("../functions/strings.php");
- include("../functions/page_header.php");
- include("../functions/imap.php");
- include("../functions/array.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))
+ include("../functions/imap.php");
+ if (!isset($array_php))
+ include("../functions/array.php");
include("../src/load_prefs.php");
<?
- include("../config/config.php");
- include("../functions/strings.php");
- include("../functions/page_header.php");
- include("../functions/imap.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))
+ include("../functions/imap.php");
include("../src/load_prefs.php");
<?
- include("../config/config.php");
- include("../functions/strings.php");
- include("../functions/page_header.php");
- include("../functions/imap.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))
+ include("../functions/imap.php");
include("../src/load_prefs.php");
?>
<HTML>
<?
- include("../config/config.php");
- include("../functions/array.php");
- include("../functions/strings.php");
- include("../functions/imap.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");
function formatMailboxName($imapConnection, $mailbox, $real_box, $delimeter, $color, $move_to_trash) {
require ("../config/config.php");
?>
<HTML>
<?
- include("../config/config.php");
- include("../functions/strings.php");
+ if (!isset($config_php))
+ include("../config/config.php");
+ if (!isset($strings_php))
+ include("../functions/strings.php");
echo "<BODY TEXT=000000 BGCOLOR=FFFFFF LINK=0000CC VLINK=0000CC ALINK=0000CC>\n";
<?
- include("../config/config.php");
- include("../functions/strings.php");
- include("../functions/page_header.php");
- include("../functions/display_messages.php");
- include("../functions/imap.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($display_messages_php))
+ include("../functions/display_messages.php");
+ if (!isset($imap_php))
+ include("../functions/imap.php");
include("../src/load_prefs.php");
$i = 0;
$firstLoop = true;
- // If they have selected nothing msg is size one still, but will be an infinite
- // loop because we never increment j. so check to see if msg[0] is set or not to fix this.
+ // If they have selected nothing msg is size one still, but will
+ // be an infinite loop because we never increment j. so check to
+ // see if msg[0] is set or not to fix this.
while (($j < count($msg)) && ($msg[0])) {
if ($msg[$i]) {
if ($firstLoop != true)
<?
- include("../config/config.php");
- include("../functions/strings.php");
- include("../functions/page_header.php");
- include("../functions/display_messages.php");
- include("../functions/imap.php");
- include("../functions/array.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($display_messages_php))
+ include("../functions/display_messages.php");
+ if (!isset($imap_php))
+ include("../functions/imap.php");
+ if (!isset($array_php))
+ include("../functions/array.php");
include("../src/load_prefs.php");
<?
- include("../config/config.php");
- include("../functions/strings.php");
- include("../functions/page_header.php");
- include("../functions/display_messages.php");
- include("../functions/imap.php");
- include("../functions/array.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($dipslay_messages_php))
+ include("../functions/display_messages.php");
+ if (!isset($imap_php))
+ include("../functions/imap.php");
+ if (!isset($array_php))
+ include("../functions/array.php");
include("../src/load_prefs.php");
<?
- include("../config/config.php");
- include("../functions/strings.php");
- include("../functions/page_header.php");
- include("../functions/imap.php");
- include("../functions/mime.php");
- include("../functions/date.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))
+ include("../functions/imap.php");
+ if (!isset($mime_php))
+ include("../functions/mime.php");
+ if (!isset($date_php))
+ include("../functions/date.php");
include("../src/load_prefs.php");
exit;
}
- include("../config/config.php");
- include("../functions/imap.php");
- include("../functions/strings.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");
+ 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))
+ 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");
?>
<HTML>
<FONT FACE="Arial,Helvetica">