X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=functions%2Fdisplay_messages.php;h=2e26932a4c33c145fa7e5df63a538477acf6468f;hb=1d80c108a1d741b7dcb562ea1cf6d2214322b192;hp=064d1dedcb2ee0333e72d02596557f10ddb23361;hpb=1cf38f190b2f82ab824a6a894395404cccc9beb9;p=squirrelmail.git diff --git a/functions/display_messages.php b/functions/display_messages.php index 064d1ded..2e26932a 100644 --- a/functions/display_messages.php +++ b/functions/display_messages.php @@ -3,98 +3,149 @@ /** * display_messages.php * - * Copyright (c) 1999-2002 The SquirrelMail Project Team + * Copyright (c) 1999-2003 The SquirrelMail Project 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$ + * @package squirrelmail */ -function error_username_password_incorrect() { - global $frame_top, $color; +/** + * Find out where squirrelmail lives and try to be smart about it. + * The only problem would be when squirrelmail lives in directories + * called "src", "functions", or "plugins", but people who do that need + * to be beaten with a steel pipe anyway. + * + * @return string the base uri of squirrelmail installation. + */ +function sqm_baseuri(){ + global $base_uri, $PHP_SELF; + /** + * If it is in the session, just return it. + */ + if (isset($base_uri)){ + return $base_uri; + } + $dirs = array('|src/.*|', '|plugins/.*|', '|functions/.*|'); + $repl = array('', '', ''); + $base_uri = preg_replace($dirs, $repl, $PHP_SELF); + return $base_uri; +} + +function error_message($message, $mailbox, $sort, $startMessage, $color) { + $urlMailbox = urlencode($mailbox); + if (strtoupper($mailbox) == 'INBOX') + $mailbox = _("INBOX"); + $string = '
' . _("ERROR") . ' | '. - '
---|
'.
- ' ' . _("Unknown user or password incorrect.") . - ' ' . - _("Click here to try again") . - '. |