/**
** abook_database.php
**
+ ** Copyright (c) 1999-2001 The Squirrelmail Development Team
+ ** Licensed under the GNU GPL. For full terms see the file COPYING.
+ **
** Backend for personal addressbook stored in a database,
** accessed using the DB-classes in PEAR.
**
<?php
- /**
- ** abook_local_file.php
- **
- ** Backend for addressbook as a pipe separated file
- **
- ** An array with the following elements must be passed to
- ** the class constructor (elements marked ? are optional):
- **
- ** NOTE. This class should not be used directly. Use the
- ** "AddressBook" class instead.
- **
- ** Make sure you configure this before using it!
- **
- ** $Id$
- **/
+ /**
+ ** abook_local_file.php
+ **
+ ** Copyright (c) 1999-2001 The Squirrelmail Development Team
+ ** Licensed under the GNU GPL. For full terms see the file COPYING.
+ **
+ ** Backend for addressbook as a pipe separated file
+ **
+ ** An array with the following elements must be passed to
+ ** the class constructor (elements marked ? are optional):
+ **
+ ** NOTE. This class should not be used directly. Use the
+ ** "AddressBook" class instead.
+ **
+ ** Make sure you configure this before using it!
+ **
+ ** $Id$
+ **/
class abook_global_file extends addressbook_backend {
var $btype = 'local';
<?php
- /**
- ** abook_ldap_server.php
- **
- ** Address book backend for LDAP server
- **
- ** An array with the following elements must be passed to
- ** the class constructor (elements marked ? are optional):
- **
- ** host => LDAP server hostname/IP-address
- ** base => LDAP server root (base dn). Empty string allowed.
- ** ? port => LDAP server TCP port number (default: 389)
- ** ? charset => LDAP server charset (default: utf-8)
- ** ? name => Name for LDAP server (default "LDAP: hostname")
- ** Used to tag the result data
- ** ? maxrows => Maximum # of rows in search result
- ** ? timeout => Timeout for LDAP operations (in seconds, default: 30)
- ** Might not work for all LDAP libraries or servers.
- **
- ** NOTE. This class should not be used directly. Use the
- ** "AddressBook" class instead.
- **
- ** $Id$
- **/
+ /**
+ ** abook_ldap_server.php
+ **
+ ** Copyright (c) 1999-2001 The Squirrelmail Development Team
+ ** Licensed under the GNU GPL. For full terms see the file COPYING.
+ **
+ ** Address book backend for LDAP server
+ **
+ ** An array with the following elements must be passed to
+ ** the class constructor (elements marked ? are optional):
+ **
+ ** host => LDAP server hostname/IP-address
+ ** base => LDAP server root (base dn). Empty string allowed.
+ ** ? port => LDAP server TCP port number (default: 389)
+ ** ? charset => LDAP server charset (default: utf-8)
+ ** ? name => Name for LDAP server (default "LDAP: hostname")
+ ** Used to tag the result data
+ ** ? maxrows => Maximum # of rows in search result
+ ** ? timeout => Timeout for LDAP operations (in seconds, default: 30)
+ ** Might not work for all LDAP libraries or servers.
+ **
+ ** NOTE. This class should not be used directly. Use the
+ ** "AddressBook" class instead.
+ **
+ ** $Id$
+ **/
class abook_ldap_server extends addressbook_backend {
var $btype = 'remote';
<?php
- /**
- ** abook_local_file.php
- **
- ** Backend for addressbook as a pipe separated file
- **
- ** An array with the following elements must be passed to
- ** the class constructor (elements marked ? are optional):
- **
- ** filename => path to addressbook file
- ** ? create => if true: file is created if it does not exist.
- ** ? umask => umask set before opening file.
- **
- ** NOTE. This class should not be used directly. Use the
- ** "AddressBook" class instead.
- **
- ** $Id$
- **/
+ /**
+ ** abook_local_file.php
+ **
+ ** Copyright (c) 1999-2001 The Squirrelmail Development Team
+ ** Licensed under the GNU GPL. For full terms see the file COPYING.
+ **
+ ** Backend for addressbook as a pipe separated file
+ **
+ ** An array with the following elements must be passed to
+ ** the class constructor (elements marked ? are optional):
+ **
+ ** filename => path to addressbook file
+ ** ? create => if true: file is created if it does not exist.
+ ** ? umask => umask set before opening file.
+ **
+ ** NOTE. This class should not be used directly. Use the
+ ** "AddressBook" class instead.
+ **
+ ** $Id$
+ **/
class abook_local_file extends addressbook_backend {
var $btype = 'local';
<?php
- /**
- ** addressbook.php
- **
- ** Functions and classes for the addressbook system.
- **
- ** $Id$
- **/
+ /**
+ ** addressbook.php
+ **
+ ** Copyright (c) 1999-2001 The Squirrelmail Development Team
+ ** Licensed under the GNU GPL. For full terms see the file COPYING.
+ **
+ ** Functions and classes for the addressbook system.
+ **
+ ** $Id$
+ **/
// This is the path to the global site-wide addressbook.
<?php
/**
- * array.php
- *
- * This contains functions that work with array manipulation. They
- * will help sort, and do other types of things with arrays
- *
- * $Id$
- */
+ ** array.php
+ **
+ ** Copyright (c) 1999-2001 The Squirrelmail Development Team
+ ** Licensed under the GNU GPL. For full terms see the file COPYING.
+ **
+ ** This contains functions that work with array manipulation. They
+ ** will help sort, and do other types of things with arrays
+ **
+ ** $Id$
+ **/
function ary_sort($ary,$col, $dir = 1){
<?php
-/**
- ** attachment_common.php
- **
- ** This file provides the handling of often-used attachment types.
- **
- ** $Id$
- **/
+ /**
+ ** attachment_common.php
+ **
+ ** Copyright (c) 1999-2001 The Squirrelmail Development Team
+ ** Licensed under the GNU GPL. For full terms see the file COPYING.
+ **
+ ** This file provides the handling of often-used attachment types.
+ **
+ ** $Id$
+ **/
global $FileExtensionToMimeType, $attachment_common_types;
$FileExtensionToMimeType = array('bmp' => 'image/x-bitmap',
/**
** auth.php
**
+ ** Copyright (c) 1999-2001 The Squirrelmail Development Team
+ ** Licensed under the GNU GPL. For full terms see the file COPYING.
+ **
** Contains functions used to do authentication.
**
** $Id$
**/
+ require_once( '../functions/page_header.php' );
function is_logged_in () {
global $squirrelmail_language;
set_up_language($squirrelmail_language, true);
- echo "<html><body bgcolor=\"ffffff\">\n" .
- '<br><br>echo "<center><b>'.
- _("You must be logged in to access this page.").'</b><br>'.
+ displayHtmlHeader( 'SquirrelMail', '', FALSE );
+
+ echo "<body bgcolor=\"ffffff\">\n" .
+ '<br><br><center><b>'.
+ _("You must be logged in to access this page.").'</b><br><br>'.
"<a href=\"../src/login.php\" target=\"_top\">"._("Go to the login page")."</a>\n".
"</center></body></html>\n";
exit;
<?php
+
/**
- * constants.php
- *
- * Copyright (c) 1999-2001 The SquirrelMail Development Team
- * Licensed under the GNU GPL. For full terms see the file COPYING.
- *
- * Loads constants used by the rest of the Squirrelmail source.
- * This file is include by src/login.php, src/redirect.php and
- * src/load_prefs.php.
- *
- * $Id$
- */
+ ** constants.php
+ **
+ ** Copyright (c) 1999-2001 The SquirrelMail Development Team
+ ** Licensed under the GNU GPL. For full terms see the file COPYING.
+ **
+ ** Loads constants used by the rest of the Squirrelmail source.
+ ** This file is include by src/login.php, src/redirect.php and
+ ** src/load_prefs.php.
+ **
+ ** $Id$
+ **/
/**************************************************************/
/* Set values for constants used by Squirrelmail preferences. */
/**
** date.php
**
+ ** Copyright (c) 1999-2001 The Squirrelmail Development Team
+ ** Licensed under the GNU GPL. For full terms see the file COPYING.
+ **
** Takes a date and parses it into a usable format. The form that a
** date SHOULD arrive in is:
** <Tue,> 29 Jun 1999 09:52:11 -0500 (EDT)
/**
** db_prefs.php
**
+ ** Copyright (c) 1999-2001 The Squirrelmail Development Team
+ ** Licensed under the GNU GPL. For full terms see the file COPYING.
+ **
** This contains functions for manipulating user preferences
** stored in a database, accessed though the Pear DB layer.
**
<?php
+
/**
** display_messages.php
**
+ ** Copyright (c) 1999-2001 The Squirrelmail Development Team
+ ** Licensed under the GNU GPL. For full terms see the file COPYING.
+ **
** This contains all messages, including information, error, and just
** about any other message you can think of.
**
**/
function error_username_password_incorrect($color) {
- echo '<BR>';
- echo " <TABLE COLS=1 WIDTH=75% NOBORDER BGCOLOR=\"$color[4]\" ALIGN=CENTER>";
- echo ' <TR>';
- echo " <TD BGCOLOR=\"$color[0]\">";
- echo ' <B><CENTER>ERROR</CENTER></B>';
- echo ' </TD></TR><TR><TD>';
- echo ' <CENTER><BR>' . _("Unknown user or password incorrect.") . '<BR><A HREF="login.php" TARGET=_top>' . _("Click here to try again") . '</A>.</CENTER>';
- echo ' </TD></TR>';
- echo '</TABLE>';
- echo '</BODY></HTML>';
+
+ echo '<BR>'.
+ "<TABLE COLS=1 WIDTH=75% NOBORDER BGCOLOR=\"$color[4]\" ALIGN=CENTER>".
+ '<TR>'.
+ "<TD BGCOLOR=\"$color[0]\">".
+ '<B><CENTER>ERROR</CENTER></B>'.
+ '</TD></TR><TR><TD>'.
+ '<CENTER><BR>' . _("Unknown user or password incorrect.") .
+ '<BR><A HREF="login.php" TARGET=_top>' .
+ _("Click here to try again") .
+ '</A>.</CENTER>'.
+ '</TD></TR>'.
+ '</TABLE>'.
+ '</BODY></HTML>';
+
}
function general_info($motd, $org_logo, $version, $org_name, $color) {
<?PHP
- /* Alternate to the system's built-in gettext.
- * relies on .po files (can't read .mo easily).
- * Uses the session for caching (speed increase)
- * Possible use in other PHP scripts? The only SM-specific thing is
- * $sm_language, I think
- *
- * Very special thanks to Konstantin Riabitsev for letting me use a
- * server that didn't already have gettext on it!
- */
-
+ /**
+ ** gettext.php
+ **
+ ** Copyright (c) 1999-2001 The Squirrelmail Development Team
+ ** Licensed under the GNU GPL. For full terms see the file COPYING.
+ **
+ ** Alternate to the system's built-in gettext.
+ ** relies on .po files (can't read .mo easily).
+ ** Uses the session for caching (speed increase)
+ ** Possible use in other PHP scripts? The only SM-specific thing is
+ ** $sm_language, I think
+ **
+ ** $Id$
+ **/
+
global $gettext_php_domain, $gettext_php_dir, $gettext_php_loaded,
$gettext_php_translateStrings, $gettext_php_loaded_language,
$gettext_php_short_circuit;
<?php
-/**
- ** i18n.php
- **
- ** This file contains variuos functions that are needed to do
- ** internationalization of SquirrelMail.
- **
- ** Internally the output character set is used. Other characters are
- ** encoded using Unicode entities according to HTML 4.0.
- **
- ** $Id$
- **/
+ /**
+ ** i18n.php
+ **
+ ** Copyright (c) 1999-2001 The Squirrelmail Development Team
+ ** Licensed under the GNU GPL. For full terms see the file COPYING.
+ **
+ ** This file contains variuos functions that are needed to do
+ ** internationalization of SquirrelMail.
+ **
+ ** Internally the output character set is used. Other characters are
+ ** encoded using Unicode entities according to HTML 4.0.
+ **
+ ** $Id$
+ **/
global $squirrelmail_language, $languages;
if (! isset($squirrelmail_language)) { $squirrelmail_language = ''; }
<?php
- /** This just includes the different sections of the imap functions.
+ /**
+ ** imap.php
+ **
+ ** Copyright (c) 1999-2001 The Squirrelmail Development Team
+ ** Licensed under the GNU GPL. For full terms see the file COPYING.
+ **
+ ** This just includes the different sections of the imap functions.
** They have been organized into these sections for simplicity sake.
**
** $Id$
/**
** imap.php
+ **
** Copyright (c) 1999-2001 The Squirrelmail Development Team
** Licensed under the GNU GPL. For full terms see the file COPYING.
**
/**
** imap_mailbox.php
+ **
** Copyright (c) 1999-2001 The Squirrelmail Development Team
** Licensed under the GNU GPL. For full terms see the file COPYING.
**
/**
** imap_messages.php
**
+ ** Copyright (c) 1999-2001 The Squirrelmail Development Team
+ ** Licensed under the GNU GPL. For full terms see the file COPYING.
+ **
** This implements functions that manipulate messages
**
** $Id$
<?php
- /******************************************************************
- ** IMAP SEARCH ROUTIES
+
+ /**
+ ** imap_search.php
+ **
+ ** Copyright (c) 1999-2001 The Squirrelmail Development Team
+ ** Licensed under the GNU GPL. For full terms see the file COPYING.
+ **
+ ** IMAP search routines
+ **
** $Id$
- *****************************************************************/
-
- require_once('../functions/imap.php');
- require_once('../functions/date.php');
- require_once('../functions/array.php');
- require_once('../functions/mailbox_display.php');
- require_once('../functions/mime.php');
-
-
-function sqimap_search($imapConnection,$search_where,$search_what,$mailbox,$color) {
- global $msgs, $message_highlight_list, $squirrelmail_language, $languages, $index_order;
-
- $urlMailbox = urlencode($mailbox);
- $isid = sqimap_session_id();
-
- /* Construct the Search QuERY */
- $ss = $isid;
- if (isset($languages[$squirrelmail_language]['CHARSET']) &&
- $languages[$squirrelmail_language]['CHARSET']) {
- $ss .= " SEARCH CHARSET ".$languages[$squirrelmail_language]['CHARSET']." ALL $search_where \"$search_what\"\r\n";
- } else {
- $ss .= " SEARCH ALL $search_where \"$search_what\"\r\n";
- }
- fputs($imapConnection,$ss);
-
- # Read Data Back From IMAP
- $readin = sqimap_read_data ($imapConnection, $isid, false, $result, $message);
- if (isset($languages[$squirrelmail_language]['CHARSET']) && strtolower($result) == 'no') {
- $ss = $isid . " SEARCH CHARSET \"US-ASCII\" ALL $search_where \"$search_what\"\r\n";
- fputs ($imapConnection, $ss);
- $readin = sqimap_read_data ($imapConnection, $isid, true, $result, $message);
- }
-
- unset($messagelist); $msgs=""; $c = 0;
-
- /* Keep going till we find the SEARCH responce */
- while ($c < count( $readin )) {
-
- /* Check to see if a SEARCH Responce was recived */
- if (substr($readin[$c],0,9) == "* SEARCH ")
- $messagelist = explode(" ",substr($readin[$c],9));
- else if (isset($errors))
- $errors = $errors.$readin[$c];
- else
- $errors = $readin[$c];
- $c++;
- }
-
- #If nothing is found * SEARCH should be the first error else echo errors
- if (isset($errors) && strstr($errors,"* SEARCH")) {
- echo "<br><CENTER>No Messages Found</CENTER>";
- return;
- } else if (isset($errors)) {
- echo "<!-- ".$errors." -->";
- }
-
- # HACKED CODED FROM ANOTHER FUNCTION, Could Probably dump this and mondify
- # exsitising code with a search true/false varible.
-
-
- global $sent_folder;
- for ($q = 0; $q < count($messagelist); $q++) {
- $id[$q] = trim($messagelist[$q]);
- }
- $issent = ($mailbox == $sent_folder);
- $hdr_list = sqimap_get_small_header_list($imapConnection, $id, $issent);
- $flags = sqimap_get_flags_list($imapConnection, $id, $issent);
- foreach ($hdr_list as $hdr) {
- $from[] = $hdr->from;
- $date[] = $hdr->date;
- $subject[] = $hdr->subject;
- $to[] = $hdr->to;
- $priority[] = $hdr->priority;
- $cc[] = $hdr->cc;
- $size[] = $hdr->size;
- $type[] = $hdr->type0;
- }
-
- $j = 0;
- while ($j < count($messagelist)) {
- $date[$j] = ereg_replace(' ', ' ', $date[$j]);
- $tmpdate = explode(" ", trim($date[$j]));
-
- $messages[$j]["TIME_STAMP"] = getTimeStamp($tmpdate);
- $messages[$j]["DATE_STRING"] = getDateString($messages[$j]["TIME_STAMP"]);
- $messages[$j]["ID"] = $id[$j];
- $messages[$j]["FROM"] = decodeHeader($from[$j]);
- $messages[$j]["FROM-SORT"] = strtolower(sqimap_find_displayable_name(decodeHeader($from[$j])));
- $messages[$j]["SUBJECT"] = decodeHeader($subject[$j]);
- $messages[$j]["SUBJECT-SORT"] = strtolower(decodeHeader($subject[$j]));
- $messages[$j]["TO"] = decodeHeader($to[$j]);
- $messages[$j]["PRIORITY"] = $priority[$j];
- $messages[$j]["CC"] = $cc[$j];
- $messages[$j]["SIZE"] = $size[$j];
- $messages[$j]["TYPE0"] = $type[$j];
-
- $num = 0;
- while ($num < count($flags[$j])) {
- if ($flags[$j][$num] == "Deleted") {
- $messages[$j]["FLAG_DELETED"] = true;
- }
- else if ($flags[$j][$num] == "Answered") {
- $messages[$j]["FLAG_ANSWERED"] = true;
- }
- else if ($flags[$j][$num] == "Seen") {
- $messages[$j]["FLAG_SEEN"] = true;
+ **/
+
+
+ require_once('../functions/imap.php');
+ require_once('../functions/date.php');
+ require_once('../functions/array.php');
+ require_once('../functions/mailbox_display.php');
+ require_once('../functions/mime.php');
+
+
+ function sqimap_search($imapConnection,$search_where,$search_what,$mailbox,$color) {
+
+ global $msgs, $message_highlight_list, $squirrelmail_language, $languages, $index_order;
+
+ $urlMailbox = urlencode($mailbox);
+ $isid = sqimap_session_id();
+
+ /* Construct the Search QuERY */
+ $ss = $isid;
+ if (isset($languages[$squirrelmail_language]['CHARSET']) &&
+ $languages[$squirrelmail_language]['CHARSET']) {
+ $ss .= " SEARCH CHARSET ".$languages[$squirrelmail_language]['CHARSET']." ALL $search_where \"$search_what\"\r\n";
+ } else {
+ $ss .= " SEARCH ALL $search_where \"$search_what\"\r\n";
+ }
+ fputs($imapConnection,$ss);
+
+ # Read Data Back From IMAP
+ $readin = sqimap_read_data ($imapConnection, $isid, false, $result, $message);
+ if (isset($languages[$squirrelmail_language]['CHARSET']) && strtolower($result) == 'no') {
+ $ss = $isid . " SEARCH CHARSET \"US-ASCII\" ALL $search_where \"$search_what\"\r\n";
+ fputs ($imapConnection, $ss);
+ $readin = sqimap_read_data ($imapConnection, $isid, true, $result, $message);
+ }
+
+ unset($messagelist); $msgs=""; $c = 0;
+
+ /* Keep going till we find the SEARCH responce */
+ while ($c < count( $readin )) {
+
+ /* Check to see if a SEARCH Responce was recived */
+ if (substr($readin[$c],0,9) == "* SEARCH ")
+ $messagelist = explode(" ",substr($readin[$c],9));
+ else if (isset($errors))
+ $errors = $errors.$readin[$c];
+ else
+ $errors = $readin[$c];
+ $c++;
+ }
+
+ #If nothing is found * SEARCH should be the first error else echo errors
+ if (isset($errors) && strstr($errors,"* SEARCH")) {
+ echo '<br><CENTER>' . _("No Messages Found") . '</CENTER>';
+ return;
+ } else if (isset($errors)) {
+ echo "<!-- ".$errors." -->";
+ }
+
+ # HACKED CODED FROM ANOTHER FUNCTION, Could Probably dump this and mondify
+ # exsitising code with a search true/false varible.
+
+
+ global $sent_folder;
+ for ($q = 0; $q < count($messagelist); $q++) {
+ $id[$q] = trim($messagelist[$q]);
+ }
+ $issent = ($mailbox == $sent_folder);
+ $hdr_list = sqimap_get_small_header_list($imapConnection, $id, $issent);
+ $flags = sqimap_get_flags_list($imapConnection, $id, $issent);
+ foreach ($hdr_list as $hdr) {
+ $from[] = $hdr->from;
+ $date[] = $hdr->date;
+ $subject[] = $hdr->subject;
+ $to[] = $hdr->to;
+ $priority[] = $hdr->priority;
+ $cc[] = $hdr->cc;
+ $size[] = $hdr->size;
+ $type[] = $hdr->type0;
+ }
+
+ $j = 0;
+ while ($j < count($messagelist)) {
+ $date[$j] = ereg_replace(' ', ' ', $date[$j]);
+ $tmpdate = explode(" ", trim($date[$j]));
+
+ $messages[$j]["TIME_STAMP"] = getTimeStamp($tmpdate);
+ $messages[$j]["DATE_STRING"] = getDateString($messages[$j]["TIME_STAMP"]);
+ $messages[$j]["ID"] = $id[$j];
+ $messages[$j]["FROM"] = decodeHeader($from[$j]);
+ $messages[$j]["FROM-SORT"] = strtolower(sqimap_find_displayable_name(decodeHeader($from[$j])));
+ $messages[$j]["SUBJECT"] = decodeHeader($subject[$j]);
+ $messages[$j]["SUBJECT-SORT"] = strtolower(decodeHeader($subject[$j]));
+ $messages[$j]["TO"] = decodeHeader($to[$j]);
+ $messages[$j]["PRIORITY"] = $priority[$j];
+ $messages[$j]["CC"] = $cc[$j];
+ $messages[$j]["SIZE"] = $size[$j];
+ $messages[$j]["TYPE0"] = $type[$j];
+
+ $num = 0;
+ while ($num < count($flags[$j])) {
+ if ($flags[$j][$num] == 'Deleted') {
+ $messages[$j]['FLAG_DELETED'] = true;
+ } else if ($flags[$j][$num] == 'Answered') {
+ $messages[$j]['FLAG_ANSWERED'] = true;
+ } else if ($flags[$j][$num] == 'Seen') {
+ $messages[$j]['FLAG_SEEN'] = true;
+ } else if ($flags[$j][$num] == 'Flagged') {
+ $messages[$j]['FLAG_FLAGGED'] = true;
+ }
+ $num++;
+ }
+ $j++;
+ }
+
+ /** Find and remove the ones that are deleted */
+ $i = 0;
+ $j = 0;
+ while ($j < count($messagelist)) {
+ if (isset($messages[$j]["FLAG_DELETED"]) && $messages[$j]["FLAG_DELETED"] == true) {
+ $j++;
+ continue;
}
- else if ($flags[$j][$num] == "Flagged") {
- $messages[$j]["FLAG_FLAGGED"] = true;
- }
- $num++;
- }
- $j++;
- }
-
- /** Find and remove the ones that are deleted */
- $i = 0;
- $j = 0;
- while ($j < count($messagelist)) {
- if (isset($messages[$j]["FLAG_DELETED"]) && $messages[$j]["FLAG_DELETED"] == true) {
- $j++;
- continue;
- }
- $msgs[$i] = $messages[$j];
-
- $i++;
- $j++;
- }
- $numMessages = $i;
-
- // There's gotta be messages in the array for it to sort them.
-
- if (count($messagelist) > 0) {
- $j=0;
- if (!isset ($msg)) { $msg = ""; }
- mail_message_listing_beginning($imapConnection,
- "move_messages.php?msg=$msg&mailbox=$urlMailbox&where=".urlencode($search_where)."&what=".urlencode($search_what),
- $mailbox, -1, '<b>' . _("Found") . ' ' . count($messagelist) . ' ' . _("messages") . '</b>',
- ' ');
-
-
- while ($j < count($msgs)) {
- printMessageInfo($imapConnection, $msgs[$j]["ID"], 0, $j, $mailbox, "", 0, $search_where, $search_what);
+ $msgs[$i] = $messages[$j];
+
+ $i++;
$j++;
- }
- echo '</table></tr></td></table>';
- }
- }
+ }
+ $numMessages = $i;
+
+ // There's gotta be messages in the array for it to sort them.
+
+ if (count($messagelist) > 0) {
+ $j=0;
+ if (!isset ($msg)) { $msg = ""; }
+ mail_message_listing_beginning($imapConnection,
+ "move_messages.php?msg=$msg&mailbox=$urlMailbox&where=".urlencode($search_where)."&what=".urlencode($search_what),
+ $mailbox, -1, '<b>' . _("Found") . ' ' . count($messagelist) . ' ' . _("messages") . '</b>',
+ ' ');
+
+
+ while ($j < count($msgs)) {
+ printMessageInfo($imapConnection, $msgs[$j]["ID"], 0, $j, $mailbox, "", 0, $search_where, $search_what);
+ $j++;
+ }
+ echo '</table></tr></td></table>';
+ }
+ }
-?>
+?>
\ No newline at end of file
/**
** index.php
**
- ** This file simply takes any attempt to view source files
- ** and sends those people to the login screen. At this
- ** point no attempt is made to see if the person is logged
- ** or not.
+ ** Copyright (c) 1999-2001 The Squirrelmail Development Team
+ ** Licensed under the GNU GPL. For full terms see the file COPYING.
+ **
+ ** This file simply takes any attempt to view source files
+ ** and sends those people to the login screen. At this
+ ** point no attempt is made to see if the person is logged
+ ** or not.
+ **
+ ** $Id$
**/
header("Location:../index.php");
/** pretty impressive huh? **/
-?>
+
+?>
\ No newline at end of file
<?php
+
/**
- * mailbox_display.php
- *
- * Copyright (c) 1999-2001 The Squirrelmail Development Team
- * Licensed under the GNU GPL. For full terms see the file COPYING.
- *
- * This contains functions that display mailbox information, such as the
- * table row that has sender, date, subject, etc...
- *
- * $Id$
- */
+ ** mailbox_display.php
+ **
+ ** Copyright (c) 1999-2001 The Squirrelmail Development Team
+ ** Licensed under the GNU GPL. For full terms see the file COPYING.
+ **
+ ** This contains functions that display mailbox information, such as the
+ ** table row that has sender, date, subject, etc...
+ **
+ ** $Id$
+ **/
define('PG_SEL_MAX', 10); /* Default value for page_selector_max. */
/* Loop through and display the info for each message. */
$t = 0; // $t is used for the checkbox number
if ($num_msgs == 0) { // if there's no messages in this folder
- echo "<TR><TD BGCOLOR=\"$color[4]\" COLSPAN=" . count($index_order) . ">\n";
- echo " <CENTER><BR><B>". _("THIS FOLDER IS EMPTY") ."</B><BR> </CENTER>\n";
- echo "</TD></TR>";
+ echo "<TR><TD BGCOLOR=\"$color[4]\" COLSPAN=" . count($index_order) . ">\n".
+ " <CENTER><BR><B>". _("THIS FOLDER IS EMPTY") ."</B><BR> </CENTER>\n".
+ "</TD></TR>";
} else if ($start_msg == $end_msg) {
/* If there's only one message in the box, handle it differently. */
if ($sort != 6) {
} while ($i && $i < $endVar);
}
- echo '</table>';
- echo "<table bgcolor=\"$color[9]\" width=100% border=0 cellpadding=1 cellspacing=1>" .
+ echo '</table>'.
+ "<table bgcolor=\"$color[9]\" width=100% border=0 cellpadding=1 cellspacing=1>" .
"<tr BGCOLOR=\"$color[4]\">" .
"<table width=100% BGCOLOR=\"$color[4]\" border=0 cellpadding=1 cellspacing=0><tr><td>$paginator_str</td>".
"<td align=right>$msg_cnt_str</td></tr></table>".
* This is the beginning of the message list table. *
* It wraps around all messages *
****************************************************/
- echo "<TABLE WIDTH=\"100%\" BORDER=\"0\" CELLPADDING=\"1\" CELLSPACING=\"0\">\n";
-
- echo "<TR BGCOLOR=\"$color[0]\"><TD>";
- echo " <TABLE BGCOLOR=\"$color[4]\" width=\"100%\" CELLPADDING=\"2\" CELLSPACING=\"0\" BORDER=\"0\"><TR>\n";
- echo " <TD ALIGN=LEFT>$paginator</TD>\n";
- echo ' <TD ALIGN=CENTER>' . get_selectall_link($start_msg, $sort) . "</TD>\n";
- echo " <TD ALIGN=RIGHT>$msg_cnt_str</TD>\n";
- echo " </TR></TABLE>\n";
- echo "</TD></TR>";
-
- /** The delete and move options */
- echo "<TR><TD BGCOLOR=\"$color[0]\">";
-
- echo "\n<FORM name=messageList method=post action=\"$moveURL\">\n";
- echo "<TABLE BGCOLOR=\"$color[0]\" COLS=2 BORDER=0 cellpadding=0 cellspacing=0 width=100%>\n";
-
- echo " <TR>\n" .
+ echo "<TABLE WIDTH=\"100%\" BORDER=\"0\" CELLPADDING=\"1\" CELLSPACING=\"0\">\n".
+ "<TR BGCOLOR=\"$color[0]\"><TD>".
+ "<TABLE BGCOLOR=\"$color[4]\" width=\"100%\" CELLPADDING=\"2\" CELLSPACING=\"0\" BORDER=\"0\"><TR>\n".
+ " <TD ALIGN=LEFT>$paginator</TD>\n".
+ ' <TD ALIGN=CENTER>' . get_selectall_link($start_msg, $sort) . "</TD>\n".
+ " <TD ALIGN=RIGHT>$msg_cnt_str</TD>\n".
+ " </TR></TABLE>\n".
+ '</TD></TR>'.
+ "<TR><TD BGCOLOR=\"$color[0]\">\n".
+ "<FORM name=messageList method=post action=\"$moveURL\">\n".
+ "<TABLE BGCOLOR=\"$color[0]\" COLS=2 BORDER=0 cellpadding=0 cellspacing=0 width=100%>\n".
+ " <TR>\n" .
" <TD ALIGN=LEFT VALIGN=CENTER NOWRAP>\n" .
' <SMALL> ' . _("Move selected to:") . "</SMALL>\n" .
" </TD>\n" .
echo " <OPTION VALUE=\"$box\">$box2</option>\n";
}
}
- echo ' </SELECT></TT></SMALL>';
- echo " <SMALL><INPUT TYPE=SUBMIT NAME=\"moveButton\" VALUE=\"" . _("Move") . "\"></SMALL>\n";
- echo " </TD>\n";
- echo " <TD ALIGN=RIGHT NOWRAP> \n";
+ echo ' </SELECT></TT></SMALL>'.
+ "<SMALL><INPUT TYPE=SUBMIT NAME=\"moveButton\" VALUE=\"" . _("Move") . "\"></SMALL>\n".
+ " </TD>\n".
+ " <TD ALIGN=RIGHT NOWRAP> \n";
if (!$auto_expunge) {
echo ' <INPUT TYPE=SUBMIT NAME="expungeButton" VALUE="'. _("Expunge") .'"> '. _("mailbox") ." \n";
}
- echo " <INPUT TYPE=SUBMIT NAME=\"markRead\" VALUE=\"". _("Read")."\">\n";
- echo " <INPUT TYPE=SUBMIT NAME=\"markUnread\" VALUE=\"". _("Unread")."\">\n";
- echo " <INPUT TYPE=SUBMIT VALUE=\"". _("Delete") . "\"> \n";
- echo " </TD>\n";
- echo " </TR>\n";
- echo "</TABLE>\n";
+ echo " <INPUT TYPE=SUBMIT NAME=\"markRead\" VALUE=\"". _("Read")."\">\n".
+ " <INPUT TYPE=SUBMIT NAME=\"markUnread\" VALUE=\"". _("Unread")."\">\n".
+ " <INPUT TYPE=SUBMIT VALUE=\"". _("Delete") . "\"> \n".
+ " </TD>\n".
+ " </TR>\n".
+ "</TABLE>\n";
do_hook('mailbox_form_before');
- echo '</TD></TR>';
+ echo '</TD></TR>'.
- echo "<TR><TD BGCOLOR=\"$color[0]\">";
- echo "<TABLE WIDTH=100% BORDER=0 CELLPADDING=2 CELLSPACING=";
+ "<TR><TD BGCOLOR=\"$color[0]\">".
+ "<TABLE WIDTH=100% BORDER=0 CELLPADDING=2 CELLSPACING=";
if ($GLOBALS['alt_index_colors']) {
echo "0";
} else {
echo "1";
}
- echo " BGCOLOR=\"$color[0]\">";
- echo "<TR BGCOLOR=\"$color[5]\" ALIGN=\"center\">";
+ echo " BGCOLOR=\"$color[0]\">".
+ "<TR BGCOLOR=\"$color[5]\" ALIGN=\"center\">";
/* Print the headers. */
for ($i=1; $i <= count($index_order); $i++) {
echo ' <TD WIDTH="25%"><B>'. _("From") .'</B>';
}
- ShowSortButton($sort, $mailbox, 2, 3);
+ ShowSortButton($sort, $mailbox, 2, 3);
echo "</TD>\n";
break;
return substr($subject, 0, $trim_val) . '...';
}
-?>
+?>
\ No newline at end of file
<?php
+
/** mime.php
+ **
+ ** Copyright (c) 1999-2001 The Squirrelmail Development Team
+ ** Licensed under the GNU GPL. For full terms see the file COPYING.
**
** This contains the functions necessary to detect and decode MIME
** messages.
<?php
+
/**
* options.php
*
/**
** page_header.php
**
+ ** Copyright (c) 1999-2001 The Squirrelmail Development Team
+ ** Licensed under the GNU GPL. For full terms see the file COPYING.
+ **
** Prints the page header (duh)
**
** $Id$
/** Here is the header and wrapping table **/
$shortBoxName = readShortMailboxName($mailbox, $delimiter);
- echo "<A NAME=pagetop></A>\n";
- // echo "<table cellpadding=1 cellspacing=1 BGCOLOR=\"$color[4]\" width=100%><tr><td>";
- echo "<TABLE BGCOLOR=\"$color[4]\" BORDER=0 WIDTH=\"100%\" CELLSPACING=0 CELLPADDING=2>\n";
- echo " <TR BGCOLOR=\"$color[9]\" >\n";
- echo " <TD ALIGN=left><b>\n";
+ echo "<A NAME=pagetop></A>\n".
+ // "<table cellpadding=1 cellspacing=1 BGCOLOR=\"$color[4]\" width=100%><tr><td>".
+ "<TABLE BGCOLOR=\"$color[4]\" BORDER=0 WIDTH=\"100%\" CELLSPACING=0 CELLPADDING=2>\n".
+ " <TR BGCOLOR=\"$color[9]\" >\n".
+ " <TD ALIGN=left><b>\n";
displayInternalLink ("src/signout.php", _("Sign Out"), "_top");
- echo " </b></TD><TD ALIGN=right>\n";
- echo ' ' . _("Current Folder") . ": <B>$shortBoxName </B>\n";
- echo " </TD>\n";
- echo " </TR>\n";
- echo " <TR BGCOLOR=\"$color[4]\">\n";
- echo " <TD ALIGN=left>\n";
+ echo " </b></TD><TD ALIGN=right>\n".
+ ' ' . _("Current Folder") . ": <B>$shortBoxName </B>\n".
+ " </TD>\n".
+ " </TR>\n".
+ " <TR BGCOLOR=\"$color[4]\">\n".
+ " <TD ALIGN=left>\n";
$urlMailbox = urlencode($mailbox);
displayInternalLink ("src/compose.php?mailbox=$urlMailbox", _("Compose"), "right");
echo " \n";
echo " </TD><TD ALIGN=right>\n";
echo ($hide_sm_attributions ? ' ' :
"<A HREF=\"http://www.squirrelmail.org/\" TARGET=\"_blank\">SquirrelMail</A>\n");
- echo " </TD>\n";
- echo " </TR>\n";
- echo "</TABLE>\n\n";
+ echo " </TD>\n".
+ " </TR>\n".
+ "</TABLE>\n\n";
// echo "</td></tr></table>";
}
-?>
+
+?>
\ No newline at end of file
<?php
- /**
- ** plugin.php
+ /**
+ ** plugin.php
**
- ** This file provides the framework for a plugin architecture.
+ ** Copyright (c) 1999-2001 The Squirrelmail Development Team
+ ** Licensed under the GNU GPL. For full terms see the file COPYING.
**
- ** Plugins will eventually be a way to provide added functionality
- ** without having to patch the SquirrelMail source code. Have some
- ** patience, though, as the these funtions might change in the near
- ** future.
+ ** This file provides the framework for a plugin architecture.
**
- ** Documentation on how to write plugins might show up some time.
+ ** Documentation on how to write plugins might show up some time.
**
- ** $Id$
+ ** $Id$
**/
global $squirrelmail_plugin_hooks;
<?php
+
/**
** prefs.php
**
+ ** Copyright (c) 1999-2001 The Squirrelmail Development Team
+ ** Licensed under the GNU GPL. For full terms see the file COPYING.
+ **
** This contains functions for manipulating user preferences
**
** $Id$
<?php
+
/** smtp.php
+ **
+ ** Copyright (c) 1999-2001 The Squirrelmail Development Team
+ ** Licensed under the GNU GPL. For full terms see the file COPYING.
**
** This contains all the functions needed to send messages through
** an smtp server or sendmail.
<?php
/**
- * strings.php
- * Copyright (c) 1999-2001 The Squirrelmail Development Team
- * Licensed under the GNU GPL. For full terms see the file COPYING.
- *
- * This code provides various string manipulation functions that are
- * used by the rest of the Squirrelmail code.
- *
- * $Id$
+ ** strings.php
+ **
+ ** Copyright (c) 1999-2001 The Squirrelmail Development Team
+ ** Licensed under the GNU GPL. For full terms see the file COPYING.
+ **
+ ** This code provides various string manipulation functions that are
+ ** used by the rest of the Squirrelmail code.
+ **
+ ** $Id$
*/
/**
<?php
/**
- * tree.php
- * Copyright (c) 1999-2001 The Squirrelmail Development Team
- * Licensed under the GNU GPL. For full terms see the file COPYING.
- *
- * This code provides various string manipulation functions that are
- * used by the rest of the Squirrelmail code.
- *
- * $Id$
+ ** tree.php
+ **
+ ** Copyright (c) 1999-2001 The Squirrelmail Development Team
+ ** Licensed under the GNU GPL. For full terms see the file COPYING.
+ **
+ ** This code provides various string manipulation functions that are
+ ** used by the rest of the Squirrelmail code.
+ **
+ ** $Id$
*/
require_once('../functions/imap.php');
<?php
/**
- * url_parser.php
- * Copyright (c) 1999-2001 The Squirrelmail Development Team
- * Licensed under the GNU GPL. For full terms see the file COPYING.
- *
- * This code provides various string manipulation functions that are
- * used by the rest of the Squirrelmail code.
- *
- * $Id$
- */
+ ** url_parser.php
+ **
+ ** Copyright (c) 1999-2001 The Squirrelmail Development Team
+ ** Licensed under the GNU GPL. For full terms see the file COPYING.
+ **
+ ** This code provides various string manipulation functions that are
+ ** used by the rest of the Squirrelmail code.
+ **
+ ** $Id$
+ **/
function replaceBlock (&$in, $replace, $start, $end) {
$begin = substr($in,0,$start);