<?php {
/**
- ** 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.
- **
- ** IMPORTANT: The PEAR modules must be in the include path
- ** for this class to work.
- **
- ** An array with the following elements must be passed to
- ** the class constructor (elements marked ? are optional):
- **
- ** dsn => database DNS (see PEAR for syntax)
- ** table => table to store addresses in (must exist)
- ** owner => current user (owner of address data)
- ** ? writeable => set writeable flag (true/false)
- **
- ** The table used should have the following columns:
- ** owner, nickname, firstname, lastname, email, label
- ** The pair (owner,nickname) should be unique (primary key).
- **
- ** NOTE. This class should not be used directly. Use the
- ** "AddressBook" class instead.
- **
- ** $Id$
- **/
+ * 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.
+ *
+ * IMPORTANT: The PEAR modules must be in the include path
+ * for this class to work.
+ *
+ * An array with the following elements must be passed to
+ * the class constructor (elements marked ? are optional):
+ *
+ * dsn => database DNS (see PEAR for syntax)
+ * table => table to store addresses in (must exist)
+ * owner => current user (owner of address data)
+ * ? writeable => set writeable flag (true/false)
+ *
+ * The table used should have the following columns:
+ * owner, nickname, firstname, lastname, email, label
+ * The pair (owner,nickname) should be unique (primary key).
+ *
+ * NOTE. This class should not be used directly. Use the
+ * "AddressBook" class instead.
+ *
+ * $Id$
+ */
require_once('DB.php');
<?php
/**
- ** 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$
- **/
+ * 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
- **
- ** 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$
- **/
+ * 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
- **
- ** 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$
- **/
+ * 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
- **
- ** 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$
- **/
+ * 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
- **
- ** 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$
- **/
+ * 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
- **
- ** 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$
- **/
+
+ /**
+ * 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 $attachment_common_show_images_list;
$attachment_common_show_images_list = array();
<?php
- /**
- ** 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$
- **/
+ /**
+ * 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' );
<?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. */
<?php
+
/**
- ** 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)
- ** (as specified in RFC 822) -- 'Tue' is optional
- **
- ** $Id$
- **/
+ * 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)
+ * (as specified in RFC 822) -- 'Tue' is optional
+ *
+ * $Id$
+ */
// corrects a time stamp to be the local time
function getGMTSeconds($stamp, $gmt) {
<?php
/**
- ** 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.
- **
- ** To use this instead of the regular prefs.php, create a
- ** database as described below, and replace prefs.php
- ** with this file.
- **
- ** Database:
- ** ---------
- **
- ** The preferences table should have tree columns:
- ** username char \ primary
- ** prefkey char / key
- ** prefval blob
- **
- ** CREATE TABLE userprefs (user CHAR(32) NOT NULL DEFAULT '',
- ** prefkey CHAR(64) NOT NULL DEFAULT '',
- ** prefval BLOB NOT NULL DEFAULT '',
- ** primary key (user,prefkey));
- **
- ** Configuration of databasename, username and password is done
- ** by changing $DSN below.
- **
- ** $Id$
- **/
+ * 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.
+ *
+ * To use this instead of the regular prefs.php, create a
+ * database as described below, and replace prefs.php
+ * with this file.
+ *
+ * Database:
+ * ---------
+ *
+ * The preferences table should have tree columns:
+ * username char \ primary
+ * prefkey char / key
+ * prefval blob
+ *
+ * CREATE TABLE userprefs (user CHAR(32) NOT NULL DEFAULT '',
+ * prefkey CHAR(64) NOT NULL DEFAULT '',
+ * prefval BLOB NOT NULL DEFAULT '',
+ * primary key (user,prefkey));
+ *
+ * Configuration of databasename, username and password is done
+ * by changing $DSN below.
+ *
+ * $Id$
+ */
require_once('DB.php');
<?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.
- **
- ** $Id$
- **/
+ * 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.
+ *
+ * $Id$
+ */
function error_username_password_incorrect($color) {
<?PHP
/**
- ** 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$
- **/
+ * 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,
<?php
- /**
- ** 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$
- **/
+ /**
+ * 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
/**
- ** 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.
+ *
+ * This just includes the different sections of the imap functions.
+ * They have been organized into these sections for simplicity sake.
+ *
+ * $Id$
+ */
$imap_backend = 'imap';
<?php
/**
- ** imap.php
- **
- ** Copyright (c) 1999-2001 The Squirrelmail Development Team
- ** Licensed under the GNU GPL. For full terms see the file COPYING.
- **
- ** This implements all functions that do general imap functions.
- **
- ** $Id$
- **/
-
-global $imap_general_debug;
-$imap_general_debug = false;
-
- /******************************************************************************
- ** Sets an unique session id in order to avoid simultanous sessions crash.
- ******************************************************************************/
-
- function sqimap_session_id() {
- if (session_id() != '')
- return substr(session_id(), -4);
-
- global $RememberedSessionID;
-
- if (! isset($RememberedSessionID))
- $RememberedSessionID = GenerateRandomString(4, '', 7);
-
- return $RememberedSessionID;
+ * imap.php
+ *
+ * Copyright (c) 1999-2001 The Squirrelmail Development Team
+ * Licensed under the GNU GPL. For full terms see the file COPYING.
+ *
+ * This implements all functions that do general imap functions.
+ *
+ * $Id$
+ */
+
+ /**
+ * Unique SessionId
+ *
+ * Sets an unique session id in order to avoid simultanous sessions crash.
+ *
+ * @return string a 4 chars unique string
+ */
+ function sqimap_session_id() {
+
+ if (session_id() == '')
+ global $RememberedSessionID;
+
+ if (! isset($RememberedSessionID))
+ $RememberedSessionID = GenerateRandomString(4, '', 7);
+ else
+ $RememberedSessionID = substr(session_id(), -4);
+
+ return( $RememberedSessionID );
}
function sqimap_read_data_list ($imap_stream, $pre, $handle_errors,
&$response, &$message) {
global $color, $squirrelmail_language;
- global $imap_general_debug;
$read = '';
$resultlist = array();
-
+
$more_msgs = true;
while ($more_msgs) {
$data = array();
$size = $regs[1];
} else if (ereg("^\\* [0-9]+ FETCH", $read, $regs)) {
// Sizeless response, probably single-line
-
- // For debugging purposes
- if ($imap_general_debug) {
- echo "<small><tt><font color=\"#CC0000\">$read</font></tt></small><br>\n";
- flush();
- }
-
$size = -1;
$data[] = $read;
$read = fgets($imap_stream, 9096);
while (strpos($read, "\n") === false) {
$read .= fgets($imap_stream, 9096);
}
-
- // For debugging purposes
- if ($imap_general_debug) {
- echo "<small><tt><font color=\"#CC0000\">$read</font></tt></small><br>\n";
- flush();
- }
-
// If we know the size, no need to look at the end parameters
if ($size > 0) {
if ($total_size == $size) {
$response = $regs[1];
$message = trim($regs[2]);
- if ($imap_general_debug) { echo '--<br>'; }
if ($handle_errors == false) { return $resultlist; }
if ($response == 'NO') {
function sqimap_capability($imap_stream, $capability) {
global $sqimap_capabilities;
-global $imap_general_debug;
if (!is_array($sqimap_capabilities)) {
fputs ($imap_stream, sqimap_session_id() . " CAPABILITY\r\n");
** Returns the delimeter between mailboxes: INBOX/Test, or INBOX.Test...
******************************************************************************/
function sqimap_get_delimiter ($imap_stream = false) {
-global $imap_general_debug;
+
global $sqimap_delimiter;
global $optional_delimiter;
<?php
/**
- ** imap_mailbox.php
- **
- ** Copyright (c) 1999-2001 The Squirrelmail Development Team
- ** Licensed under the GNU GPL. For full terms see the file COPYING.
- **
- ** This impliments all functions that manipulate mailboxes
- **
- ** $Id$
- **/
-
- if (defined ('imap_mailbox_php'))
- return;
- define ('imap_mailbox_php', true);
+ * imap_mailbox.php
+ *
+ * Copyright (c) 1999-2001 The Squirrelmail Development Team
+ * Licensed under the GNU GPL. For full terms see the file COPYING.
+ *
+ * This impliments all functions that manipulate mailboxes
+ *
+ * $Id$
+ */
/******************************************************************************
** Expunges a mailbox
<?php
+
/**
- ** 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$
- **/
+ * 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$
+ */
/******************************************************************************
** Copies specified messages to specified folder
<?php
/**
- ** 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$
- **/
+ * 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');
<?php
- /**
- ** index.php
- **
- ** 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$
- **/
+
+ /**
+ * index.php
+ *
+ * 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");
<?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. */
<?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.
- **
- ** $Id$
- **/
+ /**
+ * 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.
+ *
+ * $Id$
+ */
require_once('../functions/imap.php');
require_once('../functions/attachment_common.php');
<?php
/**
- ** options.php
- **
- ** Copyright (c) 1999-2001 The Squirrelmail Development Team
- ** Licensed under the GNU GPL. For full terms see the file COPYING.
- **
- ** Functions needed to display the options pages.
- **
- ** $Id$
- **/
+ * options.php
+ *
+ * Copyright (c) 1999-2001 The Squirrelmail Development Team
+ * Licensed under the GNU GPL. For full terms see the file COPYING.
+ *
+ * Functions needed to display the options pages.
+ *
+ * $Id$
+ */
/**********************************************/
/* Define constants used in the options code. */
<?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$
- **/
+ * 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$
+ */
// Always set up the language before calling these functions
<?php
/**
- ** plugin.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 framework for a plugin architecture.
- **
- ** Documentation on how to write plugins might show up some time.
- **
- ** $Id$
- **/
+ * plugin.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 framework for a plugin architecture.
+ *
+ * Documentation on how to write plugins might show up some time.
+ *
+ * $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$
- **/
+ * 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$
+ */
global $prefs_are_cached, $prefs_cache;
if (!session_is_registered('prefs_are_cached')) {
<?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.
- **
- ** $Id$
- **/
+ /**
+ * 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.
+ *
+ * $Id$
+ */
require_once('../functions/addressbook.php');
require_once('../functions/plugin.php');
if (ereg("^([^@%/]+)[@%/](.+)$", $username, $usernamedata)) {
$popuser = $usernamedata[1];
$domain = $usernamedata[2];
- unset($usernamedata);
+ unset($usernamedata);
} else {
$popuser = $username;
}
<?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');
- // Recursive function to find the correct parent for a new node
+ /**
+ * findParentForChild
+ *
+ * Recursive function to find the correct parent for a new node
+ *
+ * @copyright 1999-2001 The Squirrelmail Development Team
+ */
+
function findParentForChild($value, $treeIndexToStart, $tree) {
// is $value in $tree[$treeIndexToStart]['value']
if ((isset($tree[$treeIndexToStart])) && (strstr($value, $tree[$treeIndexToStart]['value']))) {
<?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);