X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=functions%2Fdisplay_messages.php;h=e5520ffab790eb61548d2b53fd5fb3af2c5d8486;hp=a517984af2b2871d07d38f0a705835d5177687f5;hb=b6c283c4680e052f27b8c3a08189bb35b753a7b7;hpb=30487bc8d676f829f587691d0fab4ea989522e74;ds=sidebyside diff --git a/functions/display_messages.php b/functions/display_messages.php index a517984a..e5520ffa 100644 --- a/functions/display_messages.php +++ b/functions/display_messages.php @@ -137,19 +137,31 @@ function logout_error( $errString, $errTitle = '' ) { } function error_box($string, $color) { - echo ' '; - echo ' '; - echo '
'; - echo ' '; - echo ' '; - echo '
'; - echo ' ' . _("ERROR") . ':'; - echo '
'; - echo ' '; - echo ' ' . html_tag( 'td', $string."\n", 'left') - . ''; - echo '
'; - echo '
'; - echo ' '; + global $pageheader_sent; + + $err = _("ERROR"); + + /* check if the page header has been sent; if not, send it! */ + if(!isset($pageheader_sent) && !$pageheader_sent) { + /* include this just to be sure */ + include_once( SM_PATH . 'functions/page_header.php' ); + displayHtmlHeader('SquirrelMail: '.$err); + $pageheader_sent = TRUE; + echo "\n\n"; + } + + echo ' ' + . ' ' + . '
' + . ' ' + . ' ' + . '
' + . ' ' . $err . ':' + . '
' + . ' ' + . ' ' . html_tag( 'td', $string."\n", 'left') . '' + . '
' + . '
' + . ' '; } ?>