<!-- #include file="Setup.asp" -->
<%
if CookieUserName=empty then error2("请登录后再进行操作！")

CheckPOST

top

PostID=int(Request("PostID"))
ThreadID=int(Request("ThreadID"))
sql="Select * From [BBSXP_Threads] where ID="&ThreadID&""
Rs.Open sql,Conn,1
if Rs.eof then error"<li>系统不存在该帖子的资料"
ForumID=Rs("ForumID")
PostsTableName=Rs("PostsTableName")
UserName=Rs("UserName")
ThreadID=Rs("id")
Replies=Rs("Replies")
Rs.close
Moderated=Conn.Execute("Select Moderated From [BBSXP_Forums] where id="&ForumID&" ")(0)
%>
<!-- #include file="inc/ForumPermissions.asp" -->
<%if PermissionsManage=0 then error("<li>您的<a href=ShowForumPermissions.asp?ForumID="&ForumID&">权限</a>不够")


select case Request("menu")
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
case "top"
if BestRole = 1 then
Conn.execute("update [BBSXP_Threads] set IsTop=2 where id="&ThreadID&"")
succtitle="总置顶主题成功"
else
error("<li>您的权限不够")
end if
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
case "untop"
if BestRole = 1 then
Conn.execute("update [BBSXP_Threads] set IsTop=0 where id="&ThreadID&"")
succtitle="取消总置顶主题成功"
else
error("<li>您的权限不够")
end if
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
case "Fix"
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&"")
succtitle="修复主题成功"
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
case "MoveNew"
Conn.execute("update [BBSXP_Threads] set lasttime="&SqlNowString&" where id="&ThreadID&"")
succtitle="拉前主题成功"
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
case "Move"
AimForumID=int(Request("AimForumID"))
if AimForumID="" then error("<li>您没有选择要将主题移动哪个论坛")
Conn.execute("update [BBSXP_Threads] set ForumID="&AimForumID&",IsTop=0,IsGood=0,IsLocked=0 where id="&ThreadID&"")
succtitle="移动主题成功"
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
case "IsGood"
if Conn.Execute("Select IsGood From [BBSXP_Threads] where id="&ThreadID&" ")(0)=1 then error("<li>此帖子已经加入精华区了，无需重复添加")
Conn.execute("update [BBSXP_Threads] set IsGood=1 where id="&ThreadID&"")
Conn.execute("update [BBSXP_Users] set goodTopic=goodTopic+1,UserMoney=UserMoney+"&SiteSettings("IntegralAddValuedPost")&",experience=experience+"&SiteSettings("IntegralAddValuedPost")&" where UserName='"&UserName&"'")
succtitle="加为精华帖成功"
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
case "DelIsGood"
if Conn.Execute("Select IsGood From [BBSXP_Threads] where id="&ThreadID&" ")(0)=0 then error("<li>此帖子已经移出精华区了")
Conn.execute("update [BBSXP_Threads] set IsGood=0 where id="&ThreadID&"")
Conn.execute("update [BBSXP_Users] set goodTopic=goodTopic-1,UserMoney=UserMoney+"&SiteSettings("IntegralDeleteValuedPost")&",experience=experience+"&SiteSettings("IntegralDeleteValuedPost")&" where UserName='"&UserName&"'")
succtitle="取消精华帖成功"
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
case "IsTop"
Conn.execute("update [BBSXP_Threads] set IsTop=1 where id="&ThreadID&"")
succtitle="置顶主题成功"
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
case "DelIsTop"
Conn.execute("update [BBSXP_Threads] set IsTop=0 where id="&ThreadID&"")
succtitle="取消置顶主题成功"
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
case "IsLocked"
Conn.execute("update [BBSXP_Threads] set IsLocked=1 where id="&ThreadID&"")
succtitle="锁定主题成功"
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
case "DelIsLocked"
Conn.execute("update [BBSXP_Threads] set IsLocked=0 where id="&ThreadID&"")
succtitle="解锁主题成功"
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
case "IsLock"
Conn.execute("update [BBSXP_Posts"&PostsTableName&"] set Lock=1 where id="&PostID&"")
succtitle="屏蔽帖子成功"
succtitle=succtitle&"<li><a href=ShowPost.asp?ThreadID="&ThreadID&">返回帖子</a>"
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
case "CanceLock"
Conn.execute("update [BBSXP_Posts"&PostsTableName&"] set Lock=0 where id="&PostID&"")
succtitle="解除屏蔽成功"
succtitle=succtitle&"<li><a href=ShowPost.asp?ThreadID="&ThreadID&">返回帖子</a>"
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
case "lookip"
sql="Select * From [BBSXP_Posts"&PostsTableName&"] where id="&PostID&""
Rs.Open sql,Conn,1
UserName=Rs("UserName")
Posttime=Rs("Posttime")
Postip=Rs("Postip")
Rs.close
%>
<div class="mainnav">
<table cellspacing=1 cellpadding=5 border=0 width=100% class=a2>
<tr class=a3>
<td>&nbsp;<img src=images/Forum_nav.gif>&nbsp; <%ClubTree%> → 查看IP</td>
</tr>
</table>
<br>
<table cellspacing=1 cellpadding=5 border=0 width=100% class=a2>
<tr>
<td align="center" class=a1 colspan="2">
查看IP
</td></tr><tr>
<td width="40%" valign="top" align="right" class=a3>
用户名：</td>
<td valign="top" class=a3>
<%=UserName%></td></tr><tr>
<td width="40%" valign="top" align="right" class=a3>
时间：</td>
<td valign="top" class=a3>
<%=Posttime%></td></tr><tr>
<td width="40%" valign="top" align="right" class=a3>
IP地址：</td>
<td valign="top" class=a3>
<%=Postip%></td></tr></table></div>

<br>
<center>
<a href=ShowPost.asp?ThreadID=<%=ThreadID%>>BACK</a><br>
<%
htmlend

'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
end select
if succtitle="" then error("<li>无效命令")

Log(""&succtitle&"，主题ID："&ThreadID&"")

Message="<li>"&succtitle&"<li><a href=ShowForum.asp?ForumID="&ForumID&">返回论坛</a><li><a href=Default.asp>返回社区首页</a>"
succeed(""&Message&"<meta http-equiv=refresh content=3;url=ShowForum.asp?ForumID="&ForumID&">")
%>