<!--<?php print <<<EOT
-->
<style type="text/css">
.threadlist{padding-left:1em;}
.threadlist a{padding:0 .5em;}
/*threadicon*/
.threadrss{background:url($imgpath/$stylepath/thread/threadicon.png) left bottom no-repeat;width:14px;height:14px;}
.threadok{background:url($imgpath/$stylepath/thread/threadicon.png) left 1px no-repeat;width:14px;height:14px;}
.threadno{background:url($imgpath/$stylepath/thread/threadicon.png) left -14px no-repeat;width:14px;height:13px;}
.tpage{white-space:nowrap;}
.tpage a:hover{text-decoration:none;color:#ff6600;}
/*公告*/
.gonggao{background:$forumcolorone;border-bottom:1px solid $forumcolortwo;overflow:hidden;width:100%;}
.gonggao .tr1{width:98%;margin:8px;line-height:1.2em;}
.gonggao .tr1 font{line-height:1.1em;}
.gonggao .gongul{border-bottom:3px solid $forumcolortwo;list-style:none;padding:0; margin:0;height:30px;}
.gonggao .gongul li{float:left;height:25px;line-height:25px;background:$forumcolortwo;margin:5px 0 0 10px;}
.gongul .lin{width:6em;display:block;float:left;}
.gonggao .gongul .active{cursor:pointer;text-align:center}
.gonggao .gongul .normal{background:none;cursor:pointer;text-align:center}
</style>
<script language="JavaScript">
//公告切換
function swap_tab(n){
	for(var i=1;i<=2;i++){
		var curC=document.getElementById("tab_"+i);
		var curB=document.getElementById("tab_t"+i);
		if(n==i){
			curC.style.display="block";
			curB.className="active"
		}else{
			curC.style.display="none";
			curB.className="normal"
		}
	}
}
</script>
<div class="bdbA">
	<div id="breadcrumbs">
		$msg_guide
<a href="rss.php?fid=$fid" target="_blank" title="RSS訂閱本版面最新帖子">
<img src="$imgpath/$stylepath/thread/kong.png" class="threadrss" style="_margin-top:5px;"/></a>

<span id="shortcut">
<!--
EOT;
if(strpos($winddb[shortcut],','.$fid.',') !==false){
print <<<EOT
-->
<a style="cursor:pointer;" onclick="javascript:shortCut();" title="將本版塊移除出快捷版塊"><img class="threadok" src="$imgpath/$stylepath/thread/kong.png" style="_margin-top:6px;"/></a>
<!--
EOT;
}else{
print <<<EOT
-->
<a style="cursor:pointer;" onclick="javascript:shortCut();" title="將本版塊添加到快捷版塊"><img class="threadno" src="$imgpath/$stylepath/thread/kong.png" style="_margin-top:5px;"/></a>
<!--
EOT;
}
print <<<EOT
-->
			</span>
</span>
		<span class="fr gray3">
<!--
EOT;
if($admin_T[admin]){
if($db_adminshow){print <<<EOT
-->
			版主: <select name="admin" onchange="Ajump(this.options[this.selectedIndex].value);"><option value="">版主列表</option>$admin_T[admin]</select>
<!--
EOT;
}else{print <<<EOT
-->
					版主: $admin_T[admin]
<!--
EOT;
}}if($admincheck || $groupid==3 || $groupid==4){print <<<EOT
-->
					<a href="forumcp.php?action=edit&fid=$fid" class="s3">[版塊管理]</a>
<!--
EOT;
}print <<<EOT
-->
		</span>
	</div>
</div>

<!--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="f_one 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 class="f_one" width="$idp%"><br /></td>
<!--
EOT;
}print <<<EOT
-->
	</tr>
<!--
EOT;
}print <<<EOT
-->
</table></div>
<!--
EOT;
}print <<<EOT
-->
<!--ads end-->
<div class="c"></div>
<!--
EOT;
if($foruminfo[aid] || is_array($foruminfo['commend'])){print <<<EOT
-->
<div class="gonggao">
<div class="c"></div>
<ul class="gongul">
    <a class="fr" style="margin:.5em 1em 0;" href="#" onClick="return IndexDeploy('thread',0)"><img id="img_thread" src="$imgpath/$stylepath/index/cate_$thread_img.gif" /></a>
    <li class="normal"></li><li class="active" onmouseover="return swap_tab(1)" id="tab_t1"><a class="lin" href="javascript:scroll(0,0)">版塊公告</a></li>
	<li class="normal" onmouseover="return swap_tab(2)" id="tab_t2">
<!--
EOT;
if(is_array($foruminfo['commend'])){print <<<EOT
-->
<a class="lin" href="javascript:scroll(0,0)">版主推薦</a>
<!--
EOT;
}print <<<EOT
-->
	</li>
	<li class="normal"></li><div style="line-height:35px;*line-height:25px;height:35px;*height:25px;overflow:hidden;">版塊簡介︰$foruminfo[descrip]</div>
</ul>
<div id="cate_thread" style="$cate_thread">
<div id="tab_1" class="tr1">
<!--
EOT;
if($foruminfo[aid]){print <<<EOT
-->
$foruminfo[content]
<div class="c"></div>
<div class="fr"><a class="gray" href="notice.php?fid=$foruminfo[fid]#$foruminfo[aid]">更多</a></div>
<div class="c"></div>
<!--
EOT;
}print <<<EOT
-->
</div>
<div class="tr1" id="tab_2" style="display:none">
<!--
EOT;
if(is_array($foruminfo['commend'])){print <<<EOT
-->
<style type="text/css">
/*版主推薦*/
#commend{margin:0px;padding:0px;}
#commend li{width:45%;float:left;padding-left:1.2em;background:url($imgpath/$stylepath/dotB.png) no-repeat 0 .3em;height:20px;line-height:20px;}
#commend a{margin-right:1em;}
</style>
<ul id="commend" class="cc" style="margin:.1em 0 0 0;list-style-type:none">
<!--
EOT;
foreach($foruminfo['commend'] as $key=>$value){print <<<EOT
-->
<li class="gray2"><a href="read.php?tid=$value[tid]" class="blue">$value[subject]</a>$value[author]</li>
<!--
EOT;
}print <<<EOT
-->
</ul>
<!--
EOT;
}print <<<EOT
-->
</div></div>
<div class="c"></div>

</div>
<!--
EOT;
}print <<<EOT
-->

<!--
EOT;
$thread_children && require_once PrintEot($thread_children);
if($db_union[5]){
$db_union[5]=str_replace(array('{f_fid}','{sch_time}'),array($fid,$_G[schtime]),$db_union[5]);
}print <<<EOT
-->

<div class="c" id="c"></div>

<ul class="t-list cc">
<span id="t_typedb">
<!--
EOT;
if($groupid!='guest' && $foruminfo['f_check']){print <<<EOT
-->
                   <li id="thread_type_check"><a class="fn" href="thread.php?fid=$fid&search=check#c">未驗證主題</a></li>
<!--
EOT;
}
foreach($t_typedb as $key=>$value){
if($value){
print <<<EOT
-->
                   <li id="thread_type_$key"><a class="fn" href="thread.php?fid=$fid&type=$key#c">{$value}</a></li>
<!--
EOT;
}}print <<<EOT
-->
</span>
</ul>
<div class="t3">
<!--
EOT;
if($N_allowtypeopen){print <<<EOT
-->
<span class="fr"><a href="post.php?fid=$fid"><img src="$imgpath/$stylepath/post.png" id="td_post" /></a></span>
<!--
EOT;
}print <<<EOT
-->
<span class="fl">$pages$db_union[5]</span>
<div class="c"></div>
</div>
<div class="c"></div>
<!--
EOT;
if($N_allowtypeopen){print <<<EOT
-->
<div id="menu_post" class="menu menu-post cc f14 tac" style="display:none;">
	<div class="menu-b" style="width:67px;">
<!--
EOT;
if($foruminfo['allowtype'] & 1){print <<<EOT
-->
	<a href="post.php?fid=$fid">新  帖</a>
<!--
EOT;
}if($foruminfo['allowtype'] & 2 && $_G[allownewvote]){print <<<EOT
-->
	<a href="post.php?fid=$fid&special=1">投  票</a>
<!--
EOT;
}if($foruminfo['allowtype'] & 4 && $_G[allowactive]){print <<<EOT
-->
	<a href="post.php?fid=$fid&special=2">活  動</a>
<!--
EOT;
}if($foruminfo['allowtype'] & 8 && $_G['allowreward']){print<<<EOT
-->
	<a href="post.php?fid=$fid&special=3">懸  賞</a>
<!--
EOT;
}if($foruminfo['allowtype'] & 16 && $_G['allowgoods']){print <<<EOT
-->
	<a href="post.php?fid=$fid&special=4">商  品</a>
<!--
EOT;
}if($foruminfo['allowtype'] & 32 && $_G['allowdebate']){print <<<EOT
-->
	<a href="post.php?fid=$fid&special=5">辯  論</a>
<!--
EOT;
}print <<<EOT
-->
	</div>
</div>
<!--
EOT;
}print <<<EOT
-->
$trd_adminhide
<div class="t z" style="margin:auto"><table cellspacing="0" cellpadding="0" width="100%" id="ajaxtable">
<!--
EOT;
$lang_special=array(
	'all'=> '按類型查看',
	'1'	=> '投  票',
	'2'	=> '活  動',
	'3'	=> '懸  賞',
	'4'	=> '商  品',
	'5'	=> '辯  論',
);print <<<EOT
-->
	<tr><th class="h" colspan="6" style="padding:0px;margin:0px;">
	<div id="menu_special" class="menu tac f14 pad" style="display:none;">
		 <ul style="width:81px;padding-top:.3em;">
		      <li><a href="thread.php?fid=$fid">全 部</a></li>
		      <li><a href="thread.php?fid=$fid&special=1">投  票</a></li>
		      <li><a href="thread.php?fid=$fid&special=2">活  動</a></li>
		      <li><a href="thread.php?fid=$fid&special=3">懸  賞</a></li>
		      <li><a href="thread.php?fid=$fid&special=4">商  品</a></li>
			  <li><a href="thread.php?fid=$fid&special=5">辯  論</a></li>
		 </ul>
	</div>
<div class="fn threadlist">
<a class="b" href="thread.php?fid=$fid#c">全部</a>
<a href="thread.php?fid=$fid&search=digest#c">精華</a>
<a href="thread.php?fid=$fid&special=0">新  帖</a>
<a href="thread.php?fid=$fid&special=1">投  票</a>
<a href="thread.php?fid=$fid&special=2">活  動</a>
<a href="thread.php?fid=$fid&special=3">懸  賞</a>
<a href="thread.php?fid=$fid&special=4">商  品</a>
<a href="thread.php?fid=$fid&special=5">辯  論</a>
</div>
<div class="c"></div>
		</th>
	</tr>
	<tbody style="table-layout:fixed;"><tr></tr>
	<tr class="tr2">
	<td style="width:2.8em" class="tac y-style"></td>
	<td class="tac">文章</td>
	<td style="width:10em" class="y-style">作者</td>
	<td style="width:7em" class="tal y-style">回復 / 人氣</td>
	<td style="width:12em" class="y-style">最後發表</td>
	</tr>
<!--
EOT;
if($page==1 && $ifsort){
if($NT_A){
$NT_A[startdate] = get_date($NT_A[startdate]);
print <<<EOT
-->
	<tr align="middle" class="tr3 t_one">
		<td class="tac"><img src="$imgpath/$stylepath/thread/anc.gif" /></td>
		<th>&nbsp論壇公告: <h3><a href="$NT_A[url]" class="black">$NT_A[subject]</a></h3></th>
		<td class="tal y-style"><a href="u.php?action=show&username=$NT_A[rawauthor]" class="bl">$NT_A[author]</a></td>
		<td class="tal y-style"><a href="notice.php?fid=$NT_A[fid]">論壇公告</a></td>
		<td class="y-style">$NT_A[startdate]</td>
	</tr>
<!--
EOT;
}if($NT_C){
$NT_C[startdate] = get_date($NT_C[startdate]);
print <<<EOT
-->
	<tr align="middle" class="tr3 t_one">
		<td class="tac"><img src="$imgpath/$stylepath/thread/anc.gif" /></td>
		<th>&nbsp分類公告: <h3><a href="$NT_C[url]" class="black">$NT_C[subject]</a></h3></th>
		<td class="tal y-style"><a href="u.php?action=show&username=$NT_C[rawauthor]" class="bl">$NT_C[author]</a></td>
		<td class="tal y-style"><a href="notice.php?fid=$NT_C[fid]">分類公告</a></td>
		<td class="y-style">$NT_C[startdate]</td>
	</tr>
<!--
EOT;
}}
$tpc_topped=0;
foreach($threaddb as $key => $thread){
$forumset['cutnums'] && $thread['subject'] = substrs($thread['subject'],$forumset['cutnums']);
$thread['postdate'] = get_date($thread['postdate'],'Y-m-d');
$thread['lstptime'] = get_date($thread['lastpost']);
if($page==1 && $ifsort && $thread[topped]==0 && $tpc_topped==0){
$tpc_topped=1;
print <<<EOT
-->
	<tr class="tr2"><td colspan="6" class="tac" style="border-top:0">普通主題</td></tr>
<!--
EOT;
}print <<<EOT
-->
	<tr align="center" class="tr3 t_one"><td><a title="打開新窗口" href="$thread[tpcurl]" target="_blank">$thread[status]</a></td>
	<td style="text-align:left;line-height:23px;" id="td_$thread[tid]">
<!--
EOT;
if($thread[digest]){print <<<EOT
-->
			<img class="fr" src="$imgpath/$stylepath/file/digest_$thread[digest].gif" align="absmiddle" style="margin-top:4px;" title="精華帖標志" />
<!--
EOT;
}if($thread[adminbox]){print <<<EOT
-->
<span style="margin-right:5px;">$thread[adminbox]</span>
<!--
EOT;
}if($thread[toolinfo]){print <<<EOT
-->
    		<span class="s3">[$thread[toolinfo]]</span>
<!--
EOT;
}if($thread[topped]){print <<<EOT
-->
			<img src="$imgpath/$stylepath/file/headtopic_$thread[topped].gif" align="absmiddle" title="置頂帖標志"/>
<!--
EOT;
}print <<<EOT
-->
	$thread[useriocn]

<!--
EOT;
if($forumset['addtpctype'] && $t_typedb[$thread['type']] && $thread['fid']==$fid){print <<<EOT
-->
			<a href="thread.php?fid=$fid&type=$thread[type]" class="s8">[{$t_typedb[$thread[type]]}]</a>
<!--
EOT;
}print <<<EOT
-->
			<h3>
<!--
EOT;
if($thread['state'] == 0 && $thread['rewcredit'] > 0){print <<<EOT
-->
			<span class="s1"> &#8212; 懸賞金額︰$thread[rewcredit] &#8212; </span>
<!--
EOT;
}print <<<EOT
-->
			<a href="$thread[tpcurl]" id="a_ajax_$thread[tid]">$thread[subject]</a></h3> $thread[ifmark] $thread[titleadd]
<!--
EOT;
if($timestamp-$thread[lastpost]<=$db_newtime){print <<<EOT
-->
	<img src="$imgpath/$stylepath/file/new.gif" align="absmiddle" title="新帖標志" />
<!--
EOT;
}if($forumset['inspect'] && $thread['inspect']){print <<<EOT
-->
	<span class="tpage"><font color="red">[{$thread[inspect][1]} 閱至 {$thread[inspect][0]}樓]</font></span>
<!--
EOT;
}if($thread[ispage]){print <<<EOT
-->
	<span class="tpage">$thread[ispage]</span>
<!--
EOT;
}print <<<EOT
-->
	</td>
	<td class="tal y-style"><a href="u.php?action=show&uid=$thread[authorid]" class="bl">$thread[author]</a>
		<div class="f10 gray2">$thread[postdate]</div></td>
	<td class="tal y-style f10"><span class="s8">$thread[replies]</span> / $thread[hits]</td>
	<td class="tal y-style"><a href="read.php?tid=$thread[tid]&page=e&fpage=$page#a" class="f10"> $thread[lstptime] </a><br />
	<span class="gray2">by: $thread[lastposter]</span></td>
	</tr>
<!--
EOT;
if($managemode==1){
if($db_ajax & 1){print <<<EOT
-->
    <tr class="tr3"><td></td><td>
	<div class="fr s8"> [
<!--
EOT;
if($isGM || $pwSystem[typeadmin]){print <<<EOT
-->
		<a id="digest_$thread[tid]" style="cursor:pointer" onclick="sendmsg('mawhole.php?ajax=1&action=digest&fid=$thread[fid]&seltid=$thread[tid]','',this.id)" title="加入精華帖">精</a> <a id="lock_$thread[tid]" style="cursor:pointer" onclick="sendmsg('mawhole.php?ajax=1&action=lock&fid=$thread[fid]&seltid=$thread[tid]','',this.id)" title="鎖定帖子不讓會員再回復帖子">鎖定</a> <a id="pushtopic_$thread[tid]" style="cursor:pointer" onclick="sendmsg('mawhole.php?ajax=1&action=pushtopic&fid=$thread[fid]&seltid=$thread[tid]','',this.id)" title="提前帖子">提</a> <a id="downtopic_$thread[tid]" style="cursor:pointer" onclick="sendmsg('mawhole.php?ajax=1&action=downtopic&fid=$thread[fid]&seltid=$thread[tid]','',this.id)" title="將帖子往後壓">壓帖</a> <a id="edit_$thread[tid]" style="cursor:pointer" onclick="sendmsg('mawhole.php?ajax=1&action=edit&fid=$thread[fid]&seltid=$thread[tid]','',this.id)" title="編輯標題">亮</a>
<!--
EOT;
}if($isGM || $pwSystem[topped]){print <<<EOT
-->
<a id="headtopic_$thread[tid]" style="cursor:pointer" onclick="sendmsg('mawhole.php?ajax=1&action=headtopic&fid=$thread[fid]&seltid=$thread[tid]','',this.id)" title="置頂主題:將主題置頂,以便會員查看">頂</a>
<!--
EOT;
}print <<<EOT
-->
] </div><td colspan="4"></td></td></tr>
<!--
EOT;
}else{print <<<EOT
-->
    <tr class="tr3"><td></td><td>
	<div class="fr s8"> [
<!--
EOT;
if($isGM || $pwSystem[typeadmin]){print <<<EOT
-->
		<a id="digest_$thread[tid]" href="mawhole.php?action=digest&fid=$thread[fid]&seltid=$thread[tid]" title="加入精華帖">精</a> <a id="lock_$thread[tid]" href="mawhole.php?action=lock&fid=$thread[fid]&seltid=$thread[tid]" title="鎖定帖子不讓會員再回復帖子">鎖定</a> <a id="pushtopic_$thread[tid]" href="mawhole.php?action=pushtopic&fid=$thread[fid]&seltid=$thread[tid]" title="提前帖子">提</a> <a id="downtopic_$thread[tid]" href="mawhole.php?action=downtopic&fid=$thread[fid]&seltid=$thread[tid]" title="將帖子往後壓">壓帖</a> <a id="edit_$thread[tid]" href="mawhole.php?action=edit&fid=$thread[fid]&seltid=$thread[tid]" title="編輯標題">亮</a>
<!--
EOT;
}if($isGM || $pwSystem[topped]){print <<<EOT
-->
	<a id="headtopic_$thread[tid]" href="mawhole.php?action=headtopic&fid=$thread[fid]&seltid=$thread[tid]" title="置頂主題:將主題置頂,以便會員查看">頂</a>
<!--
EOT;
}print <<<EOT
-->
		] </div><td colspan="4"></td></td></tr>
<!--
EOT;
}}print <<<EOT
-->

<!--
EOT;
}print <<<EOT
-->
	<tr><td colspan="6" class="f_one" style="height:8px"></td></tr>
	</tbody>
</table></div>
<!--
EOT;
if($managecheck){print <<<EOT
-->
<div class="t5 tac f_one" style="padding:15px 0 15px; margin-bottom:2px;margin-top:2px;">
	<div>管理選項:
<!--
EOT;
if($foruminfo['f_check'] && $search=='check' && ($isGM || $pwSystem['tpccheck'])){print <<<EOT
-->
		<input name="action" type="radio" value="check" />驗證主題
<!--
EOT;
}if($isGM || $pwSystem[topped]){print <<<EOT
-->
		<input name="action" type="radio" value="headtopic" />置頂
<!--
EOT;
}if($isGM || $pwSystem[typeadmin]){print <<<EOT
-->
		<input name="action" type="radio" value="digest" />精華
		<input name="action" type="radio" value="lock" />鎖定
		<input name="action" type="radio" value="edit" />加亮
		<input name="action" type="radio" value="pushtopic" />提前
		<input name="action" type="radio" value="downtopic" />壓帖
<!--
EOT;
}if($isGM || $pwSystem[tpctype]){print <<<EOT
-->
		<input name="action" type="radio" value="type" />主題分類
<!--
EOT;
}if($isGM || $pwSystem[moveatc]){print <<<EOT
-->
		<input name="action" type="radio" value="move" />移動
<!--
EOT;
}if($isGM || $pwSystem[copyatc]){print <<<EOT
-->
		<input name="action" type="radio" value="copy" />復制
<!--
EOT;
}if($isGM || $pwSystem[unite]){print <<<EOT
-->
		<input name="action" type="radio" value="unite" />合並
<!--
EOT;
}if($isGM || $pwSystem[delatc]){print <<<EOT
-->
		<input name="action" type="radio" value="del" checked />刪除
<!--
EOT;
}print <<<EOT
-->
	</div>
	<div style="margin-top:10px;">
	     <input class="bt" type="button" name="chkall" value="全 選" onclick="CheckAll(this.form)" />
		 <input class="bt" type="button" value="帖子管理" onclick="location.href='thread.php?fid=$fid&search=$search&page=$page&concle=$concle'" />
		 <input class="btn" type="button" name="hello" value="提 交" onclick="this.form.submit();" />
	</div>
</div>
</form>
<!--
EOT;
}print <<<EOT
-->
<div class="t1" style="margin:5px 0;"><table cellspacing="0" cellpadding="0" width="100%" style="table-layout:fixed;">
	<tr>
		<td>
		<form action="thread.php?fid=$fid&page=$page" method="post">
		<input type="hidden" name="type" value="$type">
		<input type="hidden" name="special" value="$special">
		<select name="search">
			<option value="1">1天內的主題</option>
			<option value="digest">本版精華區</option>
			<option value="1">1天內的主題</option>
			<option value="2">2天內的主題</option>
			<option value="7">1星期內的主題</option>
			<option value="30">1個月內的主題</option>
			<option value="60">2個月內的主題</option>
			<option value="90">3個月內的主題</option>
			<option value="180">6個月內的主題</option>
			<option value="365">1年內的主題</option>
		</select>
<!--
EOT;
if($_G[alloworder]){print <<<EOT
-->
		<select name="orderway">
			<option value="lastpost" $ordersel[lastpost]>最後發表</option>
			<option value="postdate" $ordersel[postdate]>發表時間</option>
			<option value="hits" $ordersel[hits]>人氣</option>
			<option value="replies" $ordersel[replies]>回復</option>
		</select>
		<select name="asc">
			<option value="ASC" $ascsel[ASC]>升序</option>
			<option value="DESC" $ascsel[DESC]>降序</option>
		</select>
<!--
EOT;
}print <<<EOT
-->
		<input class="btn" type="button" value="提 交" onclick="this.form.submit();">
		</form>
		</td>
		<td align="right">
<!--
EOT;
if($winduid){print <<<EOT
-->
		<form name="jump" method="post">
		<a class="bta" onclick="sendmsg('pw_ajax.php?action=readlog','',this.id);" id="readlog" href="javascript:;">帖子瀏覽記錄<img src="$imgpath/wind/menu-down.gif"  align="absmiddle"/></a>
		<a class="bta" id="threadlog" onclick="sendmsg('pw_ajax.php','action=threadlog',this.id);" href="javascript:;">版塊瀏覽記錄<img src="$imgpath/wind/menu-down.gif" align="absmiddle"/></a>
		</form>
<!--
EOT;
}print <<<EOT
-->
		<a class="bta" href="profile.php?action=forumright&fid=$fid" title="查看您在本版塊的權限">版塊權限查看</a>
		</td>
	</tr>
</table></div>

<div class="t3">
<!--
EOT;
if($foruminfo['allowtype']){print <<<EOT
-->
<span class="fr"><a href="post.php?fid=$fid"><img src="$imgpath/$stylepath/post.png" id="td_post1" /></a></span>
<!--
EOT;
}print <<<EOT
-->
	<span class="fl">$pages</span>
	<div class="c"></div>
</div>
<div class="c"></div>
<!--
EOT;
$db_threadonline==1 && require_once PrintEot('thread_online');
$fastpost && require_once PrintEot($fastpost);
print <<<EOT
-->
<br />
<div style="width:550px;margin:auto;" class="pd8">
    <center>
         <img src="$imgpath/$stylepath/thread/topicnew.gif" align="absmiddle"/> 開放主題&nbsp;&nbsp;&nbsp;<img src="$imgpath/$stylepath/thread/topichot.gif" align="absmiddle"/> 熱門主題&nbsp;&nbsp;&nbsp;<img src="$imgpath/$stylepath/thread/topiclock.gif" align="absmiddle"/> 鎖定主題&nbsp;&nbsp;&nbsp;<img src="$imgpath/$stylepath/thread/topicclose.gif" align="absmiddle"/> 關閉主題&nbsp;&nbsp;&nbsp;<img src="$imgpath/$stylepath/thread/vote.gif" align="absmiddle"/> 投票主題&nbsp;&nbsp;&nbsp;<img src="$imgpath/$stylepath/thread/votelock.gif" align="absmiddle"/> 鎖定投票
    </center>
</div>


<script language="JavaScript">
var ifcheck = true;
var fid = '$fid';
var forumtitle = "$foruminfo[name]";
var imgok = "threadok";
var imgno = "threadno";
var myshortcut = "$myshortcut";
function CheckAll(form){
	for(var i=0;i<form.elements.length-12;i++){
		var e = form.elements[i];
		if(e.type=='checkbox') e.checked = ifcheck;
	}
	ifcheck = ifcheck == true ? false : true;
}
function Fjump(value){
	if(value!=''){
		window.location=('$B_url/thread.php?fid='+value);
	}
}
function Ajump(value){
	if(value!= ''){
		window.location=('$B_url/u.php?action=show&username='+value);
	}
}
var totalpage = parseInt('$totalpage');
var page = parseInt('$page');
if(totalpage > 1){
	document.onkeydown=function(e){
		var e = is_ie ? window.event : e;
		var tagname = is_ie ? e.srcElement.tagName : e.target.tagName;
		if(tagname == 'INPUT' || tagname == 'TEXTAREA'){
			return;
		}
		actualCode = e.keyCode ? e.keyCode : e.charCode;
		if(actualCode == 39 && page<totalpage) {
			window.location = 'thread.php?fid=$fid&search={$search}&{$w_add}{$typeadd}page=' + (page+1);
		}
		if(actualCode == 37 && page>1){
			window.location = 'thread.php?fid=$fid&search={$search}&{$w_add}{$typeadd}page=' + (page-1);
		}
	}
}

function shortCut() {
	ajax.send('pw_ajax.php?action=shortcut&fid='+fid,'',function(){
		ajax.guide();
		var rText = ajax.request.responseText.split('\t');
		if (typeof(rText[1]) != 'undefined' && rText[1] == 'successok') {
			getObj('shortcut').innerHTML = "<a style=\"cursor:pointer;\" onclick=\"javascript:shortCut();\" title=\"將本版塊移除出快捷版塊\"><img class=\""+imgok+"\" src=\"$imgpath/$stylepath/thread/kong.png\" /></a>";
			var shortcutforum = getObj('shortcutforum');
			if (myshortcut == false) {
				var shortcutname = getObj('shortcutname');
				shortcutname.innerHTML = "收藏的版塊:&nbsp;";
				shortcutforum.innerHTML = "<li id=\"scf_"+fid+"\"><a href=\"thread.php?fid="+fid+"\">"+forumtitle+"</a>&nbsp;</li>";
			} else {
				if (IsElement('shortcutforum')) {
					var li = document.createElement('li');
					li.id = 'scf_'+fid;
					li.innerHTML = "<a href=\"thread.php?fid='+fid+'\">"+forumtitle+"</a>&nbsp;";
					shortcutforum.appendChild(li);
				}
			}

		} else if (typeof(rText[1]) != 'undefined' && rText[1] == 'successno') {
			getObj('shortcut').innerHTML = "<a style=\"cursor:pointer;\" onclick=\"javascript:shortCut();\" title=\"將本版塊添加到快捷版塊\"><img class=\""+imgno+"\" src=\"$imgpath/$stylepath/thread/kong.png\" /></a>";
			if (IsElement('scf_'+fid)) {
				var thisnode = getObj('scf_'+fid);
				var shortcutforum = thisnode.parentNode;
				shortcutforum.removeChild(thisnode);
				var li = shortcutforum.childNodes;
				for (var i=0; i<li.length; i++) {
					if (li[i].nodeType == 1) {
						return false;
					}
				}
				myshortcut = false;
				var shortcutname = getObj('shortcutname');
				shortcutname.innerHTML = "熱門版塊:&nbsp;";
				shortcutforum.innerHTML = getObj('db_shortcutforum').innerHTML;
			}
		}

	});
}
</script>
<!--
EOT;
if($ajaxcheck){print <<<EOT
-->
<script type="text/javascript" language="JavaScript" src="js/ajax_subject.js"></script>
<!--
EOT;
}if($foruminfo[aid] || is_array($foruminfo['commend'])){print <<<EOT
-->
<script language="JavaScript" src="js/Deploy.js"></script>
<!--
EOT;
}?>-->
