把globla_func结尾加的代码用下面的就行了
- //==============禁言检查函数Begin===============
- function postban_check($fid, $theuser){
- global $isadmin, $issupermod, $db, $postban,$tablepre;
- if (!$fid || !$theuser) return 1;
- if ($isadmin || $issupermod) return 1;
- else {
- $timestamp = time();
- $fid=intval($fid);
- if ($fid < 1) return 0;
- $post_bancount=$db->result($db->query("select count(*) FROM {$tablepre}postban where (fid='$fid' or fid='65535')
- AND username='$theuser' AND timelimit > $timestamp"), 0);
- if ($post_bancount) return 0;
- else return 1;
- }
- }
- //=====================END========================
复制代码 |