<!--<?php
print <<<EOT
-->
<style type="text/css">
.sigline {margin-top:10px;margin-left:15px;background: url($imgpath/$stylepath/read/sigline.gif) right bottom no-repeat;margin-right:30em;height:5px;}
.signature {padding:10px 15px 0;height:expression(this.scrollHeight>parseInt(this.currentStyle.maxHeight)?this.currentStyle.maxHeight:"auto");}
.user-pic img {border: 1px solid $tdcolor;background:#fff;padding:3px;}
.small {font-size:12px}
.middle {font-size:14px}
.big {font-size:18px}
.dig{font-size:12px;background-color:#ffffee; background-position:-22px -57px;padding:0 .4em 0 1.6em;cursor: pointer;color:#666;border:1px solid #ffd0a8;height:18px;line-height:18px;margin:12px 5px 10px 15px;}
.dig:hover {text-decoration:none;border:1px solid #f5a25c;color:#ff6600;}
.readbot {padding:0px;}
.readbot a{list-style:none;padding:0 0 0 1.5em;margin:0;float:left;cursor:pointer;background:url($imgpath/$stylepath/read/yin.gif) no-repeat;width:3.5em;height:16px;}
.readbot .r-quote:hover{background-position:0 0;}
.readbot .r-reply:hover {background-position:0 -20px;}
.readbot .r-score:hover {background-position:0 -40px;}
.readbot .r-keep:hover {background-position:0 -60px;}
.readbot .r-recommend:hover {background-position:0 -160px;}
.readbot .r-report:hover{background-position:0 -200px;}
.readbot .r-quote {background-position:0 -80px;}
.readbot .r-reply {background-position:0 -100px;}
.readbot .r-score {background-position:0 -120px;}
.readbot .r-keep {background-position:0 -140px;}
.readbot .r-recommend {background-position:0 -180px;}
.readbot .r-report {background-position:0 -220px;}
.down {background:url($imgpath/post/down.gif) 5px center no-repeat;padding:5px 5px 5px 30px;border:$cbgborder 1px solid;margin:0 1em 0 0;line-height:40px;}
.img-50{width:48px;height:48px;}

/*分类信息*/
.cates{margin:0 0 10px;}
.cates .cate-list li{padding:2px 0 1px 10px;font-weight:500;color:#444444; list-style:none;}
.cates .cate-list em{ font-style:normal;width:100px;float:left;}
.cates .cate-list cite{font-style:normal;}
.cates input{ vertical-align:middle;}
.cates .w{margin-right:10px;}
.cates .two{background:$forumcolortwo;}
.app-post{background:url($imgpath/app-post.png);display:block;float:left;color:#ffffff;width:78px;height:26px;line-height:25px;padding-left:17px; }
.app-post:hover{ text-decoration:none; background-position:0 -50px;}
.cate_meg_player {float:right;width:200px;padding:0 10px 9px 0;margin-right:10px;background:#fff;}
/*flash*/
.flash{position:relative;}
.flash img{height:100%;width:100%;}
.flash ul {position:absolute;right:8px;bottom:8px;z-index:3;}
.flash ul li {list-style:none;float:left;width:18px;height:13px;line-height:13px;text-align:center;margin-left:2px;background:#ffffff;}
.flash ul li a {display:block;width:18px;height:13px;font-size:10px;font-family:Tahoma;color:#333333;}
.flash ul li a:hover,.flash ul li a.sel {color:#fff;text-decoration:none;background:#ffa900;}

/*ping*/
.score{margin:10px 15px;padding-top:10px;border-top:1px dashed $tdcolor;line-height:22px;}
.score td{padding:2px 10px 2px 5px;}
.score th{padding:6px 0 0;}
.score tr:hover{background:$forumcolortwo;}
.score a{color:#3366cc;}
/*overprint*/
.overprint_opl a{display:block;float:left;padding:3px;margin:3px}
.overprint_opl a.current{border:1px solid #ccc;padding:2px}
.overprint_opl a:hover{border:1px solid #ddd;padding:2px;background:#fff9f0}
.overprint_opl {height:200px;overflow:auto;}

.tipad .fr a{padding:0 0 0 6px;}
</style>
<!--
EOT;
if(!$db_toolbar || $_COOKIE['toolbarhide'] || $groupid == 'guest'){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="menu-hidden aimg">隐藏</span>
				<span id="title_forumlist" class="b">快速浏览</span>
		</div>
		<div class="sbar-box-b">
			<div class="forum-list-popout">
<!--
EOT;
if ($GLOBALS['pwForumList']) {
	$pwForumList = $GLOBALS['pwForumList'];
} else {
	$pwForumList = array();
	include(D_P.'data/bbscache/forumlist_cache.php');
	if ($pwForumAllList && $GLOBALS['groupid'] == 3) {
		$pwForumList = array_merge($pwForumList,$pwForumAllList);
	}
}
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 id="breadCrumb"> $msg_guide <a href="rss.php?tid=$tid" target="_blank" title="Rss订阅本帖最新内容"><img src="$imgpath/$stylepath/rss.png" align="absbottom" style="margin-bottom:2px;" /></a>
<!--
EOT;
if($forumappinfo[read]){
print <<<EOT
-->
$forumappinfo[read]
<!--
EOT;
}print <<<EOT
-->
</div>
<div class="c"></div>
<!--ads begin-->
<!--
EOT;
list($htmlAdvert,$arrayAdvert) = pwAdvert('Mode.Forum.TextRead',$fid);
if($htmlAdvert){print <<<EOT
-->
<div class="ad-text">
	<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="f_one black tac" width="$idp%">$value</td>
<!--
EOT;
	if($tmpCount==$db_txtadnum){
		$tmpCount=0;
print <<<EOT
-->
		</tr>
<!--
EOT;
	}
}
if($tmpCount && $id<$db_txtadnum){
	for($i=$tmpCount;$i<$db_txtadnum;$i++){
print <<<EOT
-->
			<td class="f_one" width="$idp%">&nbsp;</td>
<!--
EOT;
	}
print <<<EOT
-->
		</tr>
<!--
EOT;
}
print <<<EOT
-->
	</table>
</div>
<!--
EOT;
}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="t3 cc">
<!--
EOT;
if($N_allowtypeopen || $N_allowtopicopen || $N_allowpostcateopen){print <<<EOT
-->
	<span class="fr" style="margin-left:.5em"><a href="post.php?fid=$fid" title="发表新帖"><img src="$imgpath/$stylepath/post.png" id="td_post" /></a></span>
<!--
EOT;
}print <<<EOT
-->
	<span class="fr"><a href="post.php?action=reply&fid=$fid&tid=$tid"><img src="$imgpath/$stylepath/reply.png" /></a></span>
	<div style="padding-top:8px;"><span class="pages"><a href="job.php?action=previous&fid=$fid&tid=$tid&fpage=$fpage&goto=previous">上一主题</a><a href="job.php?action=previous&fid=$fid&tid=$tid&fpage=$fpage&goto=next" class="fn">下一主题</a></span> <span class="fl">$pages$db_union[5]</span></div>
</div>
<!--
EOT;
if($N_allowtypeopen || $N_allowtopicopen || $N_allowpostcateopen){print <<<EOT
-->
<div id="menu_post" class="menu menu-post cc f14 tac" style="display:none;">
	<div class="menu-b" style="width:100px;">
<!--
EOT;
if($foruminfo['allowtype'] & 1){print <<<EOT
-->
		<a href="post.php?fid=$fid" hidefocus="true">新  帖</a>
<!--
EOT;
}if($foruminfo['allowtype'] & 2 && $_G['allownewvote']){print <<<EOT
-->
		<a href="post.php?fid=$fid&special=1" hidefocus="true">投  票</a>
<!--
EOT;
}if($foruminfo['allowtype'] & 4 && $_G['allowactive']){print <<<EOT
-->
		<a href="post.php?fid=$fid&special=2" hidefocus="true">活  动</a>
<!--
EOT;
}if($foruminfo['allowtype'] & 8 && $_G['allowreward']){print<<<EOT
-->
		<a href="post.php?fid=$fid&special=3" hidefocus="true">悬  赏</a>
<!--
EOT;
}if($foruminfo['allowtype'] & 16 && $_G['allowgoods']){print <<<EOT
-->
		<a href="post.php?fid=$fid&special=4" hidefocus="true">商  品</a>
<!--
EOT;
}if($foruminfo['allowtype'] & 32 && $_G['allowdebate']){print <<<EOT
-->
		<a href="post.php?fid=$fid&special=5" hidefocus="true">辩  论</a>
<!--
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
-->
	<a href="post.php?fid=$fid&modelid=$value" hidefocus="true">{$postTopic->topicmodeldb[$value][name]}</a>
<!--
EOT;
}}}
foreach($pcids as $value){
if(isset($postCate->postcatedb[$value]) && $postCate->postcatedb[$value][ifable] && strpos(','.$_G['allowpcid'].',',','.$value.',') !== false){
print <<<EOT
-->
	<a href="post.php?fid=$fid&pcid=$value" hidefocus="true">{$postCate->postcatedb[$value][name]}</a>
<!--
EOT;
}}print <<<EOT
-->
	</div>
</div>
<!--
EOT;
}if($modelid>0 || $pcid>0){print <<<EOT
-->
<style type="text/css">
.t-cate-s{border-top:1px solid $tdcolor;}
.pw_list_b{padding:5px 10px;line-height:25px;}
.pw_list_b a{color:#3366cc;float:left;white-space:nowrap;padding:0 10px;}
.pw_list_b .current{ font-weight:700;}
.t-cate-s .p10 span{float:left;margin:0 20px 10px 0;height:25px; white-space:nowrap;}
.t-cate-s .p10 input{ vertical-align:middle;}
.t-cate-s .p10 .btn{margin:0 5px;}
</style>
<div class="c" id="c"></div>
<div class="t-cate-s">
    <div class="pw_list_b cc t_two">
		<span class="fl">筛选：</span>
	    <a id="pc_all" href="thread.php?fid=$fid">全部</a>
<!--
EOT;
if($modelid > 0){
	$a = 'model_'.$modelid;
} elseif ($pcid > 0) {
	$a = 'pcid_'.$pcid;
}
if ($foruminfo['modelid']){
foreach($modelids as $value){
if(isset($postTopic->topicmodeldb[$value]) && $postTopic->topicmodeldb[$value][ifable] && $postTopic->topiccatedb[$postTopic->topicmodeldb[$value][cateid]][ifable]){
print<<<EOT
-->
		<a id="pc_model_$value" href="thread.php?fid=$fid&modelid=$value">{$postTopic->topicmodeldb[$value][name]}</a>
<!--
EOT;
}}}
if($foruminfo['pcid']){
foreach($pcids as $value){
if(isset($postCate->postcatedb[$value]) && $postCate->postcatedb[$value][ifable]){
print<<<EOT
-->
		<a id="pc_pcid_$value" href="thread.php?fid=$fid&pcid=$value">{$postCate->postcatedb[$value][name]}</a>
<!--
EOT;
}}}print <<<EOT
-->
<script language="JavaScript">
setCurrent('pc_$a','pc_all','current');
</script>
	</div>
<!--
EOT;
if($initSearchHtml){print <<<EOT
-->
	<div class="t_one t5" style="width:100%;">
		<div class="p10 cc">
			$initSearchHtml
		</div>
	</div>
<!--
EOT;
}print <<<EOT
-->
</div>
<!--
EOT;
}print <<<EOT
-->
<div class="t" style="margin-bottom:0;border-bottom:0;">
	<table cellspacing="0" cellpadding="0" width="100%">
		<tr>
			<td class="tal h" style="border-bottom:0;">
<!--
EOT;
if($threadright && ($threadright[post][admin] || in_array($groupid,$threadright[post][group]) || in_array($windid,$threadright[post][other]))){
print <<<EOT
-->
				<a id="pw_app" onclick="sendmsg('apps.php?ajax=1&q=blooming&tid=$tid','',this.id)" style="cursor:pointer" title="推送至应用中心">帖子交换</a> ┊&nbsp;
				<script language="JavaScript">
function openinfo(o){
	var s = getObj(o.id + 'info');
	if (s.style.display == ''){
		s.style.display = 'none';
		o.innerHTML = '更多分类';
		o.title = '显示';
	} else {
		s.style.display = '';
		o.innerHTML = '更多分类';
		o.title = '隐藏';
	}
}
</script>
<!--
EOT;
}if($managecheck){
if($isGM || $pwSystem['topped']){print <<<EOT
--><a id="headtopic" onclick="return sendurl(this,1)" href="mawhole.php?action=headtopic&fid=$fid&seltid=$tid" title="置顶帖子">置顶</a>
<!--
EOT;
}if($isGM || $pwSystem['digestadmin']){print <<<EOT
-->┊&nbsp;<a id="rdigest" onclick="return sendurl(this,1)" href="mawhole.php?action=digest&fid=$fid&seltid=$tid" title="精华帖子">精华</a>
<!--
EOT;
}if($isGM || $pwSystem['lockadmin']){print <<<EOT
-->┊&nbsp;<a id="lock" href="mawhole.php?action=lock&fid=$fid&seltid=$tid" onclick="return sendurl(this,1)" title="锁定帖子">锁定</a>
<!--
EOT;
}if($isGM || $pwSystem['pushadmin']){print <<<EOT
-->┊&nbsp;<a id="pushtopic" onclick="return sendurl(this,1)" href="mawhole.php?action=pushtopic&fid=$fid&seltid=$tid" title="提前">提前</a>
<!--
EOT;
}if($isGM || $pwSystem['downadmin']){print <<<EOT
-->┊&nbsp;<a id="downtopic" href="mawhole.php?action=downtopic&fid=$fid&seltid=$tid" onclick="return sendurl(this,1)" title="将帖子往后压">压帖</a>
<!--
EOT;
}if($isGM || $pwSystem['coloradmin']){print <<<EOT
-->┊&nbsp;<a id="edit" href="mawhole.php?action=edit&fid=$fid&seltid=$tid" onclick="return sendurl(this,1)" title="编辑标题颜色">加亮</a>
<!--
EOT;
}if($isGM || $pwSystem['moveatc']){print <<<EOT
-->┊&nbsp; <a id="move" onclick="return sendurl(this,1)" href="mawhole.php?action=move&fid=$fid&seltid=$tid" title="移动帖子">移动</a>
<!--
EOT;
}if($isGM || $pwSystem['copyatc']){print <<<EOT
-->┊&nbsp; <a id="copy" href="mawhole.php?action=copy&fid=$fid&seltid=$tid" onclick="return sendurl(this,1)" title="复制帖子">复制</a>
<!--
EOT;
}if($isGM || $pwSystem['unite']){print <<<EOT
-->┊&nbsp;<a id="unit" onclick="return sendurl(this,1)" href="mawhole.php?action=unite&fid=$fid&seltid=$tid" title="合并帖子">合并</a>
<!--
EOT;
}if($isGM || $pwSystem['delatc']){print <<<EOT
-->┊&nbsp;<a id="del" href="mawhole.php?action=del&fid=$fid&seltid=$tid" onclick="return sendurl(this,1)" title="删除帖子">删除</a>
<!--
EOT;
}if($ifcheck==0 && ($isGM || $pwSystem['tpccheck'])){print <<<EOT
-->┊&nbsp;<a onclick="ajax.send('masingle.php?ajax=1&action=check&fid=$fid&tid=$tid','',ajax.guide)" style="cursor:pointer" title="审核未验证主题">审核</a>
<!--
EOT;
}if(($pwSystem['areapush'] || $isGM) && (isset($db_modes['area']['ifopen']) && $db_modes['area']['ifopen'])){print <<<EOT
-->┊&nbsp;<a style="cursor:pointer" id="areapush" onclick="sendmsg('mode.php?m=area&q=push&action=pushto&fid=$fid&selid=$tid','',this.id)" title="推送自定义信息">推送</a>
<!--
EOT;
}if($admincheck && $forumset['commend']){print <<<EOT
-->┊&nbsp;<a onclick="ajax.send('masingle.php?ajax=1&action=commend&fid=$fid&tid=$tid','',ajax.guide)" style="cursor:pointer" title="加入到版主推荐列表">版主推荐</a>
<!--
EOT;
}if($forumset['overprint'] && ($isGM || $pwSystem['overprint'] )){print <<<EOT
-->┊&nbsp;<a id="overprint" onclick="return showOverPrint(this);"  href="javascript:;" url="mawhole.php?action=overprint&ajax=1&fid=$fid&seltid=$tid" title="印戳">印戳</a>
<!--
EOT;
}}else{print <<<EOT
-->
				主题 : $subject
<!--
EOT;
}print <<<EOT
--></td>
			<td class="tar h" style="border-bottom:0;"><div class="fr w">
<!--
EOT;
if(isset($db_hackdb['toolcenter']) && $db_toolifopen){print <<<EOT
-->
					<a id="usetool" style="cursor:pointer" onclick="sendmsg('pw_ajax.php?action=usetool','',this.id)" />使用道具</a>┊
<!--
EOT;
}print <<<EOT
-->
					<a style="cursor:pointer;" title="$db_bbsurl/read.php?fid=$fid&tid=$tid" onclick="copyUrl('');">复制链接</a>
<!--
EOT;
if($groupid!='guest' && isset($db_hackdb['blog'][2]) && $db_hackdb['blog'][2]){
include_once(D_P.'data/bbscache/bg_config.php');
if($bg_ifopen){print <<<EOT
-->
					┊<a href="$bg_blogurl/user_index.php?action=bbsatc&tid=$tid" title="推送到我的博客" target="_blank">推送到博客</a>
<!--
EOT;
}}print <<<EOT
-->
					┊<a class="fn" style="cursor:pointer;" onclick="Addtoie('$db_bbsurl/read.php?fid=$fid&tid=$tid','$db_bbsname_a--$favortitle');">浏览器收藏</a>┊<a class="fn" href="$db_bbsurl/simple/?t{$tid}.html">打印</a></div></td>
		</tr>
	</table>
</div>
<!--
EOT;
$special && require_once PrintEot($special);print<<<EOT
-->
<form name="delatc" method="post">
	<input type="hidden" name="fid" value="$fid" />
	<input type="hidden" name="tid" value="$tid" />
<!--
EOT;
foreach($readdb as $key=>$read){
if($read){
list($htmlAdvert,$arrayAdvert) = pwAdvert('Mode.Forum.Layer.TidAmong',$fid,$key);
if($htmlAdvert){print <<<EOT
-->
	<div style="margin-bottom:4px;" class="tac" id="ads_d_$read[pid]">{$htmlAdvert}</div>
<!--
EOT;
}
$style = $read[pid] == 'tpc' ? "style='border:1px solid $tablecolor;'" : '';print <<<EOT
-->
	$read[jupend]
	<div class="t5" $style>
		<table cellspacing="0" cellpadding="0" width="100%" style="table-layout:fixed;">
			<tr>
				<td style="width:185px;vertical-align:top;" rowspan="2" class="r_two">
				<div style="padding:8px 0 20px 8px;">
					<div class="cc" style="padding-bottom:3px;"><b class="fl black"><a href="u.php?action=show&uid=$read[authorid]" target="_blank">$read[author]</a></b>
<!--
EOT;
if($db_showonline){
if (checkOnline($read['thisvisit'])){print <<<EOT
-->
					<span class="card-online" title="在线">在线</span>
<!--
EOT;
}else{print<<<EOT
-->
					<span class="card-offline" title="离线">离线</span>
<!--
EOT;
}}print <<<EOT
-->
				</div>
<!--
EOT;
if($read['honor'] && $_G['allowhonor']){print <<<EOT
-->
					<div class="honor">$read[honor]</div>
<!--
EOT;
}print <<<EOT
-->
					<div class="user-pic">
						<table style="border:0;">
							<tr>
								<td width="1">
									<a href="u.php?action=show&uid=$read[authorid]" target="_blank" id="card_sf_{$read[pid]}_{$read[authorid]}" class="userCard">$read[face]</a>
								</td>
								<td width="1" style="vertical-align:top"><span id="sf_$read[pid]"></span></td>
							</tr>
						</table>
					</div>
					<div style="padding:5px 0 2px;">级别: {$read[level]}<br />
					<img src="$imgpath/$stylepath/level/$read[lpic].gif" style="margin:.2em 0 .2em 0;display:block"/> $read[medals]</div>
					<span class="user-info2">
						<span class="user-infoWrap2">
<!--
EOT;
if(!$db_readinfo){print<<<EOT
-->
							<a id="info_$read[lou]" onclick="showuserinfo('$read[lou]');" style="cursor:pointer; text-decoration:underline;">显示用户信息</a><span id="gif_$read[lou]" onclick="showuserinfo('$read[lou]');" style="cursor:pointer;">&nbsp;<img src="$imgpath/read_down.gif"></span>
<!--
EOT;
}print<<<EOT
-->
						</span>
					</span>
<!--
EOT;
if(!$db_readinfo){print<<<EOT
-->
					<span class="user-info2" id="showface_$read[lou]" style="display:none">
<!--
EOT;
}else{print<<<EOT
-->
					<span class="user-info2" id="showface_$read[lou]">
<!--
EOT;
}print<<<EOT
-->
						<span class="user-infoWrap2">
							<div class="c"></div>
							UID: <span class="f12">$read[authorid]</span><br />
							精华:
<!--
EOT;
if($read['digests']){print <<<EOT
-->
							<a href="search.php?authorid=$read[authorid]&digest=1" target="_blank" class="s4">$read[digests]</a>
<!--
EOT;
}else{print <<<EOT
-->
							<span class="s4">$read[digests]</span>
<!--
EOT;
}print <<<EOT
-->
							<br />
							发帖: <span class="s1 f12">$read[postnum]</span><br />
<!--
EOT;
$ccolor = 1;
foreach ($db_showcustom as $ctype) {
if (!$creditnames[$ctype]) continue;
$ccolor = ($ccolor > 3) ? 1 : $ccolor + 1;
$cvalue = is_numeric($ctype) ? $customdb[$read['authorid']][$ctype] : $read[$ctype];
!$cvalue && $cvalue = 0;
print <<<EOT
-->
							$creditnames[$ctype]: <span class="s{$ccolor} f12">$cvalue $creditunits[$ctype]</span><br />
<!--
EOT;
}if($customfield){
foreach($customfield as $k=>$val){
if($val['viewinread']){
if($val['viewright']&&$winduid!=$read['authorid']&&strpos(",$val[viewright],",",$groupid,")===false){
continue;
}$field="field_".(int)$val[id];
if($val[type]==3){
foreach(explode("\n",$val['options']) as $k=>$v){
list($k,$v)=explode('=',$v);
if($read[$field]==$k){
$read[$field]=$v;
}}}print <<<EOT
-->
							$val[title]: $read[$field]<br />
<!--
EOT;
}}}if($read['customdata']){
foreach($read['customdata'] as $k => $val){
if($custominfo[$k][2]){
$custominfo[$k][2]=str_replace("{{$k}}",$val,$custominfo[$k][2]);
$custominfo[$k][4] && $val=$custominfo[$k][4];
$val="<a href=\"{$custominfo[$k][2]}\" target=\"_blank\">$val</a>";
}print <<<EOT
-->
							{$custominfo[$k][0]}: $val<br />
<!--
EOT;
}}if($db_showcolony && $colonydb[$read[authorid]]){
$v=$colonydb[$read[authorid]];
print <<<EOT
-->
							群组: <a href="mode.php?m=o&q=group&cyid=$v[id]" target="_blank">$v[cname]</a><br />
<!--
EOT;
}if($db_ifonlinetime){print <<<EOT
-->
							在线时间: $read[ontime](时)<br />
<!--
EOT;
}print <<<EOT
-->
							注册时间: <span class="gray">{$read[regdate]}</span><br />
							最后登录: <span class="gray">{$read[lastlogin]}</span>
							</span>
						</span>
					</div>
				</td>
				<td height="100%" class="r_one" valign="top" id="td_$read[pid]" style="padding:0px;border:0;overflow:hidden"> <a name="post_$read[pid]"></a>
					<div style="overflow:hidden; position:absolute;margin-left:440px;margin-top:25px;" id="read_overprint">
<!--
EOT;
if($overprint && $read['pid'] == 'tpc'){
print <<<EOT
-->
					<img src="$overprint"/>
<!--
EOT;
}
print <<<EOT
-->
					</div>
					<div class="tiptop cc"><span class="fl">
<!--
EOT;
if($read['istop'] == 'topped'){
print <<<EOT
-->
						<a class="s3 b" style="cursor:pointer;" onclick="copyUrl('$read[pid]')" title="复制此楼地址">置顶</a>&nbsp; 来自<a href="$read[jumpurl]" class="s1">$read[floor]楼</a>&nbsp;
<!--
EOT;
} elseif (!empty($db_floorname[$read['lou']])){print <<<EOT
-->
						<a class="s3 b" style="cursor:pointer;" onclick="copyUrl('$read[pid]')" title="复制此楼地址">{$db_floorname[$read[lou]]}</a>&nbsp;
<!--
EOT;
} else { print<<<EOT
-->
						<a class="s3 b" style="cursor:pointer;" onclick="copyUrl('$read[pid]')" title="复制此楼地址">$read[lou]$db_floorunit</a>&nbsp;
<!--
EOT;
}print <<<EOT
-->
						</span>
						<span class="fl gray" title="$read[postdate]" style="white-space:nowrap;">发表于: $read[posttime]</span>
                        <span title="$read[ip]" class="fl gray">&nbsp;&nbsp;
<!--
EOT;
if ($read['ipfrom'] && empty($read['ip'])){print <<<EOT
-->
						来自: $read[ipfrom]
<!--
EOT;
} elseif ($read['ipfrom'] && $read['ip']){print <<<EOT
-->
						<span title="$read[ip]">来自: $read[ipfrom]</span>
<!--
EOT;
} elseif ($read['ip']) {print <<<EOT
-->
						$read[ip]
<!--
EOT;
}print <<<EOT
-->
                        </span>
<!--
EOT;
if($read['authorid']==$winduid || $isGM || $pwSystem['deltpcs']){
if ($db_ajax & 4){
	$edit_title = getLangInfo('other','ajax_edit_way');
} else {
	$edit_title = getLangInfo('other','edit');
}
print <<<EOT
-->
						<div class="fl">&nbsp;<b class="gray2 fn">┊</b>&nbsp;&nbsp;<a href="post.php?action=modify&fid=$fid&tid=$tid&pid=$read[pid]&article=$read[lou]" id="modify_$read[pid]" onclick="return sendurl(this,4,'',event)" title="{$edit_title}">编辑</a></div>
<!--
EOT;
}print <<<EOT
-->
						<div class="fr black" style="overflow:hidden;">
<!--
EOT;
if($ordertype == 'desc' && $read['lou']==0){print <<<EOT
-->
							<a href="read.php?tid=$tid&ordertype=asc" title="正序阅读">正序阅读</a>&nbsp;<b class="gray2 fn">┊</b>&nbsp;
<!--
EOT;
}elseif((!$ordertype || $ordertype == 'asc')&& $read['lou']==0){print <<<EOT
-->
							<a href="read.php?tid=$tid&ordertype=desc" title="倒序阅读">倒序阅读</a>&nbsp;<b class="gray2 fn">┊</b>&nbsp;
<!--
EOT;
}if($uid > 0){print <<<EOT
-->
							<a href="read.php?tid=$tid" title="显示全部帖子">全看</a>&nbsp;<b class="gray2 fn">┊</b>&nbsp;
<!--
EOT;
}else{
if($read['lou']==0){print <<<EOT
-->
							<a href="javascript:;" onclick="window.location=('read.php?tid=$tid&uid=$read[authorid]');return false;" title="只看楼主的所有帖子">只看楼主</a>&nbsp;<b class="gray2 fn">┊</b>&nbsp;
<!--
EOT;
}else{print <<<EOT
-->
							<a href="javascript:;" onclick="window.location=('read.php?tid=$tid&uid=$read[authorid]');return false;" title="只看该作者的所有回复">只看该作者</a>&nbsp;<b class="gray2 fn">┊</b>&nbsp;
<!--
EOT;
}}if($authorid==$winduid && $read['authorid']!=$authorid && $_G['leaveword']){print <<<EOT
-->
							<a style="cursor:pointer;" onclick="sendmsg('pw_ajax.php?action=leaveword&tid=$tid&pid=$read[pid]','',this.id)" id="word_$read[pid]" title="楼主留言" class="s3">留言</a>
<!--
EOT;
}print <<<EOT
-->
							<a style="cursor:pointer" onclick="fontsize('small','$read[pid]')">小</a> <a style="cursor:pointer" onclick="fontsize('middle','$read[pid]')">中</a> <a style="cursor:pointer" onclick="fontsize('big','$read[pid]')">大</a></div>
					</div>
					<div class="c"></div>
<!--
EOT;
if($read['lou']!=0 && $special == 'read_debate'){
if($read['standpoint']==1){print <<<EOT
-->
					<div class="dig3 fl"> <span class="fl">正方支持者</span>
						<div class="fl" onClick="dodebate('votepid_$read[pid]',$tid,$read[pid])">支持:<span id="votepid_$read[pid]">$read[vote]</span></div>
					</div>
					<div class="c"></div>
<!--
EOT;
}elseif($read['standpoint']==2){print <<<EOT
-->
					<div class="dig4 fl"> <span class="fl">反方支持者</span>
						<div class="fl" onClick="dodebate('votepid_$read[pid]',$tid,$read[pid])">支持:<span id="votepid_$read[pid]">$read[vote]</span></div>
					</div>
					<div class="c"></div>
<!--
EOT;
}else{print <<<EOT
-->
					<div class="dig5 tac fl">我是中立者</div>
					<div class="c"></div>
<!--
EOT;
}}if($forumset['dig'] && $read['lou']==0 && $_G['dig'] ){print<<<EOT
-->
					<a id="r_dig" href="javascript:void(0)" class="dig fl" title="推荐此帖到排行榜" onclick="dig();">$read[dig]</a>
<!--
EOT;
}if($read['subject'] || $db_union[2]){
if($read['lou']==0){print <<<EOT
-->
<!--
EOT;
if($read_category)
print <<<EOT
-->
						<div class="fr blockquote" style="margin:10px 15px;">{$read_category}</div>
<!--
EOT;
print <<<EOT
-->
						<h1 id="subject_$read[pid]">$db_union[2]$read[icon]$read[subject]</h1>
<!--
EOT;
}else{print<<<EOT
-->
						<div class="read_h1" id="subject_$read[pid]">$db_union[2]$read[icon]$read[subject]</div>
<!--
EOT;
}}else{print<<<EOT
-->
						<div class="read_h1" id="subject_$read[pid]"></div>
<!--
EOT;
}print <<<EOT
-->
<!--
EOT;
if($pcid>0 && $read[lou]==0){
if($read['endtime']<$timestamp){
	$joininfo="<div style=\"margin:0 0 10px 15px;\" class=\"cc\"><div class=\"blockquote fl\" style=\"margin:0;\">已结束</div></div>";
}elseif($read['begintime']>$timestamp){
	$joininfo="<div style=\"margin:0 0 10px 15px;\" class=\"cc\"><div class=\"blockquote fl\" style=\"margin:0;\">还没到报名时间</div></div>";
}elseif($read['nums']>=$read['limitnum'] && $read['limitnum']){
	$joininfo="<div style=\"margin:0 0 10px 15px;\" class=\"cc\"><div class=\"blockquote fl\" style=\"margin:0;\">人数已满</div></div>";
}elseif($read['authorid']==$winduid && $winduid){
	$joininfo="";
}elseif($pcuid==$winduid && $winduid){
	$joininfo="<div style=\"margin:0 0 10px 15px;\" class=\"cc\"><div class=\"blockquote fl\" style=\"margin:0;\">您已报名<a href=\"javascript:;\" id=\"pcjoin\" onclick=\"sendmsg('pw_ajax.php?action=pcjoin&tid=$tid&authorid=$read[authorid]&pcid=$pcid','',this.id);\" class=\"s4\">补报</a></div></div>";
}else{
	if($winduid){
		$joininfo="<div style=\"margin:0 0 10px 15px;\" class=\"cc\"><a href=\"javascript:;\" id=\"pcjoin\" onclick=\"sendmsg('pw_ajax.php?action=pcjoin&tid=$tid&authorid=$read[authorid]&pcid=$pcid','',this.id);\" class=\"app-post\">我要报名</a></div>";
}else{
		$joininfo="<div style=\"margin:0 0 10px 15px;\" class=\"cc\"><a href=\"job.php?action=pcjoin&tid=$tid\" class=\"app-post\">我要报名</a></div>";
}
}
print<<<EOT
-->
$joininfo
<!--
EOT;
}print<<<EOT
-->
<!--
EOT;
if (isset($read['cyid'])) {print <<<EOT
-->
						<div style="padding:3px 10px;margin:0 15px 10px" class="blockquote fl">来自群：<a href="mode.php?m=o&q=group&a=thread&cyid=$read[cyid]">$read[cname]</a></div>
<!--
EOT;
}print<<<EOT
-->

					<div class="c"></div>
<!--
EOT;
if($read['remindinfo']){print <<<EOT
-->
					<div id="mag_$read[pid]">
						<blockquote class="blockquote block-img"><span class="s3">管理提醒:
<!--
EOT;
if($read['remindinfo'][1]){print <<<EOT
-->
							({$read[remindinfo][1]})
<!--
EOT;
}print <<<EOT
-->
							</span>{$read[remindinfo][0]}
<!--
EOT;
if($read['remindinfo'][2]){print <<<EOT
-->
							<span class="gray">({$read[remindinfo][2]})</span>
<!--
EOT;
}print <<<EOT
-->
						</blockquote>
					</div>
<!--
EOT;
}print <<<EOT
-->
<!--
EOT;
list($htmlAdvert,$arrayAdvert) = pwAdvert('Mode.Forum.Layer.TidUp',$fid,$key+1);
if($htmlAdvert){print <<<EOT
-->
					<div class="c"></div>
					<div class="tips black" style="width:auto;margin-top:0;_margin-left:7px;" id="ads_c_$read[pid]">{$htmlAdvert}</div>
<!--
EOT;
}print <<<EOT
-->
					<div class="tpc_content">
						<div id="p_$read[pid]" class="c"></div>

<!--
EOT;
if($ifmagic && $read['lou']==0){print <<<EOT
-->
						<div class="fr" id="myshow_pic" style="cursor:pointer;color:$linkcolor;margin-bottom:10px;" onclick="logo_onclick(event);"> <img src="http://rs.phpwind.net/{$magicid}T.gif" style="display:block;width:52px;height:52px;text-align:center" title="{$magicname}" />
							<div style="display:inline;text-align:center;white-space:nowrap;"><img id="my_close" src="$imgpath/post/my_close.gif" />重播</div>
						</div>
<!--
EOT;
}
list($htmlAdvert,$arrayAdvert) = pwAdvert('Mode.Forum.Layer.TidRight',$fid,$key+1);
if($htmlAdvert){print <<<EOT
-->
						<div class="fr" id="ads_r_$read[pid]" style="clear:right;margin:0 0 10px 10px;">{$htmlAdvert}</div>
<!--
EOT;
}print <<<EOT
-->
<!--
EOT;
if($read['lou'] == 0 && $topicvalue && !$read['ifshield'] && !($read['groupid'] == 6 && $db_shield )){print<<<EOT
-->
$topicvalue
<!--
EOT;
}print<<<EOT
-->
						<div class="f14" id="read_$read[pid]">
						$read[content]
<!--
EOT;
if($read[lou]==0 && $pcid>0 && $winduid){print<<<EOT
-->
			<a name="pcinfo"></a><div id="pc_show"><div style="padding:13px 30px;"><img src="$imgpath/loading.gif" align="absbottom" /> 正在加载数据...</div></div>
<script language="javascript">
var isadminright = parseInt('$isadminright');
var payway = parseInt('$payway');
var ifend = parseInt('$ifend');

if (isadminright == 1) {
	var jointype = 1;
} else if (isadminright == 2) {
	var jointype = 2;
} else {
	var jointype = 3;
}

function ajaxview(url) {
	try {
		ajaxget(url,'pc_show');
		return false;
	} catch(e){}
}

function ajaxget(url,tag) {
	try {
		ajax.send(url,'',function() {
			if (ajax.request.responseText.indexOf('<') != -1) {
				getObj(tag).innerHTML = ajax.request.responseText;
			}
		});
		return false;
	} catch(e){}
}

window.onReady(function () {
	ajaxget('pw_ajax.php?action=pcmember&pcid=$pcid&tid=$tid&jointype='+jointype+'&payway='+payway+'&ifend='+ifend,'pc_show');
});

function pc_del(pcmid,pcid,jointype,payway) {
	try {
		ajax.send('pw_ajax.php?action=pcdel&pcmid='+pcmid+'&pcid='+pcid+'&jointype='+jointype+'&payway='+payway+'&tid='+tid,'',function() {
			var rText = ajax.request.responseText.split('\t');
			if (rText[0] == 'success') {
				ajaxget('pw_ajax.php?action=pcmember&pcid=$pcid&jointype='+rText[1]+'&tid='+rText[2]+'&payway='+rText[3],'pc_show');
				showDialog('success','操作成功!',2);
			} else if (rText[0] == 'noright') {
				showDialog('error','您没有删除的权限',2);
			} else {
				showDialog('error','非法操作',2);
			}
		});
	return false;
	} catch(e){}
}

function pc_modify() {
	var rText = ajax.request.responseText.split('\t');
	if (rText[0] == 'success') {
		ajaxget('pw_ajax.php?action=pcmember&pcid=$pcid&jointype='+rText[1]+'&tid='+rText[2]+'&payway='+rText[3],'pc_show');
		showDialog('success','操作成功!',2);
	} else if (rText[0] == 'numserror') {
		showDialog('error','数量错误或者不能为0',2);
	} else if (rText[0] == 'pcjoin_more') {
		showDialog('error','您报的人数已超总人数',2);
	} else if (rText[0] == 'pcjoin_pcid_more') {
		showDialog('error','您购买数量已超总数',2);
	} else {
		showDialog('error','非法操作',2);
	}
}

function pc_join() {
	ajaxget('pw_ajax.php?action=pcmember&pcid=$pcid&tid=$tid&jointype='+jointype+'&payway='+payway,'pc_show');
	closep();
}
</script>
<!--
EOT;
}print<<<EOT
-->
						</div>

<!--
EOT;
if($read['pic']){
	foreach($read['pic'] as $pic){
		if($pic){
print <<<EOT
-->
						<div style="margin:5px 0;" id="att_$pic[aid]">
<!--
EOT;
			if($pic['desc']){
print <<<EOT
-->
							描述:$pic[desc]<br />
<!--
EOT;
			}
print <<<EOT
-->
							图片:$pic[name] $pic[img]
<!--
EOT;
			if($pic['dfadmin']){
print <<<EOT
-->
							[<a style="cursor:pointer" onclick="delatt('$read[pid]','$pic[aid]');">删除</a>]
<!--
EOT;
			}
print <<<EOT
-->
						</div>
<!--
EOT;
		}
	}
}
print <<<EOT
-->

					</div>
				</td>
			</tr>
			<tr class="r_one">
				<td style="vertical-align:bottom;border:0;padding:0;">
<!--
EOT;
if($read['aid'] && $read['ifhide']>0){print <<<EOT
-->
					<blockquote class="blockquote fl">附件设置隐藏，需要回复后才能看到</blockquote>
					<div class="c"></div>
<!--
EOT;
}if($read['picurl']){
foreach($read['picurl'] as $k => $picture){
if($picture){print <<<EOT
-->
					<div style="margin:0 10px 10px 15px;" id="att_$k">远程图片:<a href="job.php?action=showimg&tid={$tid}&pid={$read[pid]}&fid={$fid}&aid={$k}&verify={$picture[verify]}" target="_blank">$picture[name]</a>
<!--
EOT;
if($picture['dfadmin']){print <<<EOT
-->
						[<a style="cursor:pointer" onclick="delatt('$read[pid]','$k');">删除</a>]
<!--
EOT;
}print <<<EOT
-->
					</div>
<!--
EOT;
}}}
if($read['downattach']){
	foreach($read['downattach'] as $attach){
		if($attach){
print <<<EOT
-->
					<div style="margin:0 10px 10px 15px;" id="att_$attach[aid]">
<!--
EOT;
			if($attach['desc']){
print <<<EOT
-->
						描述:$attach[desc]<br />
<!--
EOT;
			}
			$att_id = $db_attfg ? "id=\"fg_$attach[aid]\"" : '';
print <<<EOT
-->
						附件: <img src="$imgpath/$stylepath/file/$attach[type].gif" align="absmiddle" /> <a $att_id href="job.php?action=download&aid=$attach[aid]" target="_blank"> <font color="red">$attach[name]</font></a> ($attach[size] K) 下载次数:$attach[hits]
<!--
EOT;
			if ($attach['needrvrc']) {
				if ($attach['special'] == 2) {
print <<<EOT
-->
下载该附件需要支付{$attach[needrvrc]}{$attach[cname]}
<!--
EOT;
}else{print <<<EOT
-->
该附件已加密,拥有{$attach[needrvrc]}{$attach[cname]}才能下载
<!--
EOT;
			}}elseif(in_array($attach['ext'],array('mp3','wma','wmv','rm','swf'))){
print <<<EOT
-->
						[<a style="cursor:pointer" onclick="playatt('$attach[aid]');">试播</a>]
<!--
EOT;
			}
			if($attach['dfadmin']){
print <<<EOT
-->
						[<a style="cursor:pointer" onclick="delatt('$read[pid]','$attach[aid]');">删除</a>]
<!--
EOT;
			}
print <<<EOT
-->
					</div>
<!--
EOT;
		}
	}
}
//评价是否开启
if($read[pid] == 'tpc' && !$forumset[rate] && $rateSets[1] && isset($db_hackdb['rate']) ){
print <<<EOT
-->
						<link rel="stylesheet" type="text/css" href="hack/rate/images/rate.css" />
						<script language="JavaScript" src="js/rate_ajax.js"></script>
						<div id="vote_box" style="margin:10px 15px;">
<!--
EOT;
$rateIndexObject->getVoting();
print <<<EOT
-->
						</div>
<!--
EOT;
}
if($read['reward']){
print <<<EOT
-->
					<div class="cc">$read[reward]</div>
<!--
EOT;
}
if (isset($ping_logs[$read['pid']]['count']) && $ping_logs[$read['pid']]['count']) {
print <<<EOT
-->
					<div id="mark_$read[pid]" class="score cc">
						<div class="tal s3"><a id="clearPingLog_{$read['pid']}" href="javascript:;" class="fr" onclick="sendmsg('pw_ajax.php?action=clearpinglog','fid=$fid&tid=$tid&pid={$read['pid']}',this.id)">清空我的评分动态</a>本帖最近评分记录: 共{$ping_logs[$read['pid']]['count']}条评分记录</div>
						<div style="width:100%;">
							<table width="100%">
								<tbody id="pingPage_{$read['pid']}">
<!--
EOT;
	foreach ($ping_logs[$read['pid']]['data'] as $pingdata) {
print <<<EOT
-->
								<tr id="pingLogTr_{$pingdata['id']}" class="vt" onmouseover="showPingDelLink(this, true)" onmouseout="showPingDelLink(this, false)">
									<th width="20">
										<span id="pingUserShow_{$pingdata['id']}"></span>
										<img src="{$pingdata['icon']}" width="16" height="16" id="card_pingUserShow_{$pingdata[id]}_{$pingdata[uid]}" class="userCard" />
									</th>
									<td style="width:100px;"><a target="_blank" href="u.php?action=show&username={$pingdata['pinger']}">{$pingdata['pinger']}</a></td>
									<td style="width:7%;">{$pingdata['name']}</td>
									<td style="width:7%;"><b>{$pingdata['point']}</b></td>
									<td style="width:12%;"><span class="gray">{$pingdata['pingtime']}</span></td>
									<td>{$pingdata['record']}</td>
									<td width="30">
<!--
EOT;
		if ($admincheck || ($_G['markable'] && $pingdata['pinger'] == $windid)) {
print <<<EOT
-->
										<a style="display:none;" id="pingDel_{$pingdata['id']}" href="javascript:void(0);" onclick="delPingLog('$fid', '$tid', '{$read['pid']}', '{$pingdata['id']}')"><img src="$imgpath/close.gif" /></a>
<!--
EOT;
		}
print <<<EOT
-->
									</td>
								</tr>
<!--
EOT;
	}
print <<<EOT
-->
								</tbody>
								<tr>
									<td colspan="3" style="padding-left:0;">
										<a id="pingHide_{$read['pid']}" href="javascript:void(0);" onclick="pingHideCtrl('{$read['pid']}');">隐藏评分记录</a>
									</td>
									<td colspan="4" class="tar">
<!--
EOT;
	if ($ping_logs[$read['pid']]['count'] > 10) {
print <<<EOT
-->
										<a id="pingMore_{$read['pid']}" href="javascript:void(0);" onclick="setTimeout(function(){showPingPage('$fid', '$tid', '{$read['pid']}');}, 200);">查看更多</a>
<!--
EOT;
	}
print <<<EOT
-->
										<input id="pingPageNum_{$read['pid']}" type="hidden" value="2" />
										<script language="javascript">
										getObj('pingPageNum_{$read['pid']}').value = 2;
										</script>
									</td>
								</tr>
							</table>
						</div>
					</div>
<!--
EOT;
}print <<<EOT
-->



					<div id="w_$read[pid]" class="c"></div>
<!--
EOT;
list($htmlAdvert,$arrayAdvert) = pwAdvert('Mode.Forum.Layer.TidDown',$fid,$key+1);
if($htmlAdvert){print <<<EOT
-->
					<div class="tips" style="width:auto;" id="ads_c_$read[pid]">{$htmlAdvert}</div>
					<div class="c"></div>
<!--
EOT;
}if($read[lou] == 0 && $db_threadrelated && $forumset['ifrelated'] && $relatedb){print <<<EOT
-->
<style>
.dynamic{background:$forumcolortwo;width:440px;margin:10px 15px;padding:0 5px;}
.dynamic th{margin:0;padding:0;}
.dynamic th img{margin-top:6px;}
.dynamic td ul{padding:5px 0 10px;line-height:24px;}
.dynamic td li{background:url($imgpath/pwicon/related_li.gif) 0 8px no-repeat;padding-left:12px;}
.dynamic td h6{padding:6px 0 5px;margin:0;border-bottom:1px dashed $tdcolor; font-weight:700;color:$cbgfont;}
.dynamic td .mode-o-a a{text-decoration:underline;color:$linkcolor;}
</style>
<!--
EOT;
if ($forumset['relatedcon'] == 'oinfo') {print<<<EOT
-->
					<div class="dynamic">
					<table width="100%">
						<tr class="vt">
						<th width="30"><img src="$imgpath/pwicon/mode-o.gif" /></th>
						<td>
						<h6>圈子动态</h6>
						<ul class="mode-o-a">
<!--
EOT;
foreach($relatedb as $value){print <<<EOT
-->
							<li><a href="$value[url]" target="_blank">$read[author]</a> $value[title]</li>
<!--
EOT;
}print <<<EOT
-->
						</ul>
						</td>
						</tr>
					</table>
					</div>
<!--
EOT;
} else {print <<<EOT
-->
				<div class="dynamic">
					<table width="100%">
						<tr class="vt">
						<th width="30"><img src="$imgpath/pwicon/related.gif" /></th>
						<td>
								<h6>相关话题</h6>
								<ul>
<!--
EOT;
foreach($relatedb as $value){print <<<EOT
-->
									<li><a href="$value[url]" target="_blank">$value[title]</a></li>
<!--
EOT;
}print <<<EOT
-->
								</ul>
						</td>
						</tr>
					</table>
				</div>
<!--
EOT;
}print <<<EOT
-->
					<div class="c"></div>
<!--
EOT;
}if($db_iftag && $read['tag']){print <<<EOT
-->
					<div class="tal gray" style="margin:10px 15px 0;">关键词: {$read[tag]}</div>
<!--
EOT;
}if($read['signature']){print <<<EOT
-->
					<div class="sigline"></div>
					<div class="signature" style="max-height:{$db_signheight}px;maxHeight:{$db_signheight}px; overflow:hidden;">
						<table width="100%">
							<tr>
								<td>$read[signature]</td>
							</tr>
						</table>
					</div>
<!--
EOT;
}print <<<EOT
-->
					<div class="tipad cc">
						<div class="fl readbot">
<!--
EOT;
if($read['lou']==0){print <<<EOT
-->
							<a class="r-reply" title="回复此楼" href="javascript:;" onclick="postreply('回 楼主($read[anonymousname]) 的帖子');">回复</a>
<!--
EOT;
}else{print <<<EOT
-->
							<a class="r-reply" title="回复此楼" href="javascript:;" onclick="postreply('回 $read[lou]楼($read[author]) 的帖子');">回复</a>
<!--
EOT;
}if ($db_ajax & 4){
	$quote_title = getLangInfo('other','ajax_edit_way');
} else {
	$quote_title = getLangInfo('other','read_quote_info');
}print <<<EOT
-->
							<a class="r-quote" href="post.php?action=quote&fid=$fid&tid=$tid&pid=$read[pid]&article=$read[lou]&page=$page" onclick="return sendurl(this,4,'',event)" id="quote_$read[pid]" title="{$quote_title}">引用</a>
<!--
EOT;
if($admincheck || $_G['markable']){print <<<EOT
-->
							<a class="r-score" id="showping_$read[pid]" href="operate.php?action=showping&tid=$tid&pid=$read[pid]&page=$page" onclick="return sendurl(this,8)" title="评分">评分</a>
<!--
EOT;
}if($groupid!='guest' && $read['lou']==0){print <<<EOT
-->
							<a class="r-keep" href="javascript:;"  style="cursor:pointer;" onclick="sendmsg('pw_ajax.php?action=favor&tid=$tid&fid=$fid','',this.id)" id="favor" title="收藏为私有">收藏</a>
<!--
EOT;
}
if ($groupid != 'guest' && $read['lou']==0){
if($db_share_open){print <<<EOT
-->
							<a class="r-recommend" onclick="sendmsg('operate.php?action=share&ajax=1&type=topic&id=$tid','','td_read_$read[pid]');" title="分享此帖">分享</a>
<!--
EOT;
}else{print<<<EOT
-->
							<a class="r-recommend" onclick="sendmsg('operate.php?action=share&ajax=1&type=topic&id=$tid','','td_read_$read[pid]');" title="推荐此帖">推荐</a>
<!--
EOT;
}}elseif($groupid != 'guest'){
if($db_share_open){print <<<EOT
-->
							<a class="r-recommend" onclick="sendmsg('operate.php?action=share&ajax=1&type=reply&id=$read[pid]&tid=$tid','','td_read_$read[pid]');" title="分享此帖">分享</a>
<!--
EOT;
}else{print<<<EOT
-->
							<a class="r-recommend" onclick="sendmsg('operate.php?action=share&ajax=1&type=reply&id=$read[pid]&tid=$tid','','td_read_$read[pid]');" title="推荐此帖">推荐</a>
<!--
EOT;
}}
if($_G['allowreport']){print <<<EOT
-->

<!--
EOT;
}print <<<EOT
-->
						</div>
						<div class="fr gray"><!--
EOT;
if($admincheck || $pwSystem['modother'] || $_G['markable']){print <<<EOT
-->
<input type="checkbox" align="right" name="selid[]" value="$read[pid]" title="选定" />
<!--
EOT;
if($isGM || $pwSystem['modother']){print <<<EOT
-->
<a style="cursor:pointer;" href="javascript:;" onclick="formclick(document.delatc,'masingle.php?action=delatc',2);return false;">删除选定</a><!--
EOT;
}if(($isGM || $pwSystem['replaytopped']) && $read['lou'] != 0 && !$read['istop'] ){print <<<EOT
-->
<a style="cursor:pointer;" href="masingle.php?action=topped&fid=$fid&tid=$tid&pid=$read[pid]&page=$page&lou=$read[lou]" onclick="return sendurl(this,2)" title="贴内置顶">贴内置顶</a><!--
EOT;
}if(($isGM || $pwSystem['replaytopped']) && $read['lou'] != 0 && $read['istop']){print <<<EOT
-->
<a style="cursor:pointer;" href="masingle.php?action=topped&fid=$fid&tid=$tid&pid=$read[pid]&step=2&page=$page" onclick="return sendurl(this,2)" title="取消置顶">取消置顶</a><!--
EOT;
}if($admincheck || $_G['markable']){print <<<EOT
-->
<a style="cursor:pointer;" href="javascript:;" onclick="formclick(document.delatc,'operate.php?action=showping&page=$page',8);return false;">评分选定</a><!--
EOT;
}if($isGM || $pwSystem['pingcp']){print <<<EOT
-->
<a href="masingle.php?action=pingcp&fid=$fid&tid=$tid&pid=$read[pid]&page=$page" onclick="return sendurl(this,2)" title="管理评分记录" >评分管理</a><!--
EOT;
}}if($isGM || $pwSystem['banuser']){print <<<EOT
-->
<a id="banuser_$read[pid]" href="masingle.php?action=banuser&fid=$fid&tid=$tid&pid=$read[pid]&page=$page" onclick="return sendurl(this,2)" title="禁言" >禁言</a><!--
EOT;
}if($isGM || $pwSystem['shield']){print <<<EOT
-->
<a id="shield_$read[pid]" href="masingle.php?action=shield&fid=$fid&tid=$tid&pid=$read[pid]&page=$page" onclick="return sendurl(this,2)" title="屏蔽单帖" >屏蔽</a><!--
EOT;
}if($isGM || $pwSystem['remind']){print <<<EOT
-->
<a id="remind_$read[pid]" href="masingle.php?action=remind&fid=$fid&tid=$tid&pid=$read[pid]&page=$page" onclick="return sendurl(this,2)" title="提醒管理" >提醒</a><!--
EOT;
}if($forumset['inspect'] && ($isGM || $pwSystem['inspect'])){print <<<EOT
-->
<a id="inspect_$read[pid]" style="cursor:pointer" href="masingle.php?action=inspect&fid=$fid&tid=$tid&pid=$read[lou]&p=$read[pid]&page=$page" onclick="return sendurl(this,2)"  title="标记版主已阅" >已阅</a>
<!--
EOT;
}print <<<EOT
-->
<a onclick="sendmsg('pw_ajax.php?action=report&type=topic&tid=$tid&pid=$read[pid]','',this.id);" title="举报此帖" style="cursor:pointer;">举报</a><a href="javascript:scroll(0,0)" title="顶端">顶端</a>
					</div>
					</div>
				</td>
			</tr>
		</table>
	</div>
<!--
EOT;
$db_union[2]='';
}}print <<<EOT
-->
</form>
<div class="t3">
<!--
EOT;
if($N_allowtypeopen || $N_allowtopicopen || $N_allowpostcateopen){print <<<EOT
-->
	<span class="fr" style="margin-left:.5em"><a href="post.php?fid=$fid" title="发表新帖"><img src="$imgpath/$stylepath/post.png" id="td_post1" /></a></span>
<!--
EOT;
}print <<<EOT
-->
	<span class="fr"><a href="post.php?action=reply&fid=$fid&tid=$tid"><img src="$imgpath/$stylepath/reply.png" /></a></span> <span class="pages"><a href="job.php?action=previous&fid=$fid&tid=$tid&fpage=$fpage&goto=previous" class="fn">上一主题</a><span class="fl"><a href="job.php?action=previous&fid=$fid&tid=$tid&fpage=$fpage&goto=next" class="fn">下一主题</a></span></span> <span class="fl">$pages$db_union[5]</span>
	<div class="c"></div>
</div>
<div class="c"></div>
<div class="t3">
<!--
EOT;
if($winduid){print <<<EOT
-->
	<a class="bta fr" href="javascript:;" id="readlog" onclick="showViewLog('pw_ajax.php?action=readlog','',this.id);">帖子浏览记录<span class="f9">▼</span></a> <a class="bta fr" href="javascript:;" id="threadlog" onclick="showViewLog('pw_ajax.php','action=threadlog',this.id);">版块浏览记录<span class="f9">▼</span></a>
<!--
EOT;
}
$db_bfn_temp = ($db_mode == 'bbs' && $db_bfn == 'index.php') ? $db_bbsurl."/index.php?m=bbs" : $db_bfn;
print <<<EOT
-->
	<img src="$imgpath/$stylepath/thread/home-old.gif" align="absmiddle" />&nbsp;<a href="$db_bfn_temp">$db_bbsname</a> &raquo; <a href="thread.php?fid=$fid{$viewbbs}">$foruminfo[name]</a></div>
<div class="c"></div>
<!--
EOT;
if($db_windpost['checkurl']){print<<<EOT
-->
<div id="checkurl" class="menu menu-post" style="display:none;">
	<div class="menu-b tac">
		<table width="280" cellspacing="0" cellpadding="0">
			<tr>
				<th class="h" colspan="2"><span id="suburl">$db_bbsurl</span></th>
			</tr>
			<tr>
				<td colspan="2">访问内容超出本站范围，不能确定是否安全</td>
			</tr>
			<tr>
				<td><a href="" target="_blank" onclick="closep();" id="trueurl">继续访问</a></td>
				<td><a href="javascript:;" onclick="closep();">取消访问</a></td>
			</tr>
		</table>
	</div>
</div>
<!--
EOT;
}if(!$db_readinfo){print<<<EOT
-->
<script language="javascript">
function showuserinfo (id) {
	if (getObj('showface_' + id).style.display == 'none') {
		getObj('showface_' + id).style.display = '';
		getObj('info_' + id).innerHTML = '隐藏用户信息';
		getObj('gif_' + id).innerHTML = "&nbsp;<img src=\"$imgpath/read_up.gif\">";
	} else {
		getObj('showface_' + id).style.display = 'none';
		getObj('info_' + id).innerHTML = '显示用户信息';
		getObj('gif_' + id).innerHTML = "&nbsp;<img src=\"$imgpath/read_down.gif\">";
	}
}
</script>
<!--
EOT;
}print<<<EOT
-->
<script language="JavaScript">
var tid = '$tid';
var fid = '$fid';
var mt;
var totalpage = parseInt('$numofpage');
var db_ajax = '$db_ajax';
var page = parseInt('$page');
var jurl = 'read.php?tid=$tid&fpage=$fpage&toread=$toread{$urladd}&page=';
var db_htmifopen = '$db_htmifopen';
var db_dir = '$db_dir';
var db_ext = '$db_ext';
var db_bbsurl = '$db_bbsurl';
var copyurl = '$db_bbsurl/read.php?tid=$tid' + (page > 1 ? '&page=' + page : '') + '#';
<!--
EOT;
if($db_windpost['checkurl'] == '1'){print<<<EOT
-->
var db_urlcheck = '$db_urlcheck';
<!--
EOT;
}print<<<EOT
-->
window.onReady(userCard.init);

//pingpage
function showPingPage(fid, tid, pid) {
	if (getObj('pingPage_'+pid).style.display == "none") {
		pingHideCtrl(pid);
	}
	var pingPageNum = getObj('pingPageNum_'+pid).value * 1;
	ajax.send("pw_ajax.php?action=pingpage", "page="+pingPageNum+"&fid="+fid+"&tid="+tid+"&pid="+pid, function(){
		var gotText = ajax.request.responseText;

		var trs=gotText.split("<!-- splitTr -->");
		var tr, td, trData, pingId, pingIdMatch;
		for(var i=1,len=trs.length;i<len;i++) {
			pingIdMatch = trs[i].match(/<\!\-\- pingId\:(\d+) \-\->/i);
			pingId = pingIdMatch[1];
			trData = trs[i].split("<!-- split -->");

			tr = document.createElement("tr");
			tr.id = 'pingLogTr_' + pingId;
			tr.onmouseover = function() {showPingDelLink(this, true)};
			tr.onmouseout = function() {showPingDelLink(this, false)};
			td = document.createElement("th");
			td.innerHTML = trData[0];
			tr.appendChild(td);

			for(var j=1; j<=6; j++) {
				td = document.createElement("td");
				td.innerHTML = trData[j];
				tr.appendChild(td);
			}
			getObj('pingPage_'+pid).appendChild(tr);
		}
		if (gotText.indexOf('__pingPageOver__') != -1) { getObj('pingMore_'+pid).style.display='none';return ;}
	});
	getObj('pingPageNum_'+pid).value = pingPageNum + 1;
}
function delPingLog(fid, tid, pid, pingid) {
	if (confirm("你确定要删除这条评分动态么？")) {
		read.obj = getObj("pingDel_"+pingid);
		read.guide();
		ajax.send("pw_ajax.php?action=delpinglog", "fid="+fid+"&tid="+tid+"&pid="+pid+"&pingid="+pingid, function(){
			if (ajax.request.responseText == 'success') {
				showDialog('success','删除评分动态成功！');
				getObj('pingPage_'+pid).removeChild(getObj('pingLogTr_'+pingid));
			} else {
						showDialog('error','删除评分动态出错！');
			}
		});
	}
}
function showPingDelLink(trObj, isShow) {
	pingId = trObj.id.match(/\d+/i);
	linkObj = getObj("pingDel_"+pingId);
	if (linkObj) {
		linkObj.style.display = isShow ? '' : 'none';
	}
}
function pingHideCtrl(pid) {
	if (getObj('pingPage_'+pid).style.display == "") {
		getObj('pingPage_'+pid).style.display = "none";
		getObj('pingHide_'+pid).innerHTML = "显示评分记录";
	} else {
		getObj('pingPage_'+pid).style.display = "";
		getObj('pingHide_'+pid).innerHTML = "隐藏评分记录";
	}
}
</script>
<script type="text/javascript" language="JavaScript" src="js/pw_lwd.js"></script>
<!--
EOT;
$fastpost && require_once PrintEot($fastpost);
if($anonymity){print <<<EOT
-->
<script type="text/javascript">
var _ONLOAD=window.onload;
window.onload=function(){
	_ONLOAD?_ONLOAD():0;
	var allElement=document.FORM.elements;
	document.FORM.onsubmit = function(){
		popLogin();
		return false;
	}
	var obj = document.getElementById("fs_gdcode");
	if(obj){
		obj.onfocus = function(){
			return false;
		}
	}
	for (var i=0,len=allElement.length;i<len;i++){
		if(document.all){
			allElement[i].attachEvent('onclick',function(){
				popLogin();
			})
		}else{
			allElement[i].addEventListener("click",function(){
				popLogin();
			},false)
		}
	}
}
function popLogin(){
	sendmsg('{$db_bbsurl}/pw_ajax.php?action=poplogin&anchor=anchor&tid={$tid}&fpage={$fpage}&toread=$toread{$urladd}&page={$page}','');
}
</script>
<!--
EOT;
}
if($ifmagic){
$tmpReferer = urlencode($pwServer['HTTP_REFERER']);
print <<<EOT
-->
<script language="javascript">
var myshow_wink={target:'tiptop',code:'{$magicid}',name:'{$magicname}',refer:'{$tmpReferer}'};
</script>
<script language="javascript" src="js/winks.js" type="text/javascript"></script>
<!--
EOT;
}?>-->
