X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=functions%2Fdisplay_messages.php;h=07efba1cbe773e2d0e84bfc31f280b05ae29e450;hb=af2d6cf24097b1460bca6b06af16c10f666b24ca;hp=c599c93d8afdf746cea8ab0cd69df89c2569ab93;hpb=ec5b189b09d56af26254737c16eb61c26449ac29;p=squirrelmail.git
diff --git a/functions/display_messages.php b/functions/display_messages.php
index c599c93d..07efba1c 100644
--- a/functions/display_messages.php
+++ b/functions/display_messages.php
@@ -3,93 +3,175 @@
/**
* 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$
+ * @copyright © 1999-2006 The SquirrelMail Project Team
+ * @license http://opensource.org/licenses/gpl-license.php GNU Public License
+ * @version $Id$
+ * @package squirrelmail
+ */
+
+
+/**
+ * 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);
+}
-function error_username_password_incorrect() {
-
- echo '
'.
- '
' . _("ERROR") . ' | '. - '
---|
'.
- ' ' . _("Unknown user or password incorrect.") . - ' ' . - _("Click here to try again") . - '. |