{template header}
<div class="subtable nav" style="width:{TABLEWIDTH}">
<!--{if $searchboxstatus}-->
	<div class="right">
	<form method="post" action="search.php?srchtype=qihoo" onSubmit="this.target='_blank';">
	<input type="hidden" name="searchsubmit" value="yes">
	<input type="text" name="srchtxt" value="$qihoo_searchboxtxt" size="27" class="input" style="{BGCODE}" onmouseover="this.focus();this.value='';this.onmouseover=null;" onfocus="this.select()">
	<!--{if $qihoo_allsearch != '2'}--><input name="searchsubmit" class="button" type="submit" value="{lang search}"><!--{/if}-->
	<!--{if $qihoo_allsearch}-->
		<input name="allsearchsubmit" class="button" type="submit" value="{lang qihoo_search}">
	<!--{/if}-->
	</form>
	</div>
<!--{/if}-->
<!--{if $forumjump && $jsmenu[1]}--><span id="forumlist"><a href="$indexname">$bbname</a><script type="text/javascript">menuregister(false, "forumlist")</script></span><!--{else}--><a href="$indexname">$bbname</a><!--{/if}--> $navigation
</div><br></div>

<!--{if !empty($advlist['text'])}-->
	<div class="maintable">
	<div class="spaceborder" style="width: {TABLEWIDTH}">
	<table cellspacing="1" border="0" cellpadding="{TABLESPACE}" width="100%" style="background: {BGBORDER}">$advlist[text]</table>
	</div><br></div>
<!--{/if}-->

<!--{if $newpmexists}-->
	<div class="maintable">
	{template pmprompt}
	</div>
<!--{/if}-->

<div class="maintable">
<table width="{TABLEWIDTH}" cellspacing="0" cellpadding="0" align="center" style="clear: both;">
<tr><td valign="bottom">
<div style="margin-bottom: {TABLESPACE}px">
<!--{if $highlightstatus}--><a href="viewthread.php?tid=$tid&amp;page=$page" style="font-weight: normal">{lang disable_highlight}</a><!--{/if}-->
<a href="redirect.php?fid=$fid&amp;tid=$tid&amp;goto=nextoldset" style="font-weight: normal"> &lsaquo;&lsaquo; {lang last_thread}</a> | <a href="redirect.php?fid=$fid&amp;tid=$tid&amp;goto=nextnewset" style="font-weight: normal">{lang next_thread} &rsaquo;&rsaquo;</a><br>
</div>
$multipage</td><td width="40%" align="right" valign="bottom">
<!--{if $allowpostreply || !$discuz_uid}--><div class="right">&nbsp;<a href="post.php?action=reply&amp;fid=$fid&amp;tid=$tid&amp;extra=$extra"><img src="{IMGDIR}/reply.gif" border="0" alt="" /></a></div><!--{/if}-->
<!--{if $allowpost || !$discuz_uid}-->
	<div id="newspecialheader" class="right"><a href="post.php?action=newthread&amp;fid=$fid&amp;extra=$extra"><img src="{IMGDIR}/newtopic.gif" border="0" alt="" /></a><a href="###"><img src="{IMGDIR}/newspecial.gif" border="0" alt="" /></a><script type="text/javascript">menuregister(false, "newspecialheader", true)</script></div>
	<!--{if ($allowposttrade && $ec_id) || $allowpostpoll || $allowpostreward || $allowpostactivity || !$discuz_uid}-->
		<div class="popupmenu_popup newspecialmenu" id="newspecialheader_menu" style="display: none">
		<table cellpadding="4" cellspacing="0" border="0" width="100%">
		<!--{if $allowpostpoll || !$discuz_uid}--><tr><td class="popupmenu_option"><div class="newspecial"><a href="post.php?action=newthread&amp;fid=$fid&amp;extra=$extra&amp;poll=yes">{lang thread_poll}</a></div></td></tr><!--{/if}-->
		<!--{if ($allowposttrade && $ec_id) || !$discuz_uid}--><tr><td class="popupmenu_option"><div class="newspecial"><a href="post.php?action=newthread&amp;fid=$fid&amp;extra=$extra&amp;trade=yes">{lang thread_trade}</a></div></td></tr><!--{/if}-->
		<!--{if $allowpostreward || !$discuz_uid}--><tr><td class="popupmenu_option"><div class="newspecial"><a href="post.php?action=newthread&amp;fid=$fid&amp;extra=$extra&amp;reward=yes">{lang thread_reward}</a></div></td></tr><!--{/if}-->
		<!--{if $allowpostactivity || !$discuz_uid}--><tr><td class="popupmenu_option"><div class="newspecial"><a href="post.php?action=newthread&amp;fid=$fid&amp;extra=$extra&amp;activity=yes">{lang thread_activity}</a></div></td></tr><!--{/if}-->
		</table></div>
	<!--{/if}-->
<!--{/if}-->
</td></tr></table></div>

<!--{if $thread['special'] == 1 && $polloptions}-->
	<div class="maintable">
	{template viewthread_poll}
	</div>
<!--{elseif $thread['special'] == 2}-->
	<div class="maintable">
	{template viewthread_trade}
	</div>
<!--{elseif $thread['special'] == 4}-->
	<div class="maintable">
	{template viewthread_activity}
	</div>
<!--{/if}-->

<script type="text/javascript">
function fastreply(subject) {
	if($('postform')) {
		$('postform').subject.value = subject;
		$('postform').message.focus();
	}
}
</script>

<div class="maintable">
<div class="spaceborder" style="width: {TABLEWIDTH}; border-bottom: none">
<table cellspacing="{INNERBORDERWIDTH}" cellpadding="{TABLESPACE}" width="100%" align="center">
<tr class="header"><td colspan="2" style="color: {HEADERTEXT}">
<div class="right" style="font-weight: normal">
	<a href="viewthread.php?action=printable&amp;tid=$tid" target="_blank">{lang thread_printable}</a> |
	<a href="misc.php?action=emailfriend&amp;tid=$tid">{lang thread_email_friend}</a> |
	<a href="my.php?item=subscriptions&amp;subadd=$tid">{lang thread_subscribe}</a> |
	<a href="my.php?item=favorites&amp;favadd=$tid&amp;type=thread">{lang thread_favorite}</a>
	<!--{if $thread['authorid'] && ($thread['authorid'] == $discuz_uid || $forum['ismoderator'])}-->
		<!--{if $thread['blog']}-->
			 | <a href="misc.php?action=blog&amp;tid=$tid">{lang blog_remove}</a>
		<!--{elseif $allowuseblog && $forum['allowshare'] && $thread['authorid'] == $discuz_uid}-->
			 | <a href="misc.php?action=blog&amp;tid=$tid">{lang blog_add}</a>
		<!--{/if}-->
	<!--{/if}-->
	<!--{if $supe_status && $supe_siteurl}-->
		<!--{if $thread['authorid'] == $discuz_uid}-->
			<!--{if  !$thread['itemid']}-->
				| <a href="$supe_siteurl/spacecp.php?action=spaceblogs&amp;op=add&amp;tid=$tid" target="_blank">{lang supe_join_xspace}</a>
			<!--{else}-->
				| <a href="$supe_siteurl/index.php?action/viewspace/itemid/$thread[itemid]/fromdiscuz/$supe_fromdiscuz" target="_blank">{lang supe_view_in_xspace}</a>
			<!--{/if}-->
		<!--{elseif !$xspacestatus}-->
			| <a href="$supe_siteurl/index.php?action/register" target="_blank">{lang supe_register_xspace}</a>
		<!--{/if}-->
		| <a href="$supe_siteurl/spacecp.php?action=spacenews&op=add&tid=$tid" target="_blank">{lang supe_resource_add}</a>
	<!--{/if}-->
</div>
{lang subject}:
<!--{if $thread['special'] == 3}-->
	<!--{if $thread['price'] > 0}-->
		[{lang reward_unsolved}]
	<!--{elseif $thread['price'] < 0}-->
		[{lang reward_solved}]
	<!--{/if}-->
<!--{/if}-->
$thread[subject]
</td></tr>

<!--{if $lastmod['modaction'] || $thread['blog'] || $thread['readperm'] || $thread['price'] != 0 || $thread[itemid]}-->
	<tr class="category"><td colspan="2" align="center" class="bold">
	<!--{if $thread[itemid]}-->
		<a href="$supe_siteurl/index.php?action/viewspace/itemid/$thread[itemid]" target="_blank"><span class="bold" style="margin-right:20px;">{lang supe_thread_already_been_join_to_xspace}</span></a>
	<!--{/if}-->
	<!--{if $thread['special'] == '0' && $thread['price'] > 0}-->
		&nbsp; <a href="misc.php?action=viewpayments&amp;tid=$tid">{lang price_thread} {$extcredits[$creditstrans][title]} <span class="bold">$thread[price]</span> {$extcredits[$creditstrans][unit]}</a> &nbsp;
	<!--{elseif $thread['special'] == 3}-->
		&nbsp; <span class="bold">
		<!--{if $thread['price'] > 0 }-->
			[{lang reward_unsolved}]
		<!--{elseif $thread['price'] < 0}-->
			[{lang reward_solved}]
		<!--{/if}-->
		{lang reward_thethread} {$extcredits[$creditstrans][title]} $rewardprice</span> {$extcredits[$creditstrans][unit]}</a> &nbsp;
	<!--{/if}-->
	<!--{if $lastmod['modaction']}-->&nbsp; <a href="misc.php?action=viewthreadmod&amp;tid=$tid" title="{lang thread_mod}" target="_blank">{lang thread_mod_by}</a>&nbsp;<!--{/if}-->
	<!--{if $thread['blog']}-->&nbsp; <a href="blog.php?uid=$thread[authorid]" target="_blank">{lang thread_blog}</a> &nbsp;<!--{/if}-->
	<!--{if $thread['readperm']}-->&nbsp; {lang readperm_thread} <span class="bold">$thread[readperm]</span> &nbsp;<!--{/if}-->
	</td></tr>
<!--{/if}-->
</table></div>

<form method="post" name="delpost" action="topicadmin.php?action=delpost&amp;fid=$fid&amp;tid=$tid&amp;page=$page">
<input type="hidden" name="formhash" value="{FORMHASH}">
<!--{loop $postlist $post}-->
	<div class="spaceborder" style="width: {TABLEWIDTH}; margin-bottom: 4px;<!--{if $post['first']}--> border-top: none<!--{/if}-->">
	<table cellspacing="{INNERBORDERWIDTH}" cellpadding="{TABLESPACE}" width="100%" align="center" class="t_row">
	<tr style="height: 100%">
	<td width="18%" valign="top" class="t_user">$post[newpostanchor] $post[lastpostanchor]
	<!--{if $forum['ismoderator']}-->
		<!--{if $allowviewip}--><a href="topicadmin.php?action=getip&amp;fid=$fid&amp;tid=$tid&amp;pid=$post[pid]"><img src="{IMGDIR}/ip.gif" border="0" align="right" alt="{lang admin_getip}" /></a><!--{/if}-->
	<!--{/if}-->
	<!--{if $post['authorid'] && $post['username'] && !$post['anonymous']}-->
		<a href="viewpro.php?uid=$post[authorid]" target="_blank" class="bold">$post[author]</a><!--{if $post['nickname']}--> <span class="smalltxt">($post[nickname])</span><!--{/if}-->
		<br><div class="smalltxt">
		$post[authortitle]
		<br>{eval showstars($post['stars']);}<br><!--{if $post['customstatus']}-->$post[customstatus]<br><!--{/if}--><br>
		<!--{if $avatarshowpos == 3 && $post['avatarshow'] && $showavatars}-->
			<center>$post[avatarshow]</center><br>
		<!--{elseif $post['avatar'] && $showavatars}-->
			<table width="95%" border="0" cellspacing="0" cellpadding="0" style="table-layout: fixed; overflow: hidden">
			<tr><td align="center">$post[avatar]</td></tr></table><br>
		<!--{else}-->
			<br><br>
		<!--{/if}-->
		<!--{if $post['medals']}-->
			<!--{loop $post['medals'] $medal}-->
				<img src="images/common/$medal[image]" border="0" alt="$medal[name]" /> &nbsp;
			<!--{/loop}-->
			<br>
		<!--{/if}-->
		{lang uid} $post[uid]<br>
		{lang digest_posts} <!--{if $post['digestposts']}--><a href="digest.php?authorid=$post[authorid]">$post[digestposts]</a><!--{else}-->$post[digestposts]<!--{/if}--><br>
		{lang credits} $post[credits]<br>
		{lang posts} $post[posts]<br>
		<!--{loop $extcredits_thread $key $credit}-->
			$credit[title] $post[$key] $credit[unit]<br>
		<!--{/loop}-->
		{lang readperm} $post[readaccess]<br>
		{lang regtime} $post[regdate]
		<!--{loop $_DCACHE['fields_thread'] $field}-->
			<br>$field[title]&nbsp;
			<!--{if $field['selective']}-->
				$field['choices'][$post['field_'.$field['fieldid']]]
			<!--{else}-->
				$post['field_'.$field['fieldid']]
			<!--{/if}-->
		<!--{/loop}-->
		<!--{if $post['location']}--><br>{lang location} $post[location]<!--{/if}--><br>
		<!--{if $vtonlinestatus && $post['authorid']}-->
			<!--{if ($vtonlinestatus == 2 && $onlineauthors[$post[authorid]]) || ($vtonlinestatus == 1 && ($timestamp - $post['lastactivity'] <= 10800) && !$post['invisible'])}-->
				{lang online_status} <b>{lang online}</b>
			<!--{else}-->
				{lang online_status} {lang offline}
			<!--{/if}-->
		<!--{/if}-->
		<!--{if $avatarshowpos == 2 && $showavatars}--><br><br><center>$post[avatarshow]</center><!--{/if}-->
		</div>
		<!--{if $post['alipay']}--><br><a href="https://www.alipay.com/payto:$post[alipay]?partner=20880020258585430156" target="_blank"><img src="{IMGDIR}/payto.gif" border="0" alt="{lang payto_author}" /></a><!--{/if}-->
	<!--{else}-->
		<!--{if !$post['authorid']}-->
			<span class="bold">{lang guest}</span> <span class="smalltxt">$post[useip]</span><br><span class="smalltxt">{lang unregistered}
		<!--{elseif $post['authorid'] && $post['username'] && $post['anonymous']}-->
			<span class="bold">
			<!--{if $forum['ismoderator']}--><a href="viewpro.php?uid=$post[authorid]" target="_blank">{lang anonymous}</a><!--{else}-->{lang anonymous}<!--{/if}-->
			</span><br>{lang member_anonymous}
		<!--{else}-->
			<span class="bold">$post[author]</span><br>
			{lang member_deleted}
		<!--{/if}-->
		<br><br><br><br><br><br><br><br><br><br>
	<!--{/if}-->
	</td>
	<td width="82%" valign="top" style="padding: 0px">
	<table border="0" cellspacing="0" cellpadding="{TABLESPACE}" class="t_msg">
	<tr><td>
	<div>
	<div class="right t_number"><a href="###" class="bold" onclick="window.clipboardData.setData('text','{$boardurl}viewthread.php?tid=$tid&amp;page=$page#pid$post[pid]')">#$post[number]</a></div>
	<!--{if $thread['special'] == 3 && $thread['price'] < 0 && $thread['dateline'] + 1 == $post['dbdateline'] && $post['first'] == 0 }-->
	<div class="right" style="padding-top: {TABLESPACE}px; background:url({IMGDIR}/flag.gif) no-repeat"><b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{lang reward_bestanswer}</b>&nbsp;</div>
	<!--{/if}-->
	<div style="padding-top: {TABLESPACE}px;">
	<!--{if $thread['special'] != 3 || $thread['price'] >= 0 || $thread['dateline'] + 1 != $post['dbdateline'] || $post['first']}-->{lang poston} $post[dateline]&nbsp;<!--{/if}-->
	<!--{if $post['username'] && !$post['anonymous']}-->
		<a href="viewpro.php?uid=$post[authorid]">{lang view_profile}</a>
		<!--{if $post['site']}--><a href="$post[site]" target="_blank">{lang homepage}</a><!--{/if}-->
		<!--{if $supe_status && $post['xspacestatus']}--><a href="$supe_siteurl/index.php?action/space/uid/$post[authorid]" target="_blank">{lang space}</a>
		<!--{elseif $post['allowuseblog']}--><a href="blog.php?uid=$post[authorid]" target="_blank">{lang blog}</a>
		<!--{/if}-->
		<a href="pm.php?action=send&amp;uid=$post[authorid]" target="_blank">{lang pm}</a>&nbsp;
		<!--{if $post['qq']}--><a href="http://wpa.qq.com/msgrd?V=1&amp;Uin=$post[qq]&amp;Site=$bbname&amp;Menu=yes" target="_blank"><img src="http://wpa.qq.com/pa?p=1:$post[qq]:4"  border="0" alt="QQ" /></a><!--{/if}-->
		<!--{if $post['icq']}--><a href="http://wwp.icq.com/scripts/search.dll?to=$post[icq]" target="_blank"><img src="http://web.icq.com/whitepages/online?icq=$post[icq]&amp;img=5" alt="ICQ {lang online_status}" border="0"  /></a><!--{/if}-->
		<!--{if $post['yahoo']}--><a href="http://edit.yahoo.com/config/send_webmesg?.target=$post[yahoo]&.src=pg" target="_blank"><img src="{IMGDIR}/yahoo.gif" alt="Yahoo!" border="0"  /></a><!--{/if}-->
		<!--{if $post['taobao']}--><script type="text/javascript">document.write('<a target="_blank" href="http://amos1.taobao.com/msg.ww?v=2&amp;uid='+encodeURIComponent('$post[taobao]')+'&amp;s=2"><img src="http://amos1.taobao.com/online.ww?v=2&uid='+encodeURIComponent('$post[taobao]')+'&s=2" alt="{lang taobao}" border="0"  /></a>&nbsp;');</script><!--{/if}-->
	<!--{/if}-->
	</div></div>
	</td></tr>
	<tr><td valign="top" class="line" height="100%" style="padding-top: 10px;">
	<!--{if $avatarshowpos == 1 && $showavatars}--><div style="float: right">$post[avatarshow]</div><!--{/if}-->
	<a name="pid$post[pid]" href="misc.php?action=viewratings&amp;tid=$tid&amp;pid=$post[pid]" title="{lang rate} $post[rate]">$post[ratings]</a>
	<!--{if $post['subject']}-->
		<span class="bold">$post[subject]</span><br><br>
	<!--{/if}-->
	<!--{if $adminid !=1 && $bannedmessages && (($post['authorid'] && !$post['username']) || ($post['groupid'] == 4 || $post['groupid'] == 5))}-->
		{lang message_banned}
	<!--{else}-->
		<div style="font-size: {MSGFONTSIZE}">$post[message]</div>
		<!--{if $post['attachment']}-->
			<br><br><img src="images/attachicons/common.gif" alt="" />&nbsp;{lang attachment}: <i>{lang attach_nopermission}</i>
		<!--{else}-->
			<!--{loop $post['attachments'] $attach}-->
				<br><br>$attach[attachicon]
				<!--{if $attach['attachimg']}-->
					<a href="member.php?action=credits&amp;view=getattach" title="{lang credits_policy_view}" target="_blank">{lang attach_img}</a>:
					<!--{if $attach['readperm']}-->, {lang readperm} $attach[readperm]<!--{/if}-->
					<!--{if $attach['description']}-->[{$attach[description]}]<!--{/if}--> <a href="attachment.php?aid=$attach[aid]" target="_blank" class="bold">$attach[filename]</a> ($attach[dateline], $attach[attachsize])<br><br>
					<!--{if $attachrefcheck}-->
						<img src="attachment.php?aid=$attach[aid]&noupdate=yes" border="0" onload="if(this.width >screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='{lang image_open_zoom}';}" onmouseover="if(this.resized) this.style.cursor='hand';" onclick="if(!this.resized) {return false;} else {window.open('attachment.php?aid=$attach[aid]');}" onmousewheel="return imgzoom(this);" alt="" />
					<!--{else}-->
						<img src="$attachurl/$attach[attachment]" border="0" onload="if(this.width >screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='{lang image_open_zoom}';}" onmouseover="if(this.resized) this.style.cursor='hand';" onclick="if(!this.resized) {return false;} else {window.open('$attachurl/$attach[attachment]');}" onmousewheel="return imgzoom(this);" alt="" />
					<!--{/if}-->
				<!--{else}-->
					<a href="member.php?action=credits&amp;view=getattach" title="{lang credits_policy_view}" target="_blank">{lang attachment}</a>:
					<!--{if $attach['description']}-->[{$attach[description]}]<!--{/if}--> <a href="attachment.php?aid=$attach[aid]" target="_blank" class="bold">$attach[filename]</a> ($attach[dateline], $attach[attachsize])<br>
					<span class="smalltxt">{lang attach_download_count} $attach[downloads]
					<!--{if $attach['readperm']}-->, {lang readperm} $attach[readperm]<!--{/if}--></span><br>
				<!--{/if}-->
			<!--{/loop}-->
		<!--{/if}-->
		<!--{if $post['number'] == 1 && $relatedkeywords}--><br><br><span class="bold">{lang thread_keywords}</span> $relatedkeywords<br><br><!--{/if}-->
		<!--{if $relatedthreadlist && !$qihoo_location && $post['number'] == 1}-->
			<br><fieldset><legend>{lang qihoo_relatedthreads}</legend><br>
			<!--{loop $relatedthreadlist $key $threads}-->
				<a href="viewthread.php?tid=$threads[tid]" target="_blank">$threads[title]</a><br>
			<!--{/loop}-->
			</fieldset>
		<!--{/if}-->
		<!--{if $post['ratelog']}-->
			<br><fieldset><legend><a href="misc.php?action=viewratings&amp;tid=$tid&amp;pid=$post[pid]" title="{lang rate_view}">{lang thread_rate_log_lately}</a></legend><br>
			<table border="0" cellspacing="0" cellpadding="0">
			<!--{loop $post['ratelog'] $ratelog}-->
				<tr><td><a href="viewpro.php?uid=$ratelog[uid]" target="_blank">$ratelog[username]</a></td>
				<td>&nbsp;&nbsp;$ratelog[dateline]</td><td>&nbsp;&nbsp;{$extcredits[$ratelog[extcredits]][title]}</td><td>&nbsp;&nbsp;<b>$ratelog[score]</b></td>
				<td>&nbsp;&nbsp;$ratelog[reason]</td></tr>
			<!--{/loop}-->
			</table>
			</fieldset>
		<!--{/if}-->
		</td></tr>
		<!--{if $post['signature'] && !$post['anonymous'] && $showsignatures}-->
			<tr><td valign="bottom">
			<br><br><br><img src="images/common/sigline.gif" alt="" /><br><div class="signature" $maxsigrows>$post[signature]</div>
			</td></tr>
		<!--{/if}-->
		<tr><td align="right">
		<!--{if ($forum['ismoderator'] || $thread['authorid'] == $discuz_uid) && $discuz_uid != $post['authorid'] && $post['authorid'] != $thread['authorid'] && $post['first'] == 0 && $thread['price'] > 0 && $thread['special'] == 3}-->
		&nbsp;<a href="###" onclick="setanswer($post['pid'])"><img src="{IMGDIR}/right.gif" border="0" alt="" /> <span class="bold">{lang reward_set_bestanswer}</span></a>
		<!--{/if}-->
		<!--{if $forum['ismoderator'] || $post['authorid'] == $discuz_uid}-->&nbsp;<a href="post.php?action=edit&amp;fid=$fid&amp;tid=$tid&amp;pid=$post[pid]&amp;page=$page&amp;extra=$extra">{lang edit}</a><!--{/if}-->
		<!--{if $allowpostreply}-->&nbsp;<a href="post.php?action=reply&amp;fid=$fid&amp;tid=$tid&amp;repquote=$post[pid]&amp;extra=$extra">{lang reply_quote}</a><!--{/if}-->
		<!--{if $discuz_uid && $reportpost}-->&nbsp;<a href="misc.php?action=report&amp;fid=$fid&amp;tid=$tid&amp;pid=$post[pid]&amp;page=$page">{lang reportpost}</a><!--{/if}-->
		<!--{if $raterange && $post['authorid']}-->&nbsp;<a href="misc.php?action=rate&amp;tid=$tid&amp;pid=$post[pid]&amp;page=$page">{lang rate}</a><!--{/if}-->
		<!--{if $fastpost && $allowpostreply}--><a href="###" onclick="fastreply('{lang post_fastreply_author}')">{lang reply}</a><!--{/if}-->
		<a href="###" onclick="scroll(0,0)"><img src="{IMGDIR}/top.gif" border="0" alt="{lang top}" /></a>
		<!--{if $forum['ismoderator'] && $allowdelpost}--><!--{if $post['number'] == 1}--><input class="checkbox" type="checkbox" disabled><!--{else}--><input class="checkbox" type="checkbox" name="delete[]" value="$post[pid]"><!--{/if}--><!--{/if}-->
		</td></tr>
		<!--{if !empty($advlist['thread'][$post['count']])}--><tr class="t_infoline"><td class="line" style="padding: 5px">[{lang advertisement}] $advlist[thread][$post[count]]</td></tr><!--{/if}-->
	<!--{/if}-->
	</table></td></tr></table></div>
<!--{/loop}-->
</form>
</div>
<script type="text/javascript">
	function setanswer(pid){
		if(confirm("{lang reward_set_bestanswer_confirm}")){
			document.delpost.action='misc.php?action=bestanswer&tid=$thread['tid']&pid=' + pid + '&bestanswersubmit=yes';
			document.delpost.submit();
		}
	}
</script>
<div class="maintable" style="clear:both">
<table width="{TABLEWIDTH}" cellspacing="0" cellpadding="0" align="center">
<tr><td valign="top">$multipage</td><td width="40%" align="right">
<!--{if $allowpostreply || !$discuz_uid}--><div class="right">&nbsp;<a href="post.php?action=reply&amp;fid=$fid&amp;tid=$tid&amp;extra=$extra"><img src="{IMGDIR}/reply.gif" border="0" alt="" /></a></div><!--{/if}-->
<!--{if $allowpost || !$discuz_uid}-->
	<div id="newspecialfooter" class="right"><a href="post.php?action=newthread&amp;fid=$fid&amp;extra=$extra"><img src="{IMGDIR}/newtopic.gif" border="0" alt="" /></a><a href="###"><img src="{IMGDIR}/newspecial.gif" border="0" alt="" /></a><script type="text/javascript">menuregister(false, "newspecialfooter", true)</script></div>
	<!--{if ($allowposttrade && $ec_id) || $allowpostpoll || $allowpostreward || $allowpostactivity || !$discuz_uid}-->
		<div class="popupmenu_popup newspecialmenu" id="newspecialfooter_menu" style="display: none">
		<table cellpadding="4" cellspacing="0" border="0" width="100%">
		<!--{if $allowpostpoll || !$discuz_uid}--><tr><td class="popupmenu_option"><div class="newspecial"><a href="post.php?action=newthread&amp;fid=$fid&amp;extra=$extra&amp;poll=yes">{lang thread_poll}</a></div></td></tr><!--{/if}-->
		<!--{if ($allowposttrade && $ec_id) || !$discuz_uid}--><tr><td class="popupmenu_option"><div class="newspecial"><a href="post.php?action=newthread&amp;fid=$fid&amp;extra=$extra&amp;trade=yes">{lang thread_trade}</a></div></td></tr><!--{/if}-->
		<!--{if $allowpostreward || !$discuz_uid}--><tr><td class="popupmenu_option"><div class="newspecial"><a href="post.php?action=newthread&amp;fid=$fid&amp;extra=$extra&amp;reward=yes">{lang thread_reward}</a></div></td></tr><!--{/if}-->
		<!--{if $allowpostactivity || !$discuz_uid}--><tr><td class="popupmenu_option"><div class="newspecial"><a href="post.php?action=newthread&amp;fid=$fid&amp;extra=$extra&amp;activity=yes">{lang thread_activity}</a></div></td></tr><!--{/if}-->
		</table></div>
	<!--{/if}-->
<!--{/if}-->
</table><br></div>

<!--{if $relatedthreadlist && $qihoo_location}-->
	<div class="maintable"><div class="spaceborder" style="width: {TABLEWIDTH}">
	<table cellspacing="{INNERBORDERWIDTH}" cellpadding="{TABLESPACE}" width="100%" align="center">
	<tr class="header"><td colSpan=6><table cellspacing="0" cellpadding="0" border="0" width="100%" class="smalltxt" style="table-layout: fixed; word-wrap: break-word">
	<tr style="color: {HEADERTEXT}"><td class="bold" width="60%">{lang qihoo_relatedthreads}</td>
	<td width="40%" align="right" nowrap><a href="http://www.qihoo.com" target="_blank">{lang qihoo_afford}</a>&nbsp;&nbsp;<a href="http://search.qihoo.com/usearch.html?kw=$searchkeywords&amp;relate=$thread['subjectenc']&amp;sort=rdate&amp;site=discuzall&amp;site=$site" target="_blank">{lang thread_more_related_threads}</a>
	&nbsp;<a href="###" onclick="toggle_collapse('relatedthreads');"><img id="relatedthreads_img" src="{IMGDIR}/{$relatedthreads['img']}" border="0" alt="" /></td></tr></table></td></tr>
	<tbody id="relatedthreads" style="$relatedthreads['style']">
	<tr class="category">
	<td width="45%" align="center">{lang subject}</td>
	<td width="14%" align="center">{lang forum}</td>
	<td width="14%" align="center">{lang author}</td>
	<td width="6%" align="center">{lang replies}</td>
	<td width="6%" align="center">{lang views}</td>
	<td width="15%" align="center">{lang lastpost}</td>
	</tr>
	<!--{loop $relatedthreadlist $key $threads}-->
		<tr class="row" onMouseOver="this.className='row1'" onMouseOut="this.className='row'">
		<td><a href="viewthread.php?tid=$threads[tid]" target="_blank">$threads[title]</a></td>
		<td align="center"><a href="forumdisplay.php?fid=$threads[fid]" target="_blank">$threads[chanl]</a></td>
		<td align="center"><a href="viewpro.php?username={echo rawurlencode($threads[author])}" target="_blank">$threads[author]</a><br>$threads[pdate]</td>
		<td align="center">$threads[rnum]</td>
		<td align="center">$threads[vnum]</td>
		<td align="center">$threads[rdate]</td>
		</tr>
	<!--{/loop}-->
	</tbody>
	</table></div><br></div>
<!--{/if}-->

<!--{if $fastpost && $allowpostreply}-->
	<script type="text/javascript">
	var postminchars = parseInt('$minpostsize');
	var postmaxchars = parseInt('$maxpostsize');
	var disablepostctrl = parseInt('$disablepostctrl');
	function validate(theform) {
		if (theform.message.value == "" && theform.subject.value == "") {
			alert("{lang post_subject_and_message_isnull}");
			return false;
		} else if (theform.subject.value.length > 80) {
			alert("{lang post_subject_toolong}");
			return false;
		}
		if (!disablepostctrl && ((postminchars != 0 && theform.message.value.length < postminchars) || (postmaxchars != 0 && theform.message.value.length > postmaxchars))) {
			alert("{lang post_message_length_invalid}\n\n{lang post_curlength}: "+theform.message.value.length+" {lang bytes}\n{lang board_allowed}: "+postminchars+" {lang to} "+postmaxchars+" {lang bytes}");
			return false;
		}
		theform.replysubmit.disabled = true;
		return true;
	}
	</script>
	<form method="post" id="postform" action="post.php?action=reply&amp;fid=$fid&amp;tid=$tid&amp;extra=$extra&amp;replysubmit=yes" onSubmit="return validate(this)">
	<input type="hidden" name="formhash" value="{FORMHASH}">
	<div class="maintable"><div class="spaceborder" style="width: {TABLEWIDTH}">
	<table cellspacing="{INNERBORDERWIDTH}" cellpadding="{TABLESPACE}" width="100%" align="center">
	<tr><td colspan="4" class="header"><a href="member.php?action=credits&amp;view=forum_reply&amp;fid=$fid" target="_blank"><img src="{IMGDIR}/credits.gif" alt="{lang credits_policy_view}" align="right" border="0" /></a>{lang post_fastreply}</td></tr>
	<tr>
	<td width="18%" class="altbg1">&nbsp;<span class="bold">{lang options}</span></td>
	<td width="6%" class="altbg2" align="center"><span class="bold">{lang subject}</span></td>
	<td width="59%" class="altbg2">$typeselect <input type="text" name="subject" style="width:60%" value="" tabindex="1"></td>
	<td width="18%" class="altbg1"><span class="bold" style="margin-left: 10%">Smilies</span></td>
	</tr>
	<tr class="bottom">
	<td width="18%" class="altbg1" valign="top">
	<input class="checkbox" type="checkbox" name="parseurloff" value="1"> {lang disable} {lang post_parseurl}<br>
	<input class="checkbox" type="checkbox" name="smileyoff" value="1"> {lang disable} <a href="faq.php?page=messages#6" target="_blank">{lang post_smilies}</a><br>
	<input class="checkbox" type="checkbox" name="bbcodeoff" value="1"> {lang disable} <a href="faq.php?page=misc#1" target="_blank">{lang post_discuzcode}</a><br>
	<!--{if $allowanonymous || $forum['allowanonymous']}--><input class="checkbox" type="checkbox" name="isanonymous" value="1"> {lang post_anonymous}<br><!--{/if}-->
	<input class="checkbox" type="checkbox" name="usesig" value="1" $usesigcheck> {lang post_show_sig}<br>
	<input class="checkbox" type="checkbox" name="emailnotify" value="1"> {lang post_email_notify}
	</td>
	<td width="6%" class="altbg2" align="center" valign="top"><span class="bold">{lang content}</span></td>
	<td width="59%" class="altbg2" valign="top">
	<div style="width: 97%" class="smalltxt" align="right">
	<textarea rows="7" cols="10" name="message" style="width: 100%; height: 120px; word-break: break-all" onKeyDown="ctlent(event);" tabindex="2"></textarea><br><br>
	<div class="left">
	<input class="button" type="submit" name="replysubmit" id="postsubmit" value="{lang post_topicsubmit}" tabindex="3">
	{lang post_submit_hotkey}&nbsp;&nbsp;
	</div>
	<input type="submit" name="previewpost" class="lightbutton" value="{lang post_previewpost}" tabindex="4">
	<input type="reset" name="topicsreset" class="lightbutton" value="{lang post_topicreset}" tabindex="5">
	</div>
	</td>
	<td width="18%" class="altbg1">
		<!--{if $smileyinsert}-->
			<div id="{$editorid}_smiliebox">
			<table cellpadding="3" cellspacing="0" width="80%" border="0" align="center">
			$smilies
			<!--{if $moresmilies}-->
				<tr>
				<td colspan="$smcols" align="right" class="bold"><br><a href="#" onclick="opensmiliewindow(200, 500);return false">{lang post_smilies_more} &rsaquo;&rsaquo;</a></td>
				</tr>
			<!--{/if}-->
			</table>
			</div>
		<!--{/if}-->
	</td></tr></table></div><br></div></form>
<!--{/if}-->

<!--{if $forum['ismoderator'] || $forumjump && !$jsmenu[1] || $visitedforums}-->
	<div class="maintable">
	<div class="subtable outertxt option">
	<div style="margin: 6px">
	<div class="right smalltxt">
	<!--{if $forum['ismoderator']}-->
		<span class="bold">{lang admin_modoptions}:</span>
		<select name="action" id="action" onchange="if(this.options[this.selectedIndex].value != '') { if(this.options[this.selectedIndex].value != 'delpost') {
		window.location=('topicadmin.php?tid=$tid&amp;fid=$fid&amp;action='+this.options[this.selectedIndex].value+'&amp;sid=$sid');
		} else { document.delpost.submit(); } }">
		<option value="" selected>{lang admin_modoptions}</option>
		<!--{if $allowdelpost}-->
			<option value="delpost">{lang admin_delpost}</option>
			<option value="delete">{lang admin_delthread}</option>
		<!--{/if}-->
		<option value="close">{lang admin_close}</option>
		<option value="move">{lang admin_move}</option>
		<!--{if !$thread['special']}--><option value="copy">{lang admin_copy}</option><!--{/if}-->
		<option value="highlight">{lang admin_highlight}</option>
		<option value="digest">{lang admin_digest}</option>
		<!--{if $allowstickthread}--><option value="stick">{lang admin_stick}</option><!--{/if}-->
		<!--{if $thread['price'] > 0 && $allowrefund && $thread['special'] == 0}--><option value="refund">{lang admin_refund}</option><!--{/if}-->
		<!--{if !$thread['special']}--><option value="split">{lang admin_split}</option><!--{/if}-->
		<!--{if !$thread['special']}--><option value="merge">{lang admin_merge}</option><!--{/if}-->
		<option value="bump">{lang admin_bump}</option>
		<option value="repair">{lang admin_repair}</option>
		<!--{if $supe_status && $allowpushthread && $forum['supe_pushsetting']['status'] == 2 && $thread['supe_pushstatus'] == 0}-->
			<option value="supe_push">{lang admin_supe_push}</option>
		<!--{/if}-->
		</select>
	<!--{/if}-->
	</div>
	<span class="smalltxt">
	<!--{if $forumjump && !$jsmenu[1]}-->
		<select onchange="if(this.options[this.selectedIndex].value != '') {
		window.location=('forumdisplay.php?fid='+this.options[this.selectedIndex].value+'&amp;sid=$sid') }">
		<option value="">{lang forum_jump}</option>
		$forumselect
		</select>&nbsp;
	<!--{/if}-->
	<!--{if $visitedforums}-->
		<select onchange="if(this.options[this.selectedIndex].value != '') {
		window.location=('forumdisplay.php?fid='+this.options[this.selectedIndex].value+'&amp;sid=$sid') }">
		<option value="">{lang visited_forums}</option>
		$visitedforums
		</select>
	<!--{/if}-->
	</span></div></div>
<!--{/if}-->

<!--{if $forumjump && $jsmenu[1]}-->
	<div class="popupmenu_popup" id="forumlist_menu" style="display: none">
	<table cellpadding="4" cellspacing="0" border="0">
	<tr><td class="popupmenu_option"><a href="$indexname" class="nav">$bbname</a></td></tr>
	{$forummenu}
	</table></div>
<!--{/if}-->

{template footer}
<!--{if $relatedthreadupdate}-->
<script type="text/javascript" src="relatethread.php?tid=$tid&amp;subjectenc=$thread[subjectenc]&amp;verifykey=$verifykey"></script>
<!--{/if}-->

