X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=functions%2Fdisplay_messages.php;h=5ef7941ae256927d39c1e0c5e621148109d0e312;hp=064d1dedcb2ee0333e72d02596557f10ddb23361;hb=fbf11cec94461e2ba1a9f62c7c4b80f70b4e7c07;hpb=1cf38f190b2f82ab824a6a894395404cccc9beb9
diff --git a/functions/display_messages.php b/functions/display_messages.php
index 064d1ded..5ef7941a 100644
--- a/functions/display_messages.php
+++ b/functions/display_messages.php
@@ -3,98 +3,195 @@
/**
* display_messages.php
*
- * Copyright (c) 1999-2002 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$
+ * @copyright © 1999-2007 The SquirrelMail Project Team
+ * @license http://opensource.org/licenses/gpl-license.php GNU Public License
+ * @version $Id$
+ * @package squirrelmail
*/
-function error_username_password_incorrect() {
- global $frame_top, $color;
- if (!isset($frame_top)) {
- $frame_top = '_top';
- }
+/**
+ * Displays error message and URL to message listing
+ *
+ * Fifth argument ($color array) is removed in 1.5.2.
+ * @param string $message error message
+ * @param string $mailbox mailbox name
+ * @param integer $sort sort order
+ * @param integer $startMessage first message
+ * @since 1.0
+ */
+function error_message($message, $mailbox, $sort, $startMessage) {
+ $urlMailbox = urlencode($mailbox);
+ $link = array (
+ 'URL' => sqm_baseuri()."src/right_main.php?sort=$sort&startMessage=$startMessage&mailbox=$urlMailbox",
+ 'TEXT' => sprintf (_("Click here to return to %s"),
+ strtoupper($mailbox) == 'INBOX' ? _("INBOX") : htmlspecialchars(imap_utf7_decode_local($mailbox)))
+ );
+ error_box($message, $link);
+}
- echo '
'.
- '
' . _("ERROR") . ' | '. - '
---|
'.
- ' ' . _("Unknown user or password incorrect.") . - ' ' . - _("Click here to try again") . - '. |