include language('admincp');
if(!$adminid && $discuz_uid) {
$db->query("INSERT INTO {$tablepre}pms (msgfrom, msgfromid, msgtoid, folder, new, subject, dateline, message)
VALUES('System Message', '0','$discuz_uid', 'inbox', '1', '警告會員 $discuz_user','$timestamp', '警告會員 $discuz_user 切勿再進入本站的後台, 否則禁止訪問 ')");
$file = intrudelog;
$yearmonth = gmdate('Ym', $timestamp + $_DCACHE['settings']['timeoffset'] * 3600);
$logdir = DISCUZ_ROOT.'./forumdata/logs/';
@$fp = fopen($logdir.$yearmonth.'_'.$file.'.php', 'a');
@flock($fp, 2);
@fwrite($fp, "$timestamp\t".dhtmlspecialchars($discuz_user)."\t$onlineip\t$extra\n");
@fclose($fp);
header("Location: index.php");
}
if(!$discuz_uid) {
$file = intrudelog;
$yearmonth = gmdate('Ym', $timestamp + $_DCACHE['settings']['timeoffset'] * 3600);
$logdir = DISCUZ_ROOT.'./forumdata/logs/';
@$fp = fopen($logdir.$yearmonth.'_'.$file.'.php', 'a');
@flock($fp, 2);
@fwrite($fp, "$timestamp\t".dhtmlspecialchars(訪客)."\t$onlineip\t$extra\n");
@fclose($fp);
header("Location: index.php");
}
$action == 'errorlog' || $action == 'intrudelog'