<?
global $PHP_SELF,$_BSQL_LASTQUERY,$BCOM_DEBUG,$_BCOM;
ob_end_clean();
ob_start();
ob_implicit_flush(0);
if(!isset($SDIE_TITLE)) {
$SDIE_TITLE = 'A serious error has occured.';
}
print '<HTML><HEAD>
<META http-equiv="content-type" content="text/html;">
<META HTTP-EQUIV="expires" CONTENT="Fri, Jun 12 1981 08:20:00 GMT">
<META HTTP-EQUIV="pragma" CONTENT="no-cache">
<META HTTP-EQUIV="cache-control" CONTENT="no-cache">
</HEAD><BODY>
<DIV ALIGN=CENTER>
<TABLE BORDER="0" BGCOLOR="#DDDDDD" WIDTH="600"><TR><TD>
<FONT FACE="ARIAL" COLOR="BLACK" SIZE="3">';
print '<H2><IMG SRC="'.$_BCOM['images'].'/icons/error.png">'.$SDIE_TITLE.'</H2><B>bcom</B> is unable to continue with this operation.
The following information was reported.<BR><UL>';
if($error != '') {
print '<LI><B>Error: </B>'.$error;
}
if($file != '') {
print '<LI><B>File: </B>'.$file;
}
if($line != '') {
print '<LI><B>Line: </B>'.$line;
}
if(mysql_errno()) {
print '
<LI><B>Last SQL Statment:</B><FONT SIZE="2">'.$_BSQL_LASTQUERY.'</FONT>
<LI><B>Database error no:</B><FONT SIZE="2">'.mysql_errno().'</FONT>
<LI><B>Database error:</B><FONT SIZE="2">'.mysql_error().'</FONT>
';
}
print '</UL></FONT></TD></TR></TABLE></DIV></BODY></HTML>';
$errordata = 'Error: '.$error."\n";
$errordata .= 'MySQL info: '.mysql_errno().': '.mysql_error()."\n\n";
foreach($GLOBALS as $var => $val) {
//$val = addslashes(substr($val,0,255));
$errordata .= "$var: $val\n";
}
if($BCOM_DEBUG & EMAIL) {
mail('hide@address.com','Bug Report on '.$_BCOM['db_name'].' - '.$PHP_SELF,$errordata);
}
session_write_close();
exit;
?>