Source for file display_messages.php
Documentation is available at display_messages.php
* This contains all messages, including information, error, and just
* about any other message you can think of.
* @copyright © 1999-2006 The SquirrelMail Project Team
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id: display_messages.php,v 1.96 2006/05/14 17:36:16 tokul Exp $
* 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
function error_message($message, $mailbox, $sort, $startMessage) {
'URL' =>
sqm_baseuri().
"src/right_main.php?sort=$sort&startMessage=$startMessage&mailbox=$urlMailbox",
'TEXT' =>
sprintf (_("Click here to return to %s"),
* Second argument ($color array) is removed in 1.5.2.
* @param string $message error message
* Displays error when user is logged out
* Error strings can be overriden by logout_error hook
* @param string $errString error message
* @param string $errTitle title of page with error message
list
($junk, $errString, $errTitle) =
do_hook('logout_error', $errString, $errTitle);
/* If they don't have a logo, don't bother.. */
if (isset
($org_logo) &&
$org_logo) {
/* Display width and height like good little people */
if (isset
($org_logo_width) &&
is_numeric($org_logo_width) &&
$width_and_height =
" width=\"$org_logo_width\"";
if (isset
($org_logo_height) &&
is_numeric($org_logo_height) &&
$width_and_height .=
" height=\"$org_logo_height\"";
$logo_str =
'<img src="'.
$org_logo.
'" ' .
'alt="'.
sprintf(_("%s Logo"), $org_name).
'" ' .
'class="sqm_loginImage" ' .
if (isset
($hide_sm_attributions) &&
!$hide_sm_attributions) {
$sm_attribute_str =
_("SquirrelMail Webmail Application").
"<br />\n" .
_("By the SquirrelMail Project Team").
"<br />\n";
'URL' =>
$base_uri .
'src/login.php',
$oTemplate->assign('logo_str', $logo_str);
$oTemplate->assign('sm_attribute_str', $sm_attribute_str);
$oTemplate->assign('login_link', $login_link);
$oTemplate->assign('errorMessage', $errString);
$oTemplate->display('error_logout.tpl');
$oTemplate->display('footer.tpl');
* Since 1.4.1 function checks if page header is already displayed.
* Since 1.4.3 and 1.5.1 function contains error_box hook.
* Use plain_error_message() and make sure that page header is created,
* if you want compatibility with 1.4.0 and older.
* In 1.5.2 second function argument is changed. Older functions used it
* for $color array, new function uses it for optional link data. Function
* will ignore color array and use standard colors instead.
* @param string $string Error message to be displayed
* @param array $link Optional array containing link details to be displayed.
* Array uses three keys. 'URL' key is required and should contain link URL.
* 'TEXT' key is optional and should contain link name. 'FRAME' key is
* optional and should contain link target attribute.
global $pageheader_sent, $oTemplate;
/* check if the page header has been sent; if not, send it! */
if(!isset
($pageheader_sent) &&
!$pageheader_sent) {
// Double check the link for everything we need
// safety check for older code
if (isset
($link['URL'])) {
if (!isset
($link['FRAME'])) $link['FRAME'] =
'';
if (!isset
($link['TEXT'])) $link['TEXT'] =
$link['URL'];
// somebody used older error_box() code
/** ERROR is pre-translated to avoid multiple translation calls. **/
$oTemplate->assign('error', $err);
$oTemplate->assign('errorMessage', $string);
$oTemplate->assign('link', $link);
$oTemplate->display('error_box.tpl');
* Adds message that informs about non fatal error that can happen while saving preferences
* @param string $message error message
global $optpage_save_error;
$optpage_save_error=
array();
$optpage_save_error=
array_merge($optpage_save_error,array($message));
Documentation generated on Sat, 07 Oct 2006 16:10:44 +0300 by phpDocumentor 1.3.0RC6