/*
[Discuz!] (C)2001-2006 Comsenz Inc.
This is NOT a freeware, use is subject to license terms
$RCSfile: db_mysql_error.inc.php,v $
$Revision: 1.3 $
$Date: 2006/02/23 13:44:02 $
*/
if(!defined('IN_DISCUZ')) {
exit('Access Denied');
}
$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.
|
|
function_exists('dexit') ? dexit() : exit();
} else {
if($message) {
$errmsg = "Discuz! info: $message\n\n";
}
if(isset($GLOBALS['_DSESSION']['discuz_user'])) {
$errmsg .= "User: ".htmlspecialchars($GLOBALS['_DSESSION']['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']) {
$errlog = array();
if(@$fp = fopen(DISCUZ_ROOT.'./forumdata/dberror.log', 'r')) {
while((!feof($fp)) && count($errlog) < 20) {
$log = explode("\t", fgets($fp, 50));
if($timestamp - $log[0] < 86400) {
$errlog[$log[0]] = $log[1];
}
}
fclose($fp);
}
if(!in_array($dberrno, $errlog)) {
$errlog[$timestamp] = $dberrno;
@$fp = fopen(DISCUZ_ROOT.'./forumdata/dberror.log', 'w');
@flock($fp, 2);
foreach(array_unique($errlog) as $dateline => $errno) {
@fwrite($fp, "$dateline\t$errno");
}
@fclose($fp);
if(function_exists('errorlog')) {
errorlog('MySQL', basename($GLOBALS['_SERVER']['PHP_SELF'])." : $dberror - ".cutstr($sql, 120), 0);
}
echo "
An error report has been dispatched to our administrator.";
@sendmail($GLOBALS['adminemail'], '[Discuz!] 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.';
}
}
echo '
';
function_exists('dexit') ? dexit() : exit();
}
?> if(!defined('IN_DISCUZ')) exit('Access Denied'); include template('header'); ?>
| =$bbname?> =$navigation?> |
if($rssstatus) { ?>
} ?>
 |
现在时间是 =$currenttime?>, 您上次访问是在 =$lastvisittime?>
积分: =$credits?>
if(is_array($extcredits)) { foreach($extcredits as $id => $credit) { ?>
=$credit['title']?>: =$GLOBALS[extcredits.$id]?>=$credit['unit']?>
} } ?>
/ 头衔:
if($validdays) { ?>
=$grouptitle?>(=$validdays?>)
} else { ?>
=$grouptitle?>
} if(!empty($invisible)) { ?>
/ 隐身模式
} ?>
|
查看新帖 |
if($discuz_uid) { ?>
我的话题 |
if($allowuseblog) { ?>
Blog |
} } ?>
精华区 |
标记已读
| 欢迎新会员 =$lastmember?>
共 =$threads?> 篇主题 / =$posts?> 篇帖子 / 今日 =$todayposts?> 篇帖子 / =$totalmembers?> 位会员
|
if(empty($gid)) { ?>
|
if(empty($announcements)) { ?>
到目前为止没有论坛公告。
} else { ?>
} ?>
|
if($qihoo_status && $searchboxstatus) { ?>
|
|
} ?>
} if(!empty($newpmexists)) { ?>
include template('pmprompt'); ?>
} if(!empty($advlist['text'])) { ?>
} if(is_array($forumlist)) { foreach($forumlist as $key => $forum) { if($forum['type'] == 'group' && $forumlist[($key + 1)]['type'] == 'forum') { if($key) { ?>
} ?>
| |
论坛 |
主题 |
帖数 |
今日 |
最后发表 |
版主 |
} elseif($forum['permission']) { ?>
| =$forum['folder']?> |
=$forum['icon']?>=$forum['name']?>
=$forum['description']?>
if(isset($forum['subforums'])) { ?>
子论坛: =$forum['subforums']?>
} ?>
|
=$forum['threads']?> |
=$forum['posts']?> |
=$forum['todayposts']?> |
if($forum['permission'] == 1) { ?>
私密论坛 |
} else { if(is_array($forum['lastpost'])) { ?>
=$forum['lastpost']['dateline']?> by
if($forum['lastpost']['author']) { ?>
=$forum['lastpost']['author']?>
} else { ?>
匿名
} ?>
|
 |
|
} else { ?>
从未 |
} } ?>
=$forum['moderators']?> |
} } } if(empty($gid) && ($_DCACHE['forumlinks'] || $whosonlinestatus || $bdaystatus == 1 || $bdaystatus == 3)) { if(empty($forumlist)) { ?>
} else { ?>
有新帖的论坛
无新帖的论坛 |
include template('footer'); ?>