$notice_A[subject]($notice_A[startdate])"; } else{ $notice='最近没有论坛公告。'; } /** * 版块基本信息 */ $forumdb=$catedb=array();unset($tposts); if(is_numeric($cateid)){ $cateinfo=$db->get_one("SELECT style FROM pw_forums WHERE fid='$cateid'"); if(!empty($cateinfo['style']) && file_exists(R_P."data/style/$cateinfo[style].php")){ $skin=$cateinfo['style']; } $threadcate=" AND(fid='$cateid' OR fup='$cateid')"; } else{ $threadcate=''; } require_once('./header.php'); $c_htm=0; if($windid==$manager || $SYSTEM['visithide']){ $ifhidden=''; } else{ $ifhidden="AND f_type<>'hidden'"; } $query = $db->query("SELECT fid, fup, type,logo,name, descrip,forumadmin,tpost,topic,article,subtopic,lastpost,allowhtm,allowvisit,password FROM pw_forums WHERE ifsub='0' $threadcate $ifhidden ORDER BY vieworder"); while($forums = $db->fetch_array($query)) { if($forums['type']=='category'){ if($forums['forumadmin']){ $forumadmin=explode(",",$forums['forumadmin']); foreach($forumadmin as $key => $value){ if($value){ if ($key==10) {$forums['admin'].='...'; break;} $forums['admin'].="$value "; } } $forums['admin']='(分类版主:'.$forums['admin'].')'; } $catedb[]=$forums; } elseif($forums['type']=='forum'){ $forums['topics']=$forums['topic']+$forums['subtopic'];//加子版块主题数 $article+=$forums['article']; $topics+=$forums['topics']; $tposts+=$forums['tpost']; $forums['allowhtm']==1 && $c_htm=1; if($db_indexfmlogo==2){ $forums['llogo']=$forums['logo']!='' ? "":''; } elseif($db_indexfmlogo==1){ $forumlogofile="$imgpath/$stylepath/forumlogo/$forums[fid].gif"; $forums['llogo']=""; } if(!$forums['password'] && (!$forums['allowvisit'] || strpos($forums['allowvisit'],','.$groupid.',')!==false) || $windid==$manager){ list($f_a,$forums['au'],$f_c,$forums['ft'])=explode("\t",$forums['lastpost']); $forums['pic'] = $winddb['lastvisit']<$f_c && ($f_c+172800>$timestamp) ? 'new' : 'old'; $forums['newtitle']=date("Y-m-j g:i A",$f_c); $forums['t']=substrs($f_a,21); } else{ $forums['pic']="lock"; } $adminarray=explode("\t",$forums['forumadmin']); if($adminarray[0]){ $forumadmin=explode(",",$adminarray[0]); foreach($forumadmin as $key => $value){ if($value){ //if ($key==4) {$forums['admin'].='...'; break;} $forums['admin'].="$value "; } } } $forumdb[$forums['fup']][]=$forums; } } $db->free_result($query); unset($forums); @extract($db->get_one("SELECT * FROM pw_bbsinfo WHERE id=1")); /** * 友情联接 */ if($db_indexmqshare){ $sharelink=""; } /** * 新注册会员,会员总数,生日会员,最高在线 */ $rawnewuser=rawurlencode($newmember); /** * 在线会员 */ if($online){ $online1=$online; Cookie('online1',$online); } if($db_indexonline && $online1!='no'){ $doonlinefu=1; } elseif($online1=='yes'){ $doonlinefu=1; } Update_ol(); @include_once(R_P.'data/bbscache/olcache.php'); $usertotal=$guestinbbs+$userinbbs; if ($doonlinefu==1){ $index_whosonline=bbsonline(); } /** * 点击率延迟更新 */ if($c_htm || $db_hithour){ $db_hithour==0 && $db_hithour=4; $hit_wtime=$hit_control*$db_hithour; if($hit_wtime>24)$hit_wtime=0; if(($timestamp-$hit_tdtime)>$hit_wtime*3600 || @filesize(R_P."data/bbscache/hits.txt")>1024){ require_once('./require/hitupdate.php'); } } if($higholnum<$usertotal){ $db->update("UPDATE pw_bbsinfo SET higholnum='$usertotal',higholtime='$timestamp' WHERE id=1"); $higholnum=$usertotal; } if($hposts<$tposts){ $db->update("UPDATE pw_bbsinfo SET hposts='$tposts' WHERE id=1"); $hposts=$tposts; } if($tdtcontrol!=$tdtime ){ if(file_exists(R_P.'data/bbscache/ip_cache.php')){ @unlink(R_P.'data/bbscache/ip_cache.php'); } if($db_hostweb==1){ $db->update("UPDATE pw_bbsinfo SET yposts='$tposts', tdtcontrol='$tdtime' WHERE id=1"); $db->update("UPDATE pw_forums SET tpost=0 WHERE tpost<>'0'"); } } $mostinbbstime=date('Y-m-d H:i',$higholtime); if($usertotal>=$db_onlinelmt && $db_onlinelmt!=0){ Showmsg("状态:发生错误,论坛在线会员数已经达到最大值{$onlinecount_lmt},请稍后再来!"); } require_once PrintEot('index');footer(); /** * 首页在线函数 */ function bbsonline(){ global $imgpath,$stylepath,$groupid,$tablecolor,$db_showguest,$timestamp,$db_onlinetime,$windid,$superadmin,$manager,$surpadmin,$online; global $db_sofast,$db_olsize; $flag=-1; $onlinearray=openfile(R_P."data/bbscache/online.php"); $count_ol=count($onlinearray); if($onlinearray[0]=='') $count_ol=0; for($i=1; $i<$count_ol; $i++){ if(strpos($onlinearray[$i],"|") !==false){ $onlinedb=explode("|",$onlinearray[$i]); $inread=''; if($onlinedb[4]) $inread='(帖子)'; switch($onlinedb[5]){ case 3:$img='3'; break; case 4:$img='4';break; case 5:$img='5';break; case 6:$img='6';break; case 16:$img='16';break; default:$img='6'; } if($onlinedb[0]=='<>'){ $img='6';$onlinedb[0]='隐身会员';$onlinedb[8]=0; if($groupid==3) $adminonly="隐身:$onlinedb[9]\n"; } else{ $adminonly=''; } if($groupid=='3'){ $adminonly="{$adminonly}I P : $onlinedb[2]\n"; } $onlineinfo="{$adminonly}论坛: $onlinedb[6]{$inread}\n时间: $onlinedb[7]"; $flag++; if($flag%7==0) $index_whosonline.='