+function error_box($string, $color) {
+ global $pageheader_sent;
+
+ $err = _("ERROR");
+
+ $ret = concat_hook_function('error_box', $string);
+ if($ret != '') {
+ $string = $ret;
+ }
+
+ /* 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].'">';
+ echo ' <tr><td ALIGN="center" bgcolor="'.$color[0].'">';
+ echo ' <font color="' . $color[2].'"><b>' . $err . ':</b></font>';
+ echo ' </td></tr>';
+ echo ' <tr><td>';
+ echo ' <table cellpadding="1" cellspacing="5" align="center" border="0">';
+ echo ' <tr>' . html_tag( 'td', $string."\n", 'left')
+ . '</tr>';
+ echo ' </table>';
+ echo ' </td></tr>';
+ echo ' </table></td></tr>';
+ echo ' </table>';
+}