<!-- #include file="Setup.asp" -->
<!-- #include file="inc/ubb.asp" -->
<!-- #include file="inc/mtface.asp" -->
<!-- #include file="Pet/PetSetup.asp"-->
<!-- #include file="Pet/Inc/Class_PetStatus.asp"-->
<%
top

If Not IsNumeric(Request("ThreadID")) Then Error("<li>非法操作,请输入正确参数")
If Not IsNumeric(Request("ForumID")) Then Error("<li>非法操作,请输入正确参数")

ThreadID=int(Request("ThreadID"))
ForumID=int(Request("ForumID"))

if Request("menu")="RatePost" then
if CookieUserName=empty then error("<li>您还未<a href=Login.asp>登录</a>论坛")
star=int(Request("star"))
if star<0 or star>5 then error("<li>非法操作")
If not Conn.Execute("Select UserName From [BBSXP_PostRating] where UserName='"&CookieUserName&"' and ThreadID="&ThreadID&"" ).eof Then error("<li>您已经对本帖子评估了，无需重复评估！")
Conn.execute("update [BBSXP_Threads] set RatingSum=RatingSum+"&star&",TotalRatings=TotalRatings+1 where id="&ThreadID&"")
Conn.Execute("insert into [BBSXP_PostRating] (ThreadID,Rating,UserName) values ('"&ThreadID&"','"&star&"','"&CookieUserName&"')")
error2("评估成功！")
end if



if Request("menu")="Next" then
sql="select top 1 * from [BBSXP_Threads] where ID > "&ThreadID&" and ForumID="&ForumID&" and IsDel=0 order by id"
elseif Request("menu")="Previous" then
sql="select top 1 * from [BBSXP_Threads] where ID < "&ThreadID&" and ForumID="&ForumID&" and IsDel=0 order by id Desc"
else
sql="select * from [BBSXP_Threads] where ID="&ThreadID&""
end if
Rs.Open SQL,Conn,1
if Rs.eof or Rs.bof then error"<li>系统不存在该帖子的资料"
Topic=ReplaceText(Rs("Topic"),"<[^>]*>","")
Replies=Rs("Replies")
Views=Rs("Views")
IsVote=Rs("IsVote")
IsGood=Rs("IsGood")
IsTop=Rs("IsTop")
IsLocked=Rs("IsLocked")
IsDel=Rs("IsDel")
PostsTableName=Rs("PostsTableName")
SpecialTopic=Rs("SpecialTopic")
ThreadID=Rs("ID")
ForumID=Rs("ForumID")
Rs.close


sql="select * from [BBSXP_Forums] where id="&ForumID&""
Set Rs=Conn.Execute(sql)
if Rs.Eof then error("<li>系统不存在此论坛的资料")
ForumName=Rs("ForumName")
Moderated=Rs("Moderated")
ForumLogo=Rs("ForumLogo")
followid=Rs("followid")
Rs.Close
%>
<!-- #include file="inc/ForumPermissions.asp" -->
<%
if PermissionsRead=0 then error"<li>您没有<a href=ShowForumPermissions.asp?ForumID="&ForumID&">权限</a>阅读帖子"
if IsDel=1 and PermissionsManage=0 then error"<li>该主题在回收站中！"
%>

<head>
<title><%=Topic%></title>
<script>
if ("<%=ForumLogo%>"!=''){Logo.innerHTML="<img border=0 src=<%=ForumLogo%> onload='javascript:if(this.height>60)this.height=60;'>"}
</script>

</head>
<br>

<div class="mainnav">
<table cellspacing=1 cellpadding=5 border=0 width=100% class=a2>
<tr class=a3>
<td>

<table width="100%" cellspacing="0" cellpadding="0">
	<tr>
            <td>
		&nbsp;<img src=images/Forum_nav.gif>&nbsp; <%ClubTree%> → <%ForumTree(followid)%><%=ForumTreeList%> <a href=ShowForum.asp?ForumID=<%=ForumID%>><%=ForumName%></a> 
		→ <a href="?ThreadID=<%=ThreadID%>"><%=Topic%></a>
            </td>
            <td align="right">
		               <a target=_blank href=PrintPost.asp?ThreadID=<%=ThreadID%> <title="适合打印机打印的版本">打印</a> <script>document.write("<a target=_blank href='Mailto:?subject="+document.title+"&body="+location.href+"'>");</script> <title="通过电子邮件发送此页面">邮件</a> <a href="javascript:window.external.AddFavorite(location.href,document.title)" title="添加加到IE收藏夹">收藏</a> <script>document.write("<a style=cursor:hand onclick=\"javascript:OpenFriendWindow('MyFriend.asp?menu=Post&Moderated=<%=Moderated%>&body=【问题帖子】："+location.href+"')\">");</script><title="报告本帖">报告</a> <a href="?menu=Previous&ForumID=<%=ForumID%>&ThreadID=<%=ThreadID%>" title="浏览上一篇主题">上一篇</a> <a href="?menu=Next&ForumID=<%=ForumID%>&ThreadID=<%=ThreadID%>" title="浏览下一篇主题">下一篇</a>　
            </td>
       </tr>
</table>

</td>
</tr>
</table><br>

<!----------------------广告------------------------->
<%if int(SiteSettings("DisplayTopAD"))=1 then%>
<table class="a2" cellSpacing="1" cellPadding="6" width="100%" border="0" align="center">
		<tr class="a4" align="middle">
			<td width="25%"><%=SiteSettings("TopAD1")%></td>
			<td width="25%"><%=SiteSettings("TopAD2")%></td>
			<td width="25%"><%=SiteSettings("TopAD3")%></td>
			<td width="25%"><%=SiteSettings("TopAD4")%></td>
		</tr>
		<tr class="a4" align="middle">
			<td width="25%"><%=SiteSettings("TopAD5")%></td>
			<td width="25%"><%=SiteSettings("TopAD6")%></td>
			<td width="25%"><%=SiteSettings("TopAD7")%></td>
			<td width="25%"><%=SiteSettings("TopAD8")%></td>
		</tr>
	</table><br>
<%end if%>
<!----------------------广告------------------------->

<table cellspacing=0 cellpadding=0 border=0 width=100%>
<tr><td valign="bottom">
<a href=NewTopic.asp?ForumID=<%=ForumID%>><img src=images/Style/<%=Request.Cookies("skins")%>/post.gif border="0" title="发表主题"></a>
<%if PermissionsCreatePoll=1 then%><a href="NewTopic.asp?ForumID=<%=ForumID%>&Poll=1"><img src=images/Style/<%=Request.Cookies("skins")%>/vote.gif border="0" title="发起投票"></a><%end if%>
<a href=ReTopic.asp?ThreadID=<%=ThreadID%>><img src=images/Style/<%=Request.Cookies("skins")%>/reply.gif border="0" title="回复帖子"></a>

<a onmouseover="showmenu(event,'<div class=menuitems><a href=?Menu=RatePost&ThreadID=<%=ThreadID%>&Star=0><img border=0 src=Images/Star/0.gif></a></div><div class=menuitems><a href=?Menu=RatePost&ThreadID=<%=ThreadID%>&Star=1><img border=0 src=Images/Star/1.gif></a></div><div class=menuitems><a href=?Menu=RatePost&ThreadID=<%=ThreadID%>&Star=2><img border=0 src=Images/Star/2.gif></a></div><div class=menuitems><a href=?Menu=RatePost&ThreadID=<%=ThreadID%>&Star=3><img border=0 src=Images/Star/3.gif></a></div><div class=menuitems><a href=?Menu=RatePost&ThreadID=<%=ThreadID%>&Star=4><img border=0 src=Images/Star/4.gif></a></div><div class=menuitems><a href=?Menu=RatePost&ThreadID=<%=ThreadID%>&Star=5><img border=0 src=Images/Star/5.gif></a></div>')" style="cursor:default">
<img src=images/Style/<%=Request.Cookies("skins")%>/ping.gif border="0" title="评估帖子"></a>


</td><td valign="bottom" align="center">回复数：<b><%=Replies%></b> | 点击数：<b><%=Views%></b></td>
<td align="right"valign="bottom">

<select onchange="javascript:if(this.options[this.selectedIndex].value)window.location.href='ShowPost.asp?<%=ReplaceText(Request.QueryString,"&SortOrder=([0-9]*)","")%>&SortOrder='+this.options[this.selectedIndex].value">
<option>帖子排序</option>
<option value="0" <%if Request("SortOrder")="0" then%>selected<%end if%>>从旧到新</option>
<option value="1" <%if Request("SortOrder")="1" then%>selected<%end if%>>从新到旧</option>
</select></TD></tr></table><br>

<%
'''''''投票''''''''
if IsVote=1 then
%>
<table cellspacing=1 cellpadding=5 border=0 width=100% class=a2>

<tr class="a1">
	<td width="40%" align="center">
	选项</td>
	<td width="10%" align="center">
	票数</td>
	<td width="50%" align="center" colspan="2">
	百分比</td></tr>

<form action=PostVote.asp?id=<%=ThreadID%> method=Post>
<%

sql="select * from [BBSXP_Vote] where ThreadID="&ThreadID&""
Set Rs=Conn.Execute(sql)

if Rs("Type")=1 then
multiplicity="checkbox"
else
multiplicity="radio"
end if

allticket=0
Result=split(Rs("Result"),"|")
for i = 0 to ubound(Result)
if not Result(i)="" then allticket=Result(i)+allticket
next

Vote=split(Rs("Items"),"|")
for i = 0 to ubound(Vote)
if not Vote(i)="" then

if allticket=0 then
Voteresult=0
Votepercent=0
else
Voteresult=result(i)/allticket*100
Votepercent=formatnumber(result(i)/allticket*100)
end if

%>
	<tr class="a3">
	<td width="40%"><input type=<%=multiplicity%> value=<%=i%> name=PostVote id=PostVote<%=i%>><label for=PostVote<%=i%>><%=Vote(i)%></label></td>
	<td width="10%" align="center"><%=Result(i)%></td>
	<td width="40%"><img src=images/bar/0.gif width=<%=Voteresult%>% height="10"></td>
	<td width="10%" align="center"><%=Votepercent%>%</td>
	</tr>
<%
end if
next
%>
	<tr class="a3">
	<td align="center">
	
<%
if  PermissionsVote=0 then
response.write "您没有权限投票"
elseif instr("|"&Rs("BallotUserList")&"|","|"&CookieUserName&"|")>0 then
response.write "您已经投过票了"
elseif instr("|"&Rs("BallotIPList")&"|","|"&Request.ServerVariables("REMOTE_ADDR")&"|")>0 then
response.write "此IP已经投过票了"
elseif Rs("Expiry")< now() then
response.write "投票已过期"
else
response.write "<INPUT type=submit value='投　票'>"
end if
%>
	
</td>
	<td align="center">
总票数：<%=allticket%></td></form>
	<td colspan="2" align="center">截止投票时间：<%=Rs("Expiry")%></td>
	</tr>
	</table>
<%
Rs.Close
end if
'''''''投票 END''''''''

TotalCount=replies+1
PageSetup=SiteSettings("PostsPerPage") '设定每页的显示数量
TotalPage=Abs(Int(TotalCount/PageSetup*(-1))) '总页数
PageCount = cint(Request.QueryString("PageIndex")) '获取当前页
if PageCount <1 then PageCount = 1
if PageCount > TotalPage then PageCount = TotalPage


if Request("SortOrder")="1" then
SqlSortOrder="Desc"
else

SqlSortOrder=""
end if


sql="select * from [BBSXP_Posts"&PostsTableName&"] where ThreadID="&ThreadID&" order by id "&SqlSortOrder&""
if PageCount<11 then
Set Rs=Conn.Execute(sql)
else
rs.Open sql,Conn,1
end if

if Rs.eof then error2"系统不存在该帖子的资料"

if TotalPage>1 then RS.Move (PageCount-1) * pagesetup

i=0
Do While Not Rs.EOF and i<PageSetup
i=i+1

Set Rs1=Conn.Execute("[BBSXP_Users] where UserName='"&Rs("UserName")&"'")
if Rs1.EOF then
Conn.execute("Delete from [BBSXP_Posts"&PostsTableName&"] where UserName='"&Rs("UserName")&"'")
TotalCount=conn.Execute("Select count(ID) From [BBSXP_Posts"&PostsTableName&"] where ThreadID="&ThreadID&"")(0)
Conn.execute("update [BBSXP_Threads] set replies="&TotalCount&"-1 where id="&ThreadID&"")
end if
ShowRank(Rs1("experience"))
%>
<table cellspacing=1 cellpadding=5 border=0 width=100% class=a2>

<tr class=a1><td colspan="2"><img src=images/icon_post_show.gif> <%=Rs("Subject")%> </td></tr>

<tr class=a3><td width="180" valign=top>






<table border=0 width=80% cellspacing="0" cellpadding="0" align="center"><tr>

<%
Set UsersOnline=Conn.Execute("select TOP 1 LastTime From [BBSXP_UsersOnline] where Eremite=0 and UserName='"&Rs1("UserName")&"'")
if not UsersOnline.eof then
%><td><img title="<%=Rs1("UserName")%> 在线. 最后活动时间:<%=UsersOnline("LastTime")%>" src="Images/user_IsOnline.gif" border="0"></td><%
end if
Set UsersOnline=Nothing
%>
<td><font style=font-size:10pt><b><%=Rs1("UserName")%></b></font><br><%=Rs1("UserHonor")%></td>
<td align=right valign=top>


<%if Rs1("UserSex")<>"" then%>
<img src=images/<%=Rs1("UserSex")%>.gif>&nbsp;
<%end if%>
<%=constellation(Rs1("birthday"))%>
</td></tr></table>

<br>
<center>
<%if Request.Cookies("DisabledShowFace")="" then%>
<center><div style="OVERFLOW:hidden;WIDTH:120;">
<%Set UsersOnline=Conn.Execute("select TOP 1 LastTime From [BBSXP_UsersOnline] where Eremite=0 and UserName='"&Rs1("UserName")&"'")
if not UsersOnline.eof then%>
<img src='<%=Rs1("Userface")%>'alt='<%=Rs1("UserName")%> 在线' onload='javascript:if(this.width>120)this.width=120;if(this.height>120)this.height=120;'>
<%else%>
<img src='<%=Rs1("Userface")%>' alt='<%=Rs1("UserName")%> 离线' style='filter: Gray;' onload='javascript:if(this.width>120)this.width=120;if(this.height>120)this.height=120;'>
<%end if
Set UsersOnline=Nothing%>
</div></center>
<%end if%>
<!-----------------勋章插件开始----------------->
<align="center" style=margin-left:10;margin-top:0;margin-bottom:-12>
<%
if Conn.execute("select count(ID) from [BBSXP_Threads] where IsDel=0 and UserName='"&Rs1("UserName")&"' and PostTime>"&SqlNowString&"-30")(0)>19 then  Response.Write "<IMG src=Images/medal/zt.gif alt=皇者勋章>"
if Conn.execute("select count(ID) from [BBSXP_Posts"&PostsTableName&"] where IsTopic=0 and UserName='"&Rs1("UserName")&"' and PostTime>"&SqlNowString&"-30")(0)>99 then  Response.Write "<IMG src=Images/medal/ht.gif alt=龙王勋章>"
if Conn.execute("select count(ID) from [BBSXP_Threads] where IsGood>0 and UserName='"&Rs1("UserName")&"' and PostTime>"&SqlNowString&"-180")(0)>9 then  Response.Write "<IMG src=Images/medal/jh.gif alt=成就勋章>"
age=DateDiff("d",Rs1("UserRegTime"),now())
if age<1 then age=1
if Round(Rs1("UserRoleID")/age*30.5)>999 then Response.Write "<IMG src=Images/medal/hl.gif alt=活跃勋章>"
if Datediff("d",Rs1("UserLandTime"),Date())<4 then Response.Write "<IMG src=Images/medal/kq.gif alt=勤奋勋章>"
if Rs1("Consort")<>empty then
if Conn.execute("select count(ID) from [BBSXP_Threads] where IsDel=0 and UserName='"&Rs1("Consort")&"' and PostTime>"&SqlNowString&"-30")(0)>19 then  Response.Write "<IMG src=Images/medal/aq.gif alt=爱之勋章>"
end if
if Rs1("Consortia")<>empty then
On Error Resume Next
if Conn.execute("select UserName from [BBSXP_Consortia] where ConsortiaName='"&Rs1("Consortia")&"'")(0)=""&Rs1("UserName")&"" and Conn.execute("select count(ID) from [BBSXP_Users] where Consortia='"&Rs1("Consortia")&"'")(0)>9 then Response.Write "<IMG src=Images/medal/sj.gif alt=盟众勋章>"
end if
if (instr("|"&moderated&"|","|"&Rs1("UserName")&"|")>0 and moderated<>"" or Rs1("UserRoleID")<3) and Datediff("d",Rs1("UserLandTime"),Date())<2 then Response.Write "<IMG src=Images/medal/gl.gif alt=蓝金勋章>"
%><br>
<!-----------------勋章插件结束----------------->
<img src=<%=RankIconUrl%>>
</center>
<br>

<table border=0 width=80% align=center><tr><td>角色：</b><%if instr("|"&Moderated&"|","|"&Rs1("UserName")&"|") > 0 then%>版主
<%
else
response.write ShowRole(RS1("UserRoleID"))
end if
%><br>
	等级：<%=RankName%><br>
<%if Rs1("Consortia")<>"" then%>公会：<a target=_blank href="Consortia.asp?menu=look&ConsortiaName=<%=Rs1("Consortia")%>"><%=Rs1("Consortia")%></a><br><%end if%>
<%if Rs1("Consort")<>"" then%>配偶：<%=Rs1("Consort")%><br><%end if%>
	发帖：<%=Rs1("PostTopic")+Rs1("Postrevert")%><br>
	经验：<%=Rs1("experience")%><br>
	金币：<%=Rs1("UserMoney")%><br>
	魅力：<%=Rs1("Charm")%><br>
	泡点：<%ShowOnlineLeve(Rs1("Onlinetimes"))%><br>
	<a href="MyFriend.asp?menu=add&UserName=<%=Rs1("UserName")%>"><img src="Images/friend.gif" alt="加为好友" width="16" height="16" border="0" /></a>	<a href="Blog.asp?BlogUserName=<%=Rs1("UserName")%>"><img src="Images/home.gif" alt="看此人共享空间" width="16" height="16" border="0" /></a> <a href="Mailto:<%=Rs1("UserMail")%>"><img src="Images/email.gif" alt="发邮件" width="16" height="16" border="0" /></a> <a href="MyFriend.asp?menu=Post&incept=<%=Rs1("UserName")%>"><img src="Images/message.gif" alt="发短讯" width="16" height="16" border="0" /></a> <a href="ShowBBS.asp?menu=5&UserName=<%=Rs1("UserName")%>"><img src="Images/finds.gif" alt="搜索" width="16" height="16" border="0" /></a> <br>	
	信息:<a href="Profile.asp?UserName=<%=Rs1("UserName")%>"><img src="Images/kpost.gif" alt="嘿嘿,想偷看我的信息?" width="14" height="9" border="0" /></a> <a href="Profile.asp?UserName=<%=Rs1("UserName")%>">点击查看</a> <br />
	注册：<%=FormatDateTime(Rs1("UserRegTime"),1)%><br />	<a class=TextButton href='ReTopic.asp?ThreadID=<%=Rs("ThreadID")%>&PostID=<%=Rs("id")%>&quote=True' title='引用回复这个帖子'>
引用</a>
<a class=TextButton href='ReTopic.asp?ThreadID=<%=Rs("ThreadID")%>&PostID=<%=Rs("id")%>' title='回复帖子'>
回复</a><br />
<font color="red"><b>
</b></font></td>
</tr></table>



</td><td valign="top">
<table cellSpacing=0 cellPadding=0 border=0 width="100%" height="100%" style=TABLE-LAYOUT:fixed><tr>
<td align="left" width="40%"><font color=red><b>

<%
'----------------显示楼主开始----------------
if i+(pageCount-1)*pageSetup=1 then
response.write "<font color=red><b>楼主</b></font>"
else
response.write "第<b><font color=red>"
response.write i+(PageCount-1)*PageSetup
response.write "</font></b>楼"
end if
'----------------显示楼主结束----------------
%>
</b>
</font>  <b>Posted:</b><%=Rs("Posttime")%>&nbsp;&nbsp;<%if SiteSettings("DisplayPostIP")=1 then%><%=Rs("PostIP")%><%else%><a href=Manage.asp?menu=lookip&ThreadID=<%=Rs("ThreadID")%>&PostID=<%=Rs("id")%> title="已记录"><img src=images/ip.gif border=0></a><%end if%></td>


<tr vAlign=top height="1"><td colSpan=2><hr width=100%  SIZE=1></td></tr>
<tr>
<td colSpan=2 vAlign=top height="100%"><div style="OVERFLOW:auto;WIDTH:100%;">
<%
'----------------显示魔法表情和特殊贴修改----------------
if instr("|"&SiteSettings("BannedUserPost")&"|"&Request.Cookies("BadUserList")&"|","|"&Rs1("UserName")&"|")>0 then
%>
==============================<br>　　　<font color=RED>该用户帖子已被过滤　　　</font><br>==============================
<%else%>
<%if Rs("lock")=1 then%>
==============================<br>　　　<font color=RED>该用户帖子已被屏蔽　　　</font><br>==============================
<%else%>
<%content=UBBCode(Rs("content"))%>
<div style="OVERFLOW:auto;WIDTH:100%;"><b><%=Rs("Subject")%></b><br><br><%=mtface(content)%></div>
<%end if%>
<!------------永恒宠物中心------------->
<table border="0" width="20%" align="right" cellspacing="0" cellpadding="0">
 <tr>
  <td> 
<%
Set ShowPetStatus=New PetStatus
with ShowPetStatus
   
	.LetUserName=Rs1("UserName")
	.CheckPetExist
        if .OwnerPetExist=1 then
        .FormatPetData
        .ShowInTopic
   
End if
End with
Set ShowPetStatus=Nothing
%>
  </td>
 </tr>
</table>
<!------------永恒宠物中心------------->
<%
end if
'----------------显示魔法表情和特殊贴修改----------------
%>
</div>
<%if Rs1("UserSign")<>"" and Request.Cookies("DisabledShowSign")="" then%><br><br><hr width=25% SIZE=1 align=left><%=YbbEncode(Rs1("UserSign"))%><br>
<%end if%>
</td></tr>
</table>
</td></tr>
<tr class=a3><td align="center">

<!-----------------送鲜花和鸡蛋----------------->
<center><a href='shop.asp?menu=flowers&vs=<%=Rs1("UserName")%>' title='同意该贴观点，给<%=Rs1("UserName")%>送一朵鲜花'><img src=images/flowers.gif border=0 align='absmiddle'>鲜花</a>    <a href='shop.asp?menu=egg&vs=<%=Rs1("UserName")%>' title='不同意该贴观点，给<%=Rs1("UserName")%>扔一个鸡蛋'><img src=images/eggs.gif align='absmiddle' 给<%=Rs1("UserName")%>扔一个鸡蛋' border=0>鸡蛋</a></center></td>
<!-----------------送鲜花和鸡蛋----------------->

</td><td>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
	<tr>
		<td align="left" width="70%">
<!-----------------贴间广告----------------->
<script language=Javascript src=inc/PostAd.js></script>
<!-----------------贴间广告----------------->
		    </td>
		<td align="right" width="30%"><a class=TextButton href='EditPost.asp?ThreadID=<%=Rs("ThreadID")%>&PostID=<%=Rs("id")%>' title='编辑帖子'>
		编辑</a> <a class=TextButton href='DelPost.asp?ThreadID=<%=Rs("ThreadID")%>&PostID=<%=Rs("id")%>' title='删除帖子'>
		删除</a>
<%
'----------------屏贴----------------
if i+(PageCount-1)*PageSetup-1<>0 then
if Rs("lock")=0 then%>
<a class=TextButton href='Manage.asp?menu=IsLock&ThreadID=<%=Rs("ThreadID")%>&PostID=<%=Rs("id")%>' title='屏蔽帖子内容'>屏贴</a>
<%else%>
<a class=TextButton href='Manage.asp?menu=CanceLock&ThreadID=<%=Rs("ThreadID")%>&PostID=<%=Rs("id")%>' title='解除帖子屏蔽'>解屏</a>
<%end if
end if
'----------------屏贴----------------
%>
<a class=TextButton href='Manage1.asp?menu=flower&ThreadID=<%=Rs("ThreadID")%>&PostID=<%=Rs("id")%>' title='奖励帖子'>奖励</a> <a class=TextButton href='Manage1.asp?menu=pig&ThreadID=<%=Rs("ThreadID")%>&PostID=<%=Rs("id")%>' title='惩罚帖子'>惩罚</a>
            </td>
	</tr>
</table>
	</td></tr>

</table>
<div style='margin: 3px ;'></div>
<%
Set Rs1 = Nothing
Rs.MoveNext
loop
Rs.Close
act=topic
%>

<table cellspacing=0 cellpadding=0 border=0 width=100%>
<tr><td>
<%ShowPage()%>
</td><td align="right">

<a href="MyFavorites.asp?menu=add&url=<%=Server.URLEncode(""&Request.ServerVariables("script_name")&"?"&Request.ServerVariables("Query_String")&"")%>&name=<%=Topic%>">
收藏帖子</a> | <a href="MyFavorites.asp?menu=Del&url=<%=Server.URLEncode(""&Request.ServerVariables("script_name")&"?"&Request.ServerVariables("Query_String")&"")%>&name=<%=Topic%>">
取消收藏</a> | <a href="#">返回页首</a>&nbsp;</td></tr></table>

<script src="inc/mt.js" ></script>

<%if CookieUserName<>empty and IsLocked=0 then%>
<form name="form" method="POST" action="ReTopic.asp" onSubmit="return CheckForm(this);">
<input type="hidden" value="<%=ThreadID%>" name="ThreadID">
<input type="hidden" value="Re:<%=Topic%>" name="Subject">
<input name="content" type="hidden">

<table cellspacing=1 cellpadding=5 border=0 width=100% class=a2>
<tr class="a1"><td width="180"><b>快速回复主题</b></td><td><b>
	Re:<%=act%></b></td></tr>

<%if SiteSettings("EnableAntiSpamTextGenerateForPost")=1 then%>
<tr class="a3"><td height="3"><b>验证码</b></td><td>
<input name="VerifyCode" size="10"> <img src="VerifyCode.asp" title="验证码,看不清楚?请点击刷新验证码" style=cursor:pointer onclick="this.src='VerifyCode.asp'"></td></tr>
<%end if%>

<tr class="a3">
	<td rowspan="2" valign="top" height="100%">
<TABLE cellSpacing=0 cellPadding=0 width=100% align=Left border=0 height="100%">

<TR>
<TD vAlign=top align=Left width=100% class=a3><br><B>文章内容</B><BR>
（<a href="javascript:CheckLength();">查看内容长度</a>）

<BR>
<BR>

<INPUT id=DisableYBBCode name=DisableYBBCode type=checkbox value=1><label for=DisableYBBCode> 
禁用YBB代码</label><br>
</TD></TR>
</TABLE>

	<td height=200>

<SCRIPT src="inc/Post.js"></SCRIPT></td></tr><tr class=a3>
			<td>
<INPUT type=submit value=" 回复 " name=EditSubmit>　<input type="Button" value=" 预览 " onclick="Preview()">　<INPUT onclick="history.back()" type="button" value=" 取消 ">
</TD></TR></FORM>
</TABLE>
<form name=preview action=preview.asp method=post target=preview_page><input name="content" type="hidden"></form>

<%
end if

if PermissionsManage=1 then
response.write "<br><table cellspacing=0 cellpadding=0 width=100% align=center border=0><tr><td align=center>管理选项: <a href=Manage.asp?menu=MoveNew&ThreadID="&ThreadID&">拉前主题</a> | "
if IsLocked=1 then
response.write "<a href=Manage.asp?menu=DelIsLocked&ThreadID="&ThreadID&">解锁主题</a>"
else
response.write "<a href=Manage.asp?menu=IsLocked&ThreadID="&ThreadID&">锁定主题</a>"
end if
response.write " | "
if IsTop=2 then
response.write "<a href=Manage.asp?menu=untop&ThreadID="&ThreadID&">取消总置顶</a>"
else
response.write "<a href=Manage.asp?menu=top&ThreadID="&ThreadID&">主题总置顶</a>"
end if
response.write " | "
if IsTop=1 then
response.write "<a href=Manage.asp?menu=DelIsTop&ThreadID="&ThreadID&">取消置顶</a>"
else
response.write "<a href=Manage.asp?menu=IsTop&ThreadID="&ThreadID&">主题置顶</a>"
end if
response.write " | "
if IsGood=1 then
response.write "<a href=Manage.asp?menu=DelIsGood&ThreadID="&ThreadID&">取消精华帖</a>"
else
response.write "<a href=Manage.asp?menu=IsGood&ThreadID="&ThreadID&">加为精华帖</a>"
end if

response.write "| <a href=Move.asp?ThreadID="&ThreadID&">移动主题</a>| <a title='修复帖子的回复数' href=Manage.asp?menu=Fix&ThreadID="&ThreadID&">修复主题</a></td></tr></table>"
end if

%><!-- #include file="inc/line.asp" --></div>
<%
Conn.execute("update [BBSXP_Threads] set Views=Views+1,LastViewedDate="&SqlNowString&" where ID="&ThreadID&"")
htmlend
%>