fixed formatting, sjeesh that's realy dull work. Makes me simple :(
[squirrelmail.git] / functions / display_messages.php
index ab003be3c2dc6a38b162fb2ad0bb97ab82551158..090fc062ad04902be7fa8de8d43fcc5fecc989f6 100644 (file)
@@ -99,17 +99,9 @@ function logout_error( $errString, $errTitle = '' ) {
         $color[0]  = '#DCDCDC';  /* light gray    TitleBar               */
         $color[1]  = '#800000';  /* red                                  */
         $color[2]  = '#CC0000';  /* light red     Warning/Error Messages */
-        $color[3]  = '#A0B8C8';  /* green-blue    Left Bar Background    */
         $color[4]  = '#FFFFFF';  /* white         Normal Background      */
-        $color[5]  = '#FFFFCC';  /* light yellow  Table Headers          */
-        $color[6]  = '#000000';  /* black         Text on left bar       */
         $color[7]  = '#0000CC';  /* blue          Links                  */
         $color[8]  = '#000000';  /* black         Normal text            */
-        $color[9]  = '#ABABAB';  /* mid-gray      Darker version of #0   */
-        $color[10] = '#666666';  /* dark gray     Darker version of #9   */
-        $color[11] = '#770000';  /* dark red      Special Folders color  */
-        $color[12] = '#EDEDED';
-        $color[15] = '#002266';  /* (dark blue)      Unselectable folders */
     }
 
     if ( $errTitle == '' ) {
@@ -145,6 +137,19 @@ function logout_error( $errString, $errTitle = '' ) {
 }
 
 function error_box($string, $color) {
+    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 "<body text=\"$color[8]\" bgcolor=\"$color[4]\" link=\"$color[7]\" vlink=\"$color[7]\" alink=\"$color[7]\">\n\n";
+    }
+
    echo '    <table width="100%" cellpadding="1" cellspacing="0" align="center"'.' border="0" bgcolor="'.$color[9].'">';
    echo '     <tr><td>';
    echo '       <table width="100%" cellpadding="0" cellspacing="0" align="center" border="0" bgcolor="'.$color[4].'">';