<!--<?php print <<<EOT
-->


<!--ads begin-->
<!--
EOT;
if($advertdb['text']){print <<<EOT
-->
<div class="ad-text">
	<table width="100%" cellspacing="0" cellpadding="0">
<!--
EOT;
$id=0;
$idp = 100/$db_txtadnum;
foreach($advertdb['text'] as $value){
if($id==0){print <<<EOT
-->
		<tr class="tr3">
<!--
EOT;
}$id++;print <<<EOT
-->
			<td class="black tac" width="$idp%">$value[code]</td>
<!--
EOT;
if($id==$db_txtadnum){
$id=0;print <<<EOT
-->
		</tr>
<!--
EOT;
}}if($id && $id<$db_txtadnum){
for($i=$id;$i<$db_txtadnum;$i++){print <<<EOT
-->
		<td width="$idp%"><br /></td>
<!--
EOT;
}print <<<EOT
-->
		</tr>
<!--
EOT;
}print <<<EOT
-->
	</table>
</div>
<!--
EOT;
}else{print <<<EOT
-->
<div style="margin-top:8px;"></div>
<!--
EOT;
}print <<<EOT
-->





<div style="margin-top:5px">
<div class="fr">主題:$topics | 帖子:$article | 會員:$totalmember | 新會員:$newmember</div>
<!--
EOT;
if($db_todaypost){print <<<EOT
-->
	今日:$tposts | 昨日:$yposts |
<!--
EOT;
}print <<<EOT
-->
	最高日:$hposts | <a href="job.php?action=sign">標記已讀</a> | <a href="search.php?digest=1" target="_blank">精華區</a> | <a href="search.php?sch_time=all&orderway=lastpost&asc=desc&newatc=1" target="_blank">最新帖子</a> <a href="rss.php" target="_blank" title="RSS訂閱本版面最新帖子"><img align="absmiddle" src="$imgpath/$stylepath/rss.png" /></a>
</div>							
							
<style type="text/css">
#notice li{list-style:none;float:left;height:18px;white-space:nowrap;}
.t table tr.tr2 td.f{width:22%;}
.t table tr.tr2 td.e{width:10em;}
</style>
<!--
EOT;
if(!empty($notice_A)){
$noticedb = '';
foreach($notice_A as $value){
$noticedb .= "<li><a href=\"$value[url]\">$value[subject]</a> <span class=\"f9 gray\">$value[startdate]</span></li>";
}print <<<EOT
-->
<div class="bdbA">
    <div id="breadcrumbs"><a class="crumbs-item" href="notice.php"><strong class="strong">公告</strong></a>
		<div id="notice" style="overflow: hidden;">
			<div id="notice0" style="width:98%;height: 18px;line-height:18px;overflow-y: hidden;">
				<ul style="margin: 0; padding: 0;">
					$noticedb
				</ul>
			</div>
			<div style="height:36px;overflow-y:hidden;"></div>
		</div>
	</div>
</div>
<script language="javascript">
function bbsNoticePlay() {
	if (bbsNoticeC.scrollHeight < 36) {
		bbsNoticeO = setTimeout('bbsNoticePlay()',4000);
		bbsNoticeF.scrollTop = bbsNoticeC.scrollTop = 0;
		bbsNoticeH = true;
		return ;
	}
	if (bbsNoticeH) {
		bbsNoticeF.scrollTop = 36;
		if (bbsNoticeC.scrollHeight-18 <= bbsNoticeC.scrollTop) {
			bbsNoticeC.scrollTop = 0;
		} else {
			bbsNoticeC.scrollTop += 18;
		}
		bbsNoticeH = false;
		bbsNoticeO = setTimeout('bbsNoticePlay()',500);
	} else {
		bbsNoticeF.scrollTop = 0;
		bbsNoticeH = true;
		bbsNoticeO = setTimeout('bbsNoticePlay()',4000);
	}
}
var bbsNoticeH = true;
var bbsNoticeF = getObj('notice');
var bbsNoticeC = getObj('notice0');
bbsNoticeF.scrollTop = bbsNoticeC.scrollTop = 0;
bbsNoticeF.onmouseover = function(){if(bbsNoticeO && bbsNoticeH){clearTimeout(bbsNoticeO);bbsNoticeO=0;}};
bbsNoticeF.onmouseout  = function(){if(!bbsNoticeO){bbsNoticeO = setTimeout('bbsNoticePlay()',4000);bbsNoticeH=true;}};
var bbsNoticeO = setTimeout('bbsNoticePlay()',4000);
</script>
<!--
EOT;
}else{print <<<EOT
-->
<div class="bdbA">
    <div id="breadcrumbs"><a class="crumbs-item"><strong>公告</strong></a>
		<div id="notice" style="overflow: hidden;">
			<div id="notice0" style="width:98%;height: 18px;line-height:18px;overflow-y: hidden;">
				<ul style="margin: 0; padding-top:1px;">
					<a>最近沒有論壇公告</a>
				</ul>
			</div>
			<div style="height:36px;overflow-y:hidden;"></div>
		</div>
	</div>
</div>
<!--
EOT;
}print <<<EOT
-->


<!--
EOT;
if($db_iftag && $db_tagindex){print <<<EOT
-->
<div class="t">
	<table width="100%" cellspacing="0" cellpadding="0" align="center">
		<tr>
			<td class="h"><strong class="s8">熱門標簽</strong></td>
		</tr>
		<tr class="tr3">
			<td class="f_one" style="line-height:180%;"><!--
EOT;
include_once(D_P.'data/bbscache/tagdb.php');
$num=0;
foreach($tagdb as $key=>$val){
$rawkey=rawurlencode($key); $num++;
if($num>=$db_tagindex) break;
print <<<EOT
-->
				<span class="gray2 w" style="padding:3px 8px"><a href="job.php?action=tag&tagname=$rawkey">$key</a></span>
<!--
EOT;
}print <<<EOT
-->
			</td>
		</tr>
	</table>
</div>
<!--
EOT;
}print <<<EOT
-->
<!--
EOT;
if($db_newinfoifopen && $nf_config[position]!=2){
	include_once PrintEot('newinfo');
}print <<<EOT
-->
<div class="contentc"></div>
<div id="content">
<div class="contentwrap z">
<!--
EOT;
foreach($catedb as $k=>$cate){
if($forumdb[$cate['fid']]){
if($cate['across']){print <<<EOT
-->
<div class="t t4" id="t_$cate[fid]">
	<table cellspacing="0" cellpadding="0" width="100%" style="border-collapse: collapse; table-layout:fixed">
		<tr>
			<th class="h" colspan="$cate[across]"><a class="closeicon fr" style="cursor:pointer;" onclick="return IndexDeploy('$cate[fid]',0)"><img id="img_$cate[fid]" src="$imgpath/$stylepath/index/cate_$cate[deploy_img].gif" /></a>
<!--
EOT;
if($cate['admin']){print <<<EOT
-->
				<span class="fr" style="margin-right:20px">分欄版主︰$cate[admin]</span>
<!--
EOT;
}print <<<EOT
-->
				&raquo;
				<h2><a href="index.php?cateid=$cate[fid]" class="cfont">$cate[name]</a></h2>
			</th>
		</tr>
		<tr>
			<td colspan="$cate[across]" style="padding:0;border-bottom:0;font:0/0 Arial"></td>
		</tr>
		<tbody id="cate_$cate[fid]" class="across" style="display:$cate[tbody_style];">
<!--
EOT;
$a=0;
foreach($forumdb[$cate['fid']] as $forums){
if($a==0){print <<<EOT
-->
			<tr class="tr1 tr">
<!--
EOT;
}$a++;print <<<EOT
-->

		<td id="fid_{$forums[fid]}" class="td1 f_one" style="padding:0" title="主題 : $forums[topics]&nbsp;&nbsp;帖子 : $forums[article]">
<table cellspacing="0" cellpadding="0" width="100%">
<tr><td style="width:48px;">

<!--
EOT;
if($forums[logo]){print <<<EOT
-->
<a href="thread.php?fid=$forums[fid]"><img  src="$forums[logo]" style="overflow:hidden;"/></a>
<!--
EOT;
}else{
print <<<EOT
-->
<div style="width:37px;text-align:center;height:65px; background:url($imgpath/$stylepath/$forums[pic].gif) right center no-repeat; overflow:hidden" ></div>
<!--
EOT;
}print <<<EOT
-->
</td><td>
<div class="fl">
<h3>
<a href="thread.php?fid=$forums[fid]" id="fn_$forums[fid]" class="fnamecolor b">
$forums[name]
</a><!--
EOT;
if($db_todaypost){print <<<EOT
-->
						 <span class="f10 s3 fn">( $forums[tpost] )</span>
<!--
EOT;
}print <<<EOT
--></h3>
<div class="c"></div>
<!--
EOT;
if($forums[au]){print <<<EOT
-->
					by︰<a href="$forums[ft]" class="a2">$forums[t]</a><br />
					<span class="gray2 f12">$forums[au]</span> <span class="gray2 f9">[$forums[newtitle]]</span>
<!--
EOT;
}if($forums[pic]=='lock'){print <<<EOT
-->
					
<!--
EOT;
}print <<<EOT
-->
</div>
</td></tr></table>
</td>
<!--
EOT;
if($a==$cate['across']){
$a=0;
print <<<EOT
-->
			</tr>
<!--
EOT;
}}if($a!=0){
for($i=$a;$i<$cate['across'];$i++){print <<<EOT
-->
				<td class="f_one td1"><br /></td>
<!--
EOT;
}print <<<EOT
-->
			</tr>
<!--
EOT;
}print <<<EOT
-->
		</tbody>
	</table>
</div>
<!--
EOT;
}else{print <<<EOT
-->
<div class="t" id="t_$cate[fid]">
	<table cellspacing="0" cellpadding="0" width="100%">
		<tr>
			<th class="h" colspan="6"><a class="closeicon fr" style="cursor:pointer;" onclick="return IndexDeploy('$cate[fid]',0)"><img id="img_$cate[fid]" src="$imgpath/$stylepath/index/cate_$cate[deploy_img].gif" /></a>
<!--
EOT;
if($cate[admin]){print <<<EOT
-->
				<span class="fr a2 fn" style="margin-right:20px">分欄版主︰$cate[admin]</span>
<!--
EOT;
}print <<<EOT
-->
				<h2>&raquo; <a href="$db_bfn?cateid=$cate[fid]" class="cfont">$cate[name]</a></h2>
			</th>
		</tr>
		<tr></tr>
		<tbody id="cate_$cate[fid]" style="display:$cate[tbody_style];">
		<tr class="tr2">
			<td width="*" colspan="2" class="tac">論壇</td>
			<td class="tal y-style e">主題 / 文章</td>
			<td class="tal y-style f">最後發表</td>
			<td style="width:120px;" class="tal">版主</td>
		</tr>
<!--
EOT;
foreach($forumdb[$cate[fid]] as $forums){print <<<EOT
-->
			<tr class="tr3 f_one" id="fid_$forums[fid]">
				<td class="icon tac" width="45"><a href="thread.php?fid=$forums[fid]" target="_blank"><img src="$imgpath/$stylepath/$forums[pic].gif" /></a></td>
				<th><!--
EOT;
if($forums[logo]){print <<<EOT
-->
					<a href="thread.php?fid=$forums[fid]" target="_blank"><img align="left" src="$forums[logo]" style="padding-right:5px"></a>
<!--
EOT;
}print <<<EOT
-->
					<h3 class="b"><a href="thread.php?fid=$forums[fid]" id="fn_$forums[fid]">$forums[name]</a></h3>
<!--
EOT;
if($db_todaypost){print <<<EOT
-->
					<span class="s3 f10">($forums[tpost])</span>
<!--
EOT;
}print <<<EOT
-->
					<br />
					<span class="smalltxt gray" id="desc_$forums[fid]">$forums[descrip]</span>
<!--
EOT;
if($showsub[$forums['fid']]){print <<<EOT
-->
					<div>子版︰<span>{$showsub[$forums[fid]]}</span></div>
<!--
EOT;
}print <<<EOT
-->				</th>
				<td class="tal y-style f10 e">$forums[topics] / <span class="gray2 f10">$forums[article]</span><br /></td>
				<th>
<!--
EOT;
if($forums[au]){print <<<EOT
-->
					<a href="$forums[ft]" class="a2">$forums[t]</a><br />
					<span class="gray2"><span class="f12">$forums[au]</span> <span class="f9">[$forums[newtitle]]</span></span>
<!--
EOT;
}if($forums[pic]=='lock'){print <<<EOT
-->
					認證論壇
<!--
EOT;
}print <<<EOT
-->				&nbsp;</th>
				<td class="y-style" style="word-break:keep-all;word-wrap:no-wrap;width:140px;border-right:none;"><!--
EOT;
if($db_adminshow && $forums[admin]){print <<<EOT
-->
					<select name="admin" onchange="Ajump(this.options[this.selectedIndex].value)" style="width:80px;">
						<option value=""> 版主列表</option>
						$forums[admin]
					</select>
<!--
EOT;
}else{print <<<EOT
-->
					$forums[admin]
<!--
EOT;
}print <<<EOT
-->					&nbsp;</td>
			</tr>
<!--
EOT;
}print <<<EOT
-->
		</tbody>
	</table>
</div>
<!--
EOT;
}}if($advertdb['article'] && $ads = readad($advertdb['article'],$k+1,4)){print <<<EOT
-->
<div style="margin-bottom:5px;" class="tac">{$ads}</div>
<!--
EOT;
}}print <<<EOT
-->
</div></div>
<!--
EOT;
if($db_newinfoifopen && $nf_config[position]==2){
	include_once PrintEot('newinfo');
}print <<<EOT
-->
<div class="c"></div>
<script language="JavaScript" src="js/Deploy.js"></script>
<div class="t">
	<table cellspacing="0" cellpadding="0" width="100%">
		<tr>
			<th colspan="2" class="h"><a class="closeicon fr" style="cursor:pointer;" onclick="return IndexDeploy('info',0)"><img id="img_info" src="$imgpath/$stylepath/index/cate_$cate_img.gif" /></a>論壇相關</th>
		</tr>
		<tr></tr>
		<tbody id="cate_info" style="display:$cate_info;">
<!--
EOT;
if($db_indexlink==1){print <<<EOT
-->
			<tr class="tr2">
				<td colspan="2">
<!--
EOT;
if($db_ifselfshare && $groupid!='guest'){print <<<EOT
-->
					<a id="selfshare" style="cursor:pointer;float:right" onclick="sendmsg('pw_ajax.php','action=sharelink',this.id)">自助友情鏈接</a>
<!--
EOT;
}print <<<EOT
-->
					 &raquo; 友情鏈接 </td>
			</tr>
<!--
EOT;
foreach($sharelink[0] as $share){ print <<<EOT
-->
			<tr class="tr3">
				<td class="f_one tac" width="4%"><img src="$imgpath/$stylepath/index/share.gif" /></td>
				<th class="f_one" width="96%" style="word-break: keep-all;border-right:none;">$share</th>
			</tr>
<!--
EOT;
}print <<<EOT
-->
			<tr class="tr3">
				<td class="f_one tac" width="4%"><img src="$imgpath/$stylepath/index/share.gif" /></td>
				<th class="f_one" width="96%" style="word-break: keep-all;border-right:none;">$sharelink[1]</th>
			</tr>
<!--
EOT;
}if($db_indexshowbirth && $brithcache!='empty'){print <<<EOT
-->
			<tr class="tr2">
				<td colspan="2">&raquo; 生日會員</td>
			</tr>
			<tr class="tr3">
				<td class="f_one tac" width="4%" style="padding:0"><img src="$imgpath/$stylepath/index/birth.gif" /></td>
				<th class="f_one" width="95%" style="padding-right:8px;word-break:keep-all;border-right:none;"> <!--
EOT;
if(!$brithcache){print <<<EOT
-->
				今天論壇里沒有人過生日
<!--
EOT;
}else{print <<<EOT
-->
				$brithcache
<!--
EOT;
}print <<<EOT
	-->
				</th>
			</tr>
<!--
EOT;
}print <<<EOT
-->
		<tr class="tr2">
			<td colspan="2">&raquo; 在線用戶<a name="online"></a> -  共 $usertotal 人在線,$userinbbs 位會員,$guestinbbs 位訪客,最多 $higholnum 人發生在 $mostinbbstime </td>
		</tr>
		<tr class="tr3">
			<td class="f_one tac" style="padding:0;border-bottom:0px;" width="4%"><img src="$imgpath/$stylepath/index/online.gif" /></td>
			<td class="f_one tal" style="padding:15px 20px;border-bottom:0px;border-right:none;">
<!--
EOT;
foreach($showgroup as $value){
if($value && (file_exists("$imgdir/$stylepath/group/$value.gif") || $db_http!='N')){print <<<EOT
-->
				<img src="$imgpath/$stylepath/group/$value.gif" align="absmiddle" /> $ltitle[$value]
<!--
EOT;
}}print <<<EOT
-->
				<img src="$imgpath/$stylepath/group/6.gif" align="absmiddle" /> 普通會員
<!--
EOT;
if($db_indexonline){
if($online == 'yes' && $index_whosonline){print <<<EOT
-->
				<a name="online"></a> [<a href="index.php?online=no#online">關閉在線列表</a>]
				<div style="padding:5px 0">
					<hr style="height:1px; background:$tdcolor;color:$tdcolor;border:0">
				</div>
				$index_whosonline
<!--
EOT;
}else{print <<<EOT
-->
				<a name="online"></a> [<a href="index.php?online=yes#online">打開在線列表</a>]
<!--
EOT;
}}print <<<EOT
-->
			</td>
		</tr>
		</tbody>
	</table>
</div>


<!--
EOT;
$head_pop && require PrintEot($head_pop);
?>-->