|
 |
 |
|
 |
News & Event |
$timestamp = time();
$errmsg = '';
$dberror = $this->error();
$dberrno = $this->errno();
if($dberrno == 1114) {
?>
Max onlines reached
|
Forum onlines reached the upper limit
Sorry, the number of online visitors has reached the upper limit. Please wait for someone else going offline or visit us in idle hours.
|
|
exit;
} else {
$discuz_user = $GLOBALS['_DSESSION'][discuz_user] ? $GLOBALS[_DSESSION][discuz_user] : $GLOBALS[HTTP_COOKIE_VARS][_discuz_user];
if($message) {
$errmsg = "BL-City.com info: $message\n\n";
}
if($discuz_user) {
$errmsg .= "User: $discuz_user\n";
}
$errmsg .= "Time: ".gmdate("Y-n-j g:ia", $timestamp + ($GLOBALS["timeoffset"] * 3600))."\n";
$errmsg .= "Script: ".$GLOBALS[PHP_SELF]."\n\n";
if($sql) {
$errmsg .= "SQL: ".htmlspecialchars($sql)."\n";
}
$errmsg .= "Error: $dberror\n";
$errmsg .= "Errno.: $dberrno";
echo " | | | |
\n";
echo "";
echo nl2br($errmsg);
if($GLOBALS['adminemail']) {
$errnos = array();
$errorlogs = '';
if($errlog = @file('./forumdata/dberror.log')) {
for($i = 0; $i < count($errlog); $i++) {
$log = explode("\t", $errlog[$i]);
if(($timestamp - $log[0]) > 86400) {
$errlog[$i] = "";
} else {
$errnos[] = $log[1];
}
}
}
if(!in_array($dberrno, $errnos)) {
$errorlogs .= "$timestamp\t$dberrno\n";
echo "
An error report has been dispatched to our administrator.";
sendmail($GLOBALS['adminemail'], ' MySQL Error Report',
"There seems to have been a problem with the database of your Discuz! Board\n\n".
strip_tags($errmsg)."\n\n".
"Please check-up your MySQL server and forum scripts, similar errors will not be reported again in recent 24 hours\n".
"If you have troubles in solving this problem, please visit Discuz! Community http://www.Discuz.net.");
} else {
echo '
Similar error report has beed dispatched to administrator before.';
}
for($i = 0; $i < count($errlog); $i++) {
$errorlogs .= $errlog[$i] ? trim($errlog[$i])."\n" : NULL;
}
@$fp = fopen('./forumdata/dberror.log', 'w');
@flock($fp, 3);
@fwrite($fp, $errorlogs);
@fclose($fp);
}
echo '
';
exit;
}
?>
Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in C:\Data\www\wingfung\lib\MySql\db_mysql.php on line 30
|
|
Copyright © 2012 WING FUNG PRODUCTION CO., LTD. All Rights Reserved.
|
 |