<!--<?php
if($managecheck){print <<<EOT
-->
<script type="text/javascript">
	function postManage(){
		/*计数获取*/
		this.checknum = function(all){
			var a = b = 0;
			var selected = '';
			var check = document.getElementsByName('tidarray[]');
			for (var i=0; i<check.length; i++) {
				if(!all && check[i].checked) {
					selected += '&tidarray[' + a + ']=' + check[i].value;
					a++;
				}else if(all == 1){
					check[i].checked = true;
					a++;
				}else if(all == 2){
					check[i].checked = false;
					b++;
				}else{
					b++;
				}
			}
			return new Array(a,b,selected);
		}
		this.checkinfo = '';
		this.setCounter = function(num){
			var tags = document.getElementsByTagName('span');
			for(var i=0;i<tags.length;i++){
				if(tags[i].id == 'select_count')tags[i].innerHTML = num;
			}
		}
		this.show = function(popDiv,obj){
			this.checkinfo = this.checknum(0);
			if(this.checkinfo[0] > 0){
				this.setCounter(this.checkinfo[0]);
				read.open(popDiv,'',2);
			}else{
				read.close();
			}
			this.setSelectAll();
		}
		this.setSelectAll = function(){
			var total = this.checkinfo[1] + this.checkinfo[0];
			if (total > 0) {
				getObj('pw_sel_all').checked = false;
				try{getObj('ajaxall').checked = false;}catch(e){}
				if(this.checkinfo[0] == total){
					getObj('pw_sel_all').checked = true;
					try{getObj('ajaxall').checked = true;}catch(e){}
				}
			}
		}
		this.action = function (atag,id){
			read.obj = atag;
			var info = this.checknum();
			var data = info[2];
			sendmsg(atag.href,data,id);
			return false;
		}
		this.checkall = function(obj){
			var allType = 1;//1全选，2取消全选
			if(!obj.checked)allType = 2;
			this.checkinfo = this.checknum(allType);
			this.setSelectAll();
			this.setCounter(this.checkinfo[0]);
		}
	}
	var postManage = new postManage;
</script>
<!-- //start post管理弹出 -->
<div id="postbatch" style="display:none" class="popout">
<table cellspacing="0" cellpadding="0" border="0"><tbody><tr><td class="bgcorner1"></td><td class="pobg1"></td><td class="bgcorner2"></td></tr><tr><td class="pobg4"></td><td><div class="popoutContent">
<div style="width:320px;">
	<div class="popTop" style="cursor:move;" onmousedown = "read.move(event);">
		<a href="javascript:void(0)" class="adel" onclick="closep()">关闭</a>
		<span class="mr20">选中<span class="b s2" id="select_count">1</span>篇</span>
	</div>
	<div class="p10 cc pr">
<!-- 
EOT;
if ($colony) {
if($newColony->right['topicadmin']['toptopic'] && $ifcolonyadmin || $ifbbsadmin || $pwSystem['forumcolonyright']) {print<<<EOT
-->
	<a title="置顶帖子" href="javascript:;" onclick="submitAction(document.mawhole,'toptopic');return false;" id="toptopic" class="bta fl">置顶</a>
<!--
EOT;
}if($newColony->right['topicadmin']['digest'] && $ifcolonyadmin || $ifbbsadmin || $pwSystem['forumcolonyright']){print<<<EOT
-->
   <a title="精华帖子" href="javascript:;" onclick="submitAction(document.mawhole,'digest');return false;" id="digest" class="bta fl">精华</a>
<!--
EOT;
}if($newColony->right['topicadmin']['lock'] && $ifcolonyadmin || $ifbbsadmin || $pwSystem['forumcolonyright']){print<<<EOT
-->
	<a title="锁定帖子" href="javascript:;" onclick="submitAction(document.mawhole,'lock');return false;" id="lock" class="bta fl">锁定</a>
<!--
EOT;
}if($newColony->right['topicadmin']['pushtopic'] && $ifcolonyadmin || $ifbbsadmin || $pwSystem['forumcolonyright']){print<<<EOT
-->
	<a title="提前帖子" href="javascript:;" onclick="submitAction(document.mawhole,'pushtopic');return false;" id="pushtopic" class="bta fl">提前</a>	
<!--
EOT;
}if($newColony->right['topicadmin']['downtopic'] && $ifcolonyadmin || $ifbbsadmin || $pwSystem['forumcolonyright']){print<<<EOT
-->
    <a title="压帖帖子" href="javascript:;" onclick="submitAction(document.mawhole,'downtopic');return false;" id="pushtopic" class="bta fl">压帖</a>	
<!--
EOT;
}if($newColony->right['topicadmin']['highlight'] && $ifcolonyadmin || $ifbbsadmin || $pwSystem['forumcolonyright']){print<<<EOT
-->
	<a title="加亮帖子" href="javascript:;" onclick="submitAction(document.mawhole,'highlight');return false;" id="highlight" class="bta fl">加亮</a>	
<!--
EOT;
}if($ifcolonyadmin || $ifbbsadmin || $pwSystem['forumcolonyright']){print<<<EOT
-->
	<a title="分类帖子" href="javascript:;" onclick="submitAction(document.mawhole,'type');return false;" id="type" class="bta fl">分类</a>	
<!--
EOT;
}if($newColony->right['topicadmin']['del'] && $ifcolonyadmin || $ifbbsadmin || $pwSystem['forumcolonyright']){print<<<EOT
-->
	<a title="删除帖子" href="javascript:;" onclick="submitAction(document.mawhole,'del');return false;" id="del" class="bta fl">删除</a>	
<!--
EOT;
}print <<<EOT
-->
<!--
EOT;
}else{print <<<EOT
-->
		<div class="cc mb10">
<!--
EOT;
if($foruminfo['f_check'] && $search=='check' && ($isGM || $pwSystem['tpccheck'])){print <<<EOT
-->
    <a title="验证帖子" href="mawhole.php?ajax=1&action=check&fid=$fid&type=batch" onclick="return postManage.action(this,1)" id="check" class="bta fl">验证</a>	
<!--
EOT;
}if($isGM || $pwSystem[topped]){print <<<EOT
-->
    <a title="置顶帖子" href="mawhole.php?ajax=1&action=headtopic&fid=$fid&type=batch" onclick="return postManage.action(this,1)" id="headtopic" class="bta fl">置顶</a>
<!--
EOT;
}if($isGM || $pwSystem['digestadmin']){print <<<EOT
-->
    <a title="精华帖子" href="mawhole.php?ajax=1&action=digest&fid=$fid&type=batch" onclick="return postManage.action(this,1)" id="digest" class="bta fl">精华</a>
<!--
EOT;
}if($isGM || $pwSystem['lockadmin']){print <<<EOT
-->
   <a title="锁定帖子" href="mawhole.php?ajax=1&action=lock&fid=$fid&type=batch" onclick="return postManage.action(this,1)" id="lock" class="bta fl">锁定</a>	
<!--
EOT;
}if($isGM || $pwSystem['pushadmin']){print <<<EOT
-->
   <a title="提前帖子" href="mawhole.php?ajax=1&action=pushtopic&fid=$fid&type=batch" onclick="return postManage.action(this,1)" id="pushtopic" class="bta fl">提前</a>	
    
<!--
EOT;
}if($isGM || $pwSystem['downadmin']){print <<<EOT
-->
    <a title="压帖帖子" href="mawhole.php?ajax=1&action=downtopic&fid=$fid&type=batch" onclick="return postManage.action(this,1)" id="pushtopic" class="bta fl">压帖</a>
<!--
EOT;
}if($isGM || $pwSystem['coloradmin']){print <<<EOT
-->
    <a title="加亮帖子" href="mawhole.php?ajax=1&action=edit&fid=$fid&type=batch" onclick="return postManage.action(this,1)" id="edit" class="bta fl">加亮</a>	
<!--
EOT;
}print <<<EOT
-->
		</div>
		<div class="cc mb10">
<!--
EOT;
if($isGM || $pwSystem[tpctype]){print <<<EOT
-->
    <a title="分类帖子" href="mawhole.php?ajax=1&action=type&fid=$fid&type=batch" onclick="return postManage.action(this,1)" id="type" class="bta fl">分类</a>	
<!--
EOT;
}if($isGM || $pwSystem[moveatc]){print <<<EOT
-->
    <a title="移动帖子" href="mawhole.php?ajax=1&action=move&fid=$fid&type=batch" onclick="return postManage.action(this,1)" id="move" class="bta fl">移动</a>	
<!--
EOT;
}if($isGM || $pwSystem[copyatc]){print <<<EOT
-->
    <a title="复制帖子" href="mawhole.php?ajax=1&action=copy&fid=$fid&type=batch" onclick="return postManage.action(this,1)" id="copy" class="bta fl">复制</a>	
<!--
EOT;
}if($isGM || $pwSystem[unite]){print <<<EOT
-->
    <a title="合并帖子" href="mawhole.php?ajax=1&action=unite&fid=$fid&type=batch" onclick="return postManage.action(this,1)" id="unite" class="bta fl">合并</a>	
<!--
EOT;
}if($isGM || $pwSystem[delatc]){print <<<EOT
-->
	<a title="删除帖子" href="mawhole.php?ajax=1&action=del&fid=$fid&type=batch" onclick="return postManage.action(this,1)" id="del" class="bta fl">删除</a>	
<!--
EOT;
}if($isGM || ($pwSystem['banuser'] == 1 && $isBM) || $pwSystem['banuser'] == 2){print <<<EOT
-->
   <a title="禁言作者" href="mawhole.php?ajax=1&action=banuser&fid=$fid&type=batch" onclick="return postManage.action(this,1)" id="banuser" class="bta fl">禁言</a>
<!--
EOT;
}print <<<EOT
-->
		</div>
		<div class="cc mb10">
<!--
EOT;
if($admincheck && $forumset['commend']){print <<<EOT
-->
	<a title="加入到版主推荐列表" href="mawhole.php?ajax=1&action=commend&fid=$fid&type=batch" onclick="return postManage.action(this,1)" id="commend" class="bta fl">版主推荐</a>
<!--
EOT;
}if($admincheck && $forumset['commend']){print <<<EOT
-->
	<a title="印戳" href="mawhole.php?ajax=1&action=multioverprint&fid=$fid&type=batch" onclick="return postManage.action(this,1)" id="overprint" class="bta fl">印戳</a>
<!--
EOT;
}print <<<EOT
-->
		</div>
<!--
EOT;
}print <<<EOT
-->
	</div>
	<div class="popBottom cc">
		<label class="fl"><input name="ajaxall" id="ajaxall" type="checkbox" value=""  onclick="postManage.checkall(this);"/>全选</label>
	</div>
</div>
</div></td><td class="pobg2"></td></tr><tr><td class="bgcorner4"></td><td class="pobg3"></td><td class="bgcorner3"></td></tr></tbody></table>
</div>
<!-- //end post管理弹出 -->
<!--ads begin-->
<!--
EOT;
}
list($htmlAdvert,$arrayAdvert) = pwAdvert('Mode.Forum.TextThread',$fid);
if ($htmlAdvert) {print <<<EOT
-->
<div class="textMes">
	<table width="100%" cellspacing="0" cellpadding="0">
<!--
EOT;
	$tmpCount=0;
	$idp = 100/$db_txtadnum;
	foreach ($arrayAdvert as $value) {
		if ($tmpCount==0) {print <<<EOT
-->
		<tr class="tr3">
<!--
EOT;
		}
		$tmpCount++;print <<<EOT
-->
			<td class="tac" width="$idp%">$value</td>
<!--
EOT;
		if ($tmpCount == $db_txtadnum) {
			$tmpCount = 0;print <<<EOT
-->
		</tr>
<!--
EOT;
		}
	}
	if($tmpCount && $tmpCount<$db_txtadnum){
		for ($i=$tmpCount;$i<$db_txtadnum;$i++) {print <<<EOT
-->
			<td width="$idp%">&nbsp;</td>
<!--
EOT;
		}print <<<EOT
-->
		</tr>
<!--
EOT;
	}print <<<EOT
-->
	</table>
</div>
<!--
EOT;
}print <<<EOT
-->
<!--ads end-->
<div id="breadCrumb" class="cc">
	<ul class="fr">
<!--
EOT;
if ($db_shiftstyle == 1) {
if($_COOKIE['widthCfg'] == 1){print <<<EOT
-->
    <li><a id="widthCfg" href="javascript:shiftStyle();" class="s2">[切换到窄版]</a></li>
<!--
EOT;
} else {print <<<EOT
-->
		<li><a id="widthCfg" href="javascript:shiftStyle();" class="s2">[切换到宽版]</a></li>
<!--
EOT;
}}print <<<EOT
-->
		<li><a href="searcher.php?sch_time=newatc">最新帖子</a></li>
		<li><a href="searcher.php?digest=1">精华区</a></li>
<!--
EOT;
if (!empty($shortcutforum)){print <<<EOT
-->
		<li id="id_shortcut" onClick="read.open('menu_shortcut',this.id,0,22);"><a href="javascript:;" class="link_down"><span>书签</span></a></li>
<!--
EOT;
}if ($skincount >1){print <<<EOT
-->
		<li id="td_skin"><a href="javascript:;"><img src="$imgpath/pwicon/style.gif" align="absmiddle" alt="论坛风格切换" /></a></li>
<!--
EOT;
}print<<<EOT
-->
    </ul>
	$msg_guide
</div>
<div id="pw_content">
<!--
EOT;
$tmpStyle = $_COOKIE['toggle']!=='0' ? 'f_tree cc' : 'f_tree cc sideClose';print <<<EOT
-->
	<div id="sidebar" class="$tmpStyle">
<!--
EOT;
$db_threadsidebarifopen && require_once(PrintEot('thread_side'));
print <<<EOT
-->
		<div class="content_thread cc">
    	<div class="content_ie">
<!--
EOT;
if ($cyid) {
	require_once PrintEot('thread_group');
} else {print <<<EOT
-->
				<div class="hB mb10">
					<span class="fr"><a href="rss.php?fid=$fid" target="_blank" class="rss mr10">订阅</a><a href="profile.php?action=permission&fid=$fid" class="competence mr10">权限</a></span>
					<h2 class="mr20 fl f14">{$foruminfo[name]}</h2>
					<span id="shortcut">
<!--
EOT;
if (strpos($winddb['shortcut'],','.$fid.',') !== false) {print <<<EOT
-->
						<a href="javascript:;" onclick="javascript:shortCut();" title="将本版块移除出我的书签" class="keepOn mr10">已收藏</a>
<!--
EOT;
} else {print <<<EOT
-->
						<a href="javascript:;" onclick="javascript:shortCut();" title="将本版块添加到我的书签" class="keep mr10">收藏</a>
<!--
EOT;
}if ($forumappinfo['thread']) {print <<<EOT
-->
						$forumappinfo[thread]
<!--
EOT;
}print <<<EOT
-->
					</span>
        </div>
        <div class="threadInfo mb10" style="overflow:hidden;">
        	<table width="100%">
						<tr class="vt">
							<td width="10">
<!--
EOT;
if($foruminfo['logo']){print <<<EOT
-->
								<img src="$foruminfo[logo]" style="padding:0 10px;" alt="forumlogo" />
<!--
EOT;
}print <<<EOT
-->
							</td>
							<td style="padding-right:10px;">
								<p class="s6 fr">
<!--
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
-->
								&nbsp;&nbsp;<a href="forumcp.php?action=edit&fid=$fid" class="s2">[&nbsp;版块管理&nbsp;]</a>
<!--
EOT;
}print <<<EOT
-->
								</p>
								<p class="mb5 s6 cc">今日: <span class="s2 mr20">$foruminfo[tpost]</span>主题: <span class="s2 mr20">$foruminfo[topic]</span>帖数: <span class="s2">$foruminfo[article]</span></p>
								<p class="s6" style="width:100%;">{$foruminfo[descrip]}</p>
							</td>
						</tr>
					</table>
        </div>
        <div class="sidePd10">
<!--
EOT;
$thread_children && require_once PrintEot($thread_children);
print <<<EOT
-->
				</div>
<!--
EOT;
if ($foruminfo['aid'] || is_array($foruminfo['commend']) || $foruminfo['cnifopen'] && $cnGroups) {print <<<EOT
-->
        <div class="sidePd10">
<!--
EOT;
if ($foruminfo['aid']) {
print <<<EOT
-->
					<div class="h cc">
						<em class="fl b">版块公告</em>
						<a class="fr closeicon" href="javascript:;" onClick="return IndexDeploy('ann',0);"><img alt="展开收起" id="img_ann" src="$imgpath/$stylepath/index/cate_$ann_img.gif" /></a>
					</div>
					<div id="cate_ann" style="$cate_ann">
						<table width="100%" style="table-layout:fixed;"><tr><td>
							<div class="p10">
								$foruminfo[content]
								<div class="tar"><a class="s4" href="notice.php?fid=$foruminfo[fid]#$foruminfo[aid]">更多</a></div>
							</div>
						</td></tr></table>
					</div>
<!--
EOT;
}if (is_array($foruminfo['commend'])) {print <<<EOT
-->
					<div class="h b cc">
					<a class="fr closeicon" href="javascript:;" onClick="return IndexDeploy('commend',0);"><img alt="展开收起" id="img_commend" src="$imgpath/$stylepath/index/cate_$thread_img.gif" /></a>
					版主推荐</div>
					<div class="pw_ulB" id="cate_commend">
					<ul class="cc menu_half" id="commend">
<!--
EOT;
foreach($foruminfo['commend'] as $key=>$value){print <<<EOT
-->
						<li onmouseover="show_del(this)" onmouseout="show_del(this)">
<!--
EOT;
if($admincheck){print <<<EOT
-->
							<del style="display:none;" onclick="comments_del(this.parentNode,{'fid':$fid,'tid':$value[tid]})" class="adel cp">删除</del>
<!--
EOT;
}
$tmpCommendSubject = substrs($value['subject'], 30);
print <<<EOT
-->
							<a href="read.php?tid=$value[tid]" class="mr10" title="$value[subject]" alt="$value[subject]">$tmpCommendSubject</a>
							<em><a href="{$db_userurl}$value[authorid]" class="s4">$value[author]</a></em>
						</li>
<!--
EOT;
}print <<<EOT
-->
                    </ul>
                </div>
<!--
EOT;
}
if ($foruminfo['cnifopen'] && $cnGroups) {
	require_once PrintEot('thread_colonys');
}print <<<EOT
-->
			</div>
<!--
EOT;
}}
$db_union[5] && $db_union[5] = str_replace(array('{f_fid}','{sch_time}'),array($fid,$_G[schtime]),$db_union[5]);
print <<<EOT
-->
    <div id="c">
		<div class="cc" style="padding:0 10px 10px;" id="tabA">
<!--
EOT;
if($N_allowtypeopen){print <<<EOT
-->
<a href="{$postUrl}" class="post fr" id="td_post">发帖</a>
<!--
EOT;
}print <<<EOT
-->
	<div style="padding-top:4px;">
		$pages$db_union[5]
		<form name="sF" action="searcher.php#submit" method="post" onsubmit="if(this.keyword.value=='版内搜索')this.keyword.value=''">
		<input type="hidden" value="2" name="step"/>
		<input type="hidden" value="AND" name="method"/>
		<input type="hidden" value="thread" name="type"/>
		<input type="hidden" value="$verifyhash" name="verify">
		<input type="hidden" value="1" name="sch_area"/>
		<input type="hidden" value="{$fid}" name="fid"/>
		<input type="hidden" value="all" name="sch_time"/>
		<div class="pages fl">
			<span class="pagesone">
				<input type="text" class="s6" style="width:90px;" name="keyword" onfocus="if(this.value=='版内搜索') this.value='';" onblur="if(this.value=='') this.value='版内搜索';" value="版内搜索" />
				<button name="submit" type="submit">搜索</button>
			</span>
		</div>
		</form>
	</div>
</div>
<!--
EOT;
if($N_allowtypeopen){print <<<EOT
-->
<div id="menu_post" class="pw_menu tac" style="display:none;">
	<ul class="menuList" style="width:70px;">
<!--
EOT;
if($foruminfo['allowtype'] & 1){print <<<EOT
-->
		<li><a href="post.php?fid=$fid" title="新帖" hidefocus="true">新帖</a></li>
<!--
EOT;
}if($foruminfo['allowtype'] & 2 && $_G[allownewvote]){print <<<EOT
-->
		<li><a href="post.php?fid=$fid&special=1" title="投票" hidefocus="true">投票</a></li>
<!--
EOT;
}if($foruminfo['allowtype'] & 4 && $_G[allowactive]){print <<<EOT
-->
		<li><a href="post.php?fid=$fid&special=2" title="活动" hidefocus="true">活动</a></li>
<!--
EOT;
}if($foruminfo['allowtype'] & 8 && $_G['allowreward']){print<<<EOT
-->
		<li><a href="post.php?fid=$fid&special=3" title="悬赏" hidefocus="true">悬赏</a></li>
<!--
EOT;
}if($foruminfo['allowtype'] & 16 && $_G['allowgoods']){print <<<EOT
-->
		<li><a href="post.php?fid=$fid&special=4" title="商品" hidefocus="true">商品</a></li>
<!--
EOT;
}if($foruminfo['allowtype'] & 32 && $_G['allowdebate']){print <<<EOT
-->
		<li><a href="post.php?fid=$fid&special=5" title="辩论" hidefocus="true">辩论</a></li>
<!--
EOT;
}
if($_G['allowmodelid']){
foreach($modelids as $value){
if(isset($postTopic->topicmodeldb[$value]) && $postTopic->topicmodeldb[$value][ifable] && $postTopic->topiccatedb[$postTopic->topicmodeldb[$value][cateid]][ifable]){
print <<<EOT
-->
		<li><a href="post.php?fid=$fid&modelid=$value" hidefocus="true">{$postTopic->topicmodeldb[$value][name]}</a></li>
<!--
EOT;
}}}
foreach($pcids as $value){
if(isset($postCate->postcatedb[$value]) && $postCate->postcatedb[$value][ifable]){
if(strpos(','.$_G['allowpcid'].',',','.$value.',') !== false){
print <<<EOT
-->
		<li><a href="post.php?fid=$fid&pcid=$value" hidefocus="true">{$postCate->postcatedb[$value][name]}</a></li>
<!--
EOT;
}}}
if($_G['allowactivity'] && $firstactmid){
print <<<EOT
-->
	<a href="post.php?fid=$fid&actmid=$firstactmid" hidefocus="true">活动</a>
<!--
EOT;
}print <<<EOT
-->
	</ul>
</div>
<!--
EOT;
}print <<<EOT
-->
<div class="sidePd10">
<div class="tabA">
<!--
EOT;
if(empty($colony)){print <<<EOT
-->
	<ul class="cc">
<!--
EOT;
$pwSelectSpecial = $pwSelectSpecial ? $pwSelectSpecial : 'all';
${'tmpStyle_' . $pwSelectSpecial} = 'class="current"';
print <<<EOT
-->
        <li $tmpStyle_all><a href="thread.php?fid=$fid&search=all#tabA">全部</a></li>
				<li $tmpStyle_digest id="thread_type_digest"><a href="thread.php?{$viewcolony}{$viewbbs}&search=digest#tabA">精华</a></li>
<!--
EOT;
if($foruminfo['allowtype'] & 2){print <<<EOT
-->
        <li $tmpStyle_1><a href="thread.php?fid=$fid&special=1#tabA">投票</a></li>
<!--
EOT;
}if($foruminfo['allowtype'] & 4){print <<<EOT
-->
        <li $tmpStyle_2><a href="thread.php?fid=$fid&special=2#tabA">活动</a></li>
<!--
EOT;
}if($foruminfo['allowtype'] & 8){print<<<EOT
-->
        <li $tmpStyle_3><a href="thread.php?fid=$fid&special=3#tabA">悬赏</a></li>
<!--
EOT;
}if($foruminfo['allowtype'] & 16){print <<<EOT
-->
        <!--<li $tmpStyle_4><a href="thread.php?fid=$fid&special=4#tabA">商品</a></li>-->
<!--
EOT;
}if($foruminfo['allowtype'] & 32){print <<<EOT
-->
        <li $tmpStyle_5><a href="thread.php?fid=$fid&special=5#tabA">辩论</a></li>
<!--
EOT;
}if(count($actmids)){print <<<EOT
-->
        <li $tmpStyle_allactmid><a href="thread.php?fid=$fid&allactmid=1#tabA" id="td_activitylist">活动</a></li>
<!--
EOT;
}if(count($pcids)){print <<<EOT
-->
        <li $tmpStyle_allpcid><a href="thread.php?fid=$fid&allpcid=1#tabA">团购</a></li>
<!--
EOT;
}if(count($modelids)){print <<<EOT
-->
        <li $tmpStyle_allmodelid ><a href="thread.php?fid=$fid&allmodelid=1#tabA" id="td_activitylist">分类信息</a></li>
<!--
EOT;
}if ($forumset['iftucool']) {print <<<EOT
-->
		<li $tmpStyle_img><a href="thread.php?fid=$fid&search=img#tabA">图酷帖</a></li>
<!--
EOT;
}print <<<EOT
-->
    </ul>
<!--
EOT;
}print <<<EOT
-->
</div>
<div id="ajaxtable">
<!--
EOT;
if ($search != 'img') {print <<<EOT
-->
<div class="pw_ulA">
<!--
EOT;
foreach($t_childtypedb as $key => $child){print<<<EOT
-->
<div id="thread_typechild_$key" class="pw_menu" style="display:none;">
		 <ul class="menuList">
<!--
EOT;
foreach($child as $k => $value){
$childtypename = html_entity_decode($value);
$childtypename = substrs($childtypename,10);
print<<<EOT
--><li><a href="thread.php?{$viewcolony}{$viewbbs}{$urlall}&type=$k#tabA">$childtypename</a></li><!--
EOT;
}print <<<EOT
-->
		 </ul>
</div>
<!--
EOT;
}print <<<EOT
-->
<ul class="cc" style="display:none;" id="id_allpcid">
<!--
EOT;
foreach($pcids as $value){
if(isset($postCate->postcatedb[$value]) && $postCate->postcatedb[$value][ifable]){
print <<<EOT
-->
<li id="thread_type_pcid_$value"><a href="thread.php?fid=$fid&pcid=$value#tabA">{$postCate->postcatedb[$value][name]}</a></li>

<!--
EOT;
}}print<<<EOT
-->
</ul>
<ul class="cc" style="display:none;" id="id_allactmid">
<!--
EOT;
foreach($actmids as $value){
if(isset($postActForBbs->activitymodeldb[$value]) && $postActForBbs->activitymodeldb[$value][ifable] && $postActForBbs->activitycatedb[$postActForBbs->activitymodeldb[$value][actid]][ifable]){
print<<<EOT
-->
	<li id="thread_type_actmid_$value" ><a href="thread.php?fid=$fid&actmid=$value#tabA">{$postActForBbs->activitymodeldb[$value][name]}</a></li>
<!--
EOT;
}}
print<<<EOT
-->
</ul>
<ul class="cc" style="display:none;" id="id_allmodelid">
<!--
EOT;
foreach($modelids as $value){
if(isset($postTopic->topicmodeldb[$value]) && $postTopic->topicmodeldb[$value][ifable] && $postTopic->topiccatedb[$postTopic->topicmodeldb[$value][cateid]][ifable]){
print<<<EOT
-->		
 <li id="thread_type_model_$value"><a href="thread.php?fid=$fid&modelid=$value#tabA">{$postTopic->topicmodeldb[$value][name]}</a></li>
<!--
EOT;
}}print<<<EOT
-->
</ul>
<ul class="cc" id="id_all">
 <li id="thread_type_all"><a href="thread.php?{$viewcolony}{$viewbbs}{$urlall}#tabA">全部</a></li><!--
EOT;
$i = 1;
if($groupid!='guest' && $foruminfo['f_check']){$i++;print <<<EOT
--><li id="thread_type_check"><a href="thread.php?fid=$fid{$viewbbs}&search=check#tabA">未验证主题</a></li><!--
EOT;
}
if(!$theSpecialFlag){
foreach($withSystemType as $key=>$value){
$i++;
$ctypename = html_entity_decode($value[name]);
print <<<EOT
--><li id="thread_type_$key"><a href="thread.php?{$viewcolony}{$viewbbs}{$urladd}&type=$key#tabA">{$ctypename}<!--
EOT;
if($t_childtypedb[$value[id]]){print<<<EOT
--><span class="f10">▼</span><!--
EOT;
}print<<<EOT
--></a></li><!--
EOT;
}}print <<<EOT
-->
</ul>
</div>
<!--
EOT;
}print <<<EOT
-->
<div class="z threadCommon">
<!--
EOT;
if ($theSpecialFlag){
print<<<EOT
-->
<style type="text/css">
.cateTable{margin:0;padding:0;}
.cateTable table{width:100%;}
.cateTable th{width:100px;}
.cateTable th,.cateTable td{padding:5px 10px;border-bottom:1px dotted $tdcolor;}
.cateTable tr{}
.cateTable .input{width:100px;}
.cateTable .btn2{margin:0;}
</style>
<div class="cateTable mb10">
	$initSearchHtml
</div>
<!--
EOT;
}print<<<EOT
-->
$trd_adminhide
<!--
EOT;
if ($modelid > 0 || $pcid > 0) {
	require_once PrintEot('thread_maincate');
} elseif ($actmid > 0) {
	require_once PrintEot('thread_mainactivity');
} elseif ($search == 'img' && $forumset['iftucool']) {
	require_once PrintEot('thread_maintucool');
} else {
	require_once PrintEot('thread_maincommon');
}print<<<EOT
-->
</div>
<!--
EOT;
if($managecheck && $search != 'img'){print <<<EOT
-->
<div class="manageCheck cc pr">
	<label for="pw_sel_all" class="fl mr5"><input name="chkall" id="pw_sel_all" autocomplete="off" type="checkbox" onclick="postManage.checkall(this)" />&nbsp;全选</label>
<!--
EOT;
if ($colony) {
if($newColony->right['topicadmin']['toptopic'] && $ifcolonyadmin || $ifbbsadmin || $pwSystem['forumcolonyright']) {print<<<EOT
-->
	<a href="javascript:;" onclick="submitAction(document.mawhole,'toptopic');return false;" class="bta fl">置顶</a>
<!--
EOT;
}if($newColony->right['topicadmin']['digest'] && $ifcolonyadmin || $ifbbsadmin || $pwSystem['forumcolonyright']){print<<<EOT
-->
	<a href="javascript:;" onclick="submitAction(document.mawhole,'digest');return false;" class="bta fl">精华</a>
<!--
EOT;
}if($newColony->right['topicadmin']['lock'] && $ifcolonyadmin || $ifbbsadmin || $pwSystem['forumcolonyright']){print<<<EOT
-->
	<a href="javascript:;" onclick="submitAction(document.mawhole,'lock');return false;" class="bta fl">锁定</a>
<!--
EOT;
}if($newColony->right['topicadmin']['pushtopic'] && $ifcolonyadmin || $ifbbsadmin || $pwSystem['forumcolonyright']){print<<<EOT
-->
	<a href="javascript:;" onclick="submitAction(document.mawhole,'pushtopic');return false;" class="bta fl">提前</a>
<!--
EOT;
}if($newColony->right['topicadmin']['downtopic'] && $ifcolonyadmin || $ifbbsadmin || $pwSystem['forumcolonyright']){print<<<EOT
-->
	<a href="javascript:;" onclick="submitAction(document.mawhole,'downtopic');return false;" class="bta fl">压帖</a>
<!--
EOT;
}if($newColony->right['topicadmin']['highlight'] && $ifcolonyadmin || $ifbbsadmin || $pwSystem['forumcolonyright']){print<<<EOT
-->
	<a href="javascript:;" onclick="submitAction(document.mawhole,'highlight');return false;" class="bta fl">加亮</a>
<!--
EOT;
}if($ifcolonyadmin || $ifbbsadmin || $pwSystem['forumcolonyright']){print<<<EOT
-->
	<a href="javascript:;" onclick="submitAction(document.mawhole,'type');return false;" class="bta fl">修改主题分类</a>
<!--
EOT;
}if($newColony->right['topicadmin']['del'] && $ifcolonyadmin || $ifbbsadmin || $pwSystem['forumcolonyright']){print<<<EOT
-->
	<a href="javascript:;" onclick="submitAction(document.mawhole,'del');return false;" class="bta fl">删除</a>
<!--
EOT;
}}else{
if($foruminfo['f_check'] && $search=='check' && ($isGM || $pwSystem['tpccheck'])){print <<<EOT
-->
    <a href="javascript:;" onclick="submitAction(document.mawhole,'check');return false;" class="bta fl">验证主题</a>
<!--
EOT;
}if($isGM || $pwSystem[topped]){print <<<EOT
-->
    <a href="javascript:;" onclick="submitAction(document.mawhole,'headtopic');return false;" class="bta fl">置顶</a>
<!--
EOT;
}if($isGM || $pwSystem['digestadmin']){print <<<EOT
-->
    <a href="javascript:;" onclick="submitAction(document.mawhole,'digest');return false;" class="bta fl">精华</a>
<!--
EOT;
}if($isGM || $pwSystem['lockadmin']){print <<<EOT
-->
    <a href="javascript:;" onclick="submitAction(document.mawhole,'lock');return false;" class="bta fl">锁定</a>
<!--
EOT;
}if($isGM || $pwSystem['pushadmin']){print <<<EOT
-->
    <a href="javascript:;" onclick="submitAction(document.mawhole,'pushtopic');return false;" class="bta fl">提前</a>
<!--
EOT;
}if($isGM || $pwSystem['downadmin']){print <<<EOT
-->
    <a href="javascript:;" onclick="submitAction(document.mawhole,'downtopic');return false;" class="bta fl">压帖</a>
<!--
EOT;
}if($isGM || $pwSystem['coloradmin']){print <<<EOT
-->
    <a href="javascript:;" onclick="submitAction(document.mawhole,'edit');return false;" class="bta fl">加亮</a>
<!--
EOT;
}if($isGM || $pwSystem[tpctype]){print <<<EOT
-->
    <a href="javascript:;" onclick="submitAction(document.mawhole,'type');return false;" class="bta fl">修改主题分类</a>
<!--
EOT;
}if($isGM || $pwSystem[moveatc]){print <<<EOT
-->
    <a href="javascript:;" onclick="submitAction(document.mawhole,'move');return false;" class="bta fl">移动</a>
<!--
EOT;
}if($isGM || $pwSystem[copyatc]){print <<<EOT
-->
    <a href="javascript:;" onclick="submitAction(document.mawhole,'copy');return false;" class="bta fl">复制</a>
<!--
EOT;
}if($isGM || $pwSystem[unite]){print <<<EOT
-->
    <a href="javascript:;" onclick="submitAction(document.mawhole,'unite');return false;" class="bta fl">合并</a>
<!--
EOT;
}if($isGM || $pwSystem[delatc]){print <<<EOT
-->
   <a href="javascript:;" onclick="submitAction(document.mawhole,'del');return false;" class="bta fl">删除</a>
<!--
EOT;
}if($isGM || ($pwSystem['banuser'] == 1 && $isBM) || $pwSystem['banuser'] == 2){print <<<EOT
-->
   <a href="javascript:;" onclick="submitAction(document.mawhole,'banuser');return false;" class="bta fl">禁言</a>
<!--
EOT;
}if($admincheck && $forumset['commend']){print <<<EOT
-->
	<a href="javascript:;" onclick="submitAction(document.mawhole,'commend');return false;" class="bta fl">版主推荐</a>
<!--
EOT;
}if($forumset['overprint'] && ($isGM || $pwSystem['overprint'] )){print <<<EOT
-->
	<a href="javascript:;" onclick="submitAction(document.mawhole,'multioverprint');return false;" class="bta fl">印戳</a>
<!--
EOT;
}}
print <<<EOT
-->
	</div>
    <input type="hidden" name="action" value="" />
</form>
<script language="JavaScript" src="js/global.js"></script>
<script type="text/javascript">
function submitAction(aForm,action){
	//var tidarray = aForm['tidarray[]'];
	var tidarray = aForm.getElementsByTagName("input");
	var flag = false;
	for (i = 0; i < tidarray.length; i++) {
		if (tidarray[i].type == 'checkbox' && tidarray[i].name == 'tidarray[]' && tidarray[i].checked) {
			flag = true;
			break;
		}
	}
	if (!flag){
		showDialog({message:'请选择要操作的项！',autoHide:2});return false;
	}
	aForm.action.value = action;
	aForm.submit();
}
</script>
<!--
EOT;
}print <<<EOT
-->
</div>
</div>
<div class="cc p10">
<!--
EOT;
if($N_allowtypeopen){print <<<EOT
-->
<a href="$postUrl" class="post fr" id="td_post1">发帖</a>
<!--
EOT;
}print <<<EOT
-->
<div class="fl" style="padding-top:4px;">$pages</div>
</div>
<div class="sidePd10">
<div class="fastpost">
<!--
EOT;
$db_threadonline==1 && require_once PrintEot('thread_online');
($fastpost && $search != 'img') && require_once PrintEot($fastpost);
print <<<EOT
-->
</div>
</div>
<!--
EOT;
$jsforumtitle = addslashes($foruminfo['name']);
print <<<EOT
-->
<script language="JavaScript">
var fid = '$fid';
var forumtitle = "$jsforumtitle";
var imgok = "keep mr10";
var imgno = "keepOn mr10";
var myshortcut = $myshortcut;
function Fjump(value){
	if(value!=''){
		window.location=('$B_url/thread.php?fid='+value);
	}
}
function Ajump(value){
	if(value!= ''){
		window.location=('$B_url/u.php?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 = '{$pageUrl}&search={$search}&{$w_add}{$typeadd}page=' + (page+1);
		}
		if(actualCode == 37 && page>1){
			window.location = '{$pageUrl}&search={$search}&{$w_add}{$typeadd}page=' + (page-1);
		}
	}
}
function unshortCut(fid){
	ajax.send('pw_ajax.php?action=shortcut&type=delete&fid='+fid,'',function(){
		var short = getObj("shortcut_side_"+fid);
		short.parentNode.removeChild(short);
		ajax.guide();
	});
}
function shortCut() {
	ajax.send('pw_ajax.php?action=shortcut&fid='+fid,'',function(){
		ajax.guide();
		var rText = ajax.request.responseText.split('\t');
		try {
			if (typeof(rText[1]) != 'undefined' && rText[1] == 'successok') {
				getObj('shortcut').innerHTML = "<a href=\"javascript:;\" onclick=\"javascript:shortCut();\" title=\"将本版块移除出我的书签\" class=\"keepOn mr10\">已收藏</a>";
				var shortcutforum = getObj('shortcutforum');
				var forumBooks = getObj('forumBooks');
				if (myshortcut == false) {
					var shortcutname = getObj('shortcutname');
					shortcutname.innerHTML = "收藏的版块:&nbsp;";
					shortcutforum.innerHTML = "<li id=\"scf_"+fid+"\"><del onclick=\"unshortCut("+fid+");\">删除</del><a href=\"thread.php?fid="+fid+"\">"+forumtitle+"</a>&nbsp;</li>";
					forumBooks.innerHTML = "<li><a href=\"thread.php?fid="+fid+"\">"+forumtitle+"</a>&nbsp;</li>";
				} else {
					if (IsElement('shortcutforum')) {
						var li = document.createElement('li');
						li.id = 'shortcut_side_'+fid;
						li.innerHTML = '<del onclick=\"unshortCut('+fid+');\">删除</del><a href=\"thread.php?fid='+fid+'\">'+forumtitle+'</a>&nbsp;';
						shortcutforum.appendChild(li);
					}
					if (IsElement('forumBooks')) {
						var li = document.createElement('li');
						li.innerHTML = '<a href=\"thread.php?fid='+fid+'\">'+forumtitle+'</a>';
						forumBooks.appendChild(li);
					}
				}
	
			} else if (typeof(rText[1]) != 'undefined' && rText[1] == 'successno') {
				getObj('shortcut').innerHTML = "<a href=\"javascript:;\" onclick=\"javascript:shortCut();\" title=\"将本版块添加到我的书签\" class=\"keep mr10\">收藏</a>";
				if (IsElement('shortcut_side_'+fid)) {
					var thisnode = getObj('shortcut_side_'+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;
				}
			}
		}catch(e){}
	});
}
(function(){
        var isReady=false;
        var readyList= [];
        var timer;
        ready=function(fn) {
                if (isReady )
                        fn.call( document);
                else
                        readyList.push( function() { return fn.call(this);});
                return this;
        }
        var onDOMReady=function(){
                for(var i=0;i<readyList.length;i++){
                        readyList[i].apply(document);
                }
                readyList = null;
        }
        var bindReady = function(evt){
                if(isReady) return;
                isReady=true;
                onDOMReady.call(window);
                if(document.removeEventListener){
                        document.removeEventListener("DOMContentLoaded", bindReady, false);
                }else if(document.attachEvent){
                        document.detachEvent("onreadystatechange", bindReady);
                        if(window == window.top){
                                clearInterval(timer);
                                timer = null;
                        }
                }
        };
        if(document.addEventListener){
                document.addEventListener("DOMContentLoaded", bindReady, false);
        }else if(document.attachEvent){
                document.attachEvent("onreadystatechange", function(){
                        if((/loaded|complete/).test(document.readyState))
                                bindReady();
                });
                if(window == window.top){
                        timer = setInterval(function(){
                                try{
                                        isReady||document.documentElement.doScroll('left');//在IE下用能否执行doScroll判断dom是否加载完毕
                                }catch(e){
                                        return;
                                }
                                bindReady();
                        },5);
                }
        }
})();
function showThreadUl(){
	var arrayType = Array('allmodelid','allpcid','allactmid','all');
	for (var i=0;i<4;i++) {
		if ('$pwSelectSpecial'!=arrayType[i] && getObj('id_'+arrayType[i])) {
			getObj('id_'+arrayType[i]).style.display='none';
		}
	}
	if (getObj('id_$pwSelectSpecial') != undefined ) {
		getObj('id_$pwSelectSpecial').style.display='';
	}else{
		if (getObj('id_all')) {
			getObj('id_all').style.display='';
		}
	}
}
ready(showThreadUl);
</script>
<!--
EOT;
if($ajaxcheck){print <<<EOT
-->
<script type="text/javascript" src="js/ajax_subject.js"></script>
<!--
EOT;
}
if($foruminfo[aid] || is_array($foruminfo['commend']) || $thread_children){print <<<EOT
-->
<script language="JavaScript" src="js/Deploy.js"></script>
<!--
EOT;
}print<<<EOT
-->
<script language="JavaScript">
setCurrent('thread_type_$pwSelectType','thread_type_all','current');
/*显示or隐藏版主推荐的帖子的删除功能*/
function show_del(o){
	var d = o.getElementsByTagName('del');
	if (d.length > 0) {
		d[0].style.display = (d[0].style.display == 'none') ? '' : 'none';
	}
}
/*发送请求删除版主推荐的帖子，请求成功后，删除节点*/
function comments_del(o,params){
	ajax.send('pw_ajax.php?action=commend&fid='+params.fid+'&tid='+params.tid,'',function(){
		var rText = eval('('+ajax.request.responseText+')');
		if(true == rText.success){
			o.parentNode.removeChild(o);
		}
	});
}
</script>
</div></div></div>
</div>
<!--
EOT;
if((!$db_toolbar || $_COOKIE['toolbarhide'] || $groupid == 'guest') && $pwForumList){print <<<EOT
-->
<div id="menu_forumlist" style="display:none;">
	<div class="sbar-box-a" style="width:700px;">
		<div class="sbar-title" style="cursor:pointer" onclick="try{pw_bottom.hiddenTab();read.close();}catch(e){read.close();}">
				<span class="adel">隐藏</span>
				<span id="title_forumlist" class="b">快速跳转</span>
		</div>
		<div class="sbar-box-b">
			<div class="forum-list-popout">
<!--
EOT;
foreach ($pwForumList as $key => $value) {
	if (isset($value['child']) && is_array($value['child']) && count($value['child'])) {
print <<<EOT
-->
			<dl class="cc">
				<dt>
<!--
EOT;
		if ($GLOBALS['m']) {print<<<EOT
-->
				<a href="index.php?cateid=$key" target="_blank">$value[name]</a>
<!--
EOT;
		} else {print<<<EOT
-->
				<a href="index.php?cateid=$key">$value[name]</a>
<!--
EOT;
		}print<<<EOT
-->
				</dt>
				<dd class="cc">
<!--
EOT;
		foreach ($value['child'] as $k=>$v) {
			if ($GLOBALS['m']) {print <<<EOT
-->
					<a href="thread.php?fid=$k" target="_blank" onclick="return pwForumList(true,gIsPost,$k,'',true);"><span>$v</span></a>
<!--
EOT;
			} else {print<<<EOT
-->
					<a href="thread.php?fid=$k" onclick="return pwForumList(true,gIsPost,$k);"><span>$v</span></a>
<!--
EOT;
			}
		}print <<<EOT
-->
				</dd>
			</dl>
<!--
EOT;
	}
}
print <<<EOT
-->
			</div>
		</div>
	</div>
</div>
<!--
EOT;
}print <<<EOT
-->
</div>
<!--
EOT;
?>-->
