📄 recycle.asp
字号:
<!--#include file="up.asp"--><a id=menu0></a><%
set cjbz=myconn.execute("select name from admin where name='"&lgname&"' and password='"&lgpwd&"' and bd='70767766'")
if cjbz.eof then
set cjbz=nothing
response.end
end if
response.write"<body topMargin=0><link rel=stylesheet type=text/css href=css.css><script language='javascript'>function openscript1(url, width, height){var Win = window.open(url,'open','width=' + width + ',height=' + height + ',resizable=1,scrollbars=yes,menubar=no,status=yes' );}function Check(){var Name=document.form1.topage.value;document.location='?totable="&totable&"&topage='+Name+'';}</script>"
totable=request.querystring("totable")
menu=request.querystring("menu")
select case menu
case""%><%
alltb=alltable
atb=split(alltb,"|")
tnum=ubound(atb)%>
<SCRIPT language=JavaScript>
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;
}
}
</SCRIPT>
<div align="center">
<center>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="<%=c1%>" width="98%" height="28">
<tr>
<td width="100%">·<%for i=0 to tnum
color="#000000"
if int(atb(i))=int(totable) then color=""&c2&""%><a href="?totable=<%=atb(i)%>"><font color=<%=color%>>数据表<%=atb(i)%></font></a>·<%next%></td>
</tr>
</table>
</center>
</div><%dim rs
dim sql
on error resume next
set rs = server.createobject("adodb.recordset")
sql = "select * from bbs"&totable&" where type=5 order by bbsid desc"
count=myconn.execute("select count(bbsid)from bbs"&totable&" where type=5")(0)
href1=" <a href=?topage=1&totable="&totable&">"
pagesetup=20
rs.Open sql,myConn,1
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
%>
<form name="form" method="POST" action="recycle.asp?menu=any&totable=<%=totable%>">
<div align=center><center>
<table bgcolor=<%=c2%> border=1 cellpadding=0 cellspacing=0 style="border-collapse:collapse; border-left-width:1px; border-right-width:1px; border-top-width:1px" bordercolor=<%=c1%> width="98%" id=AutoNumber5 height="27">
<tr>
<td width=4% align=center background="pic/<%=sp%>3.gif">
<b><font color="#FFFFFF">选 择</font></b></td>
<td width=42% align=center background="pic/<%=sp%>3.gif">
<b><font color="#FFFFFF">主 题</font><font color="#FFFFFF"> ( 点小图标在新窗口浏览 )</font></b></td>
<td width=9% align=center background="pic/<%=sp%>3.gif"><b><font color="#FFFFFF">作 者</font></b></td>
<td width=16% align=center background="pic/<%=sp%>3.gif">
<b><font color="#FFFFFF">发表时间</font></b></td></tr></table></center></div>
<%i=1
do while not rs.eof
tltl=left(rs("body"),20)
rrzz=rs("zhuti")
formname="zhuti"
value=rs("id")&"|"&rs("bd")
if rs("bid")<>0 then
set las=myconn.execute("select top 1 id,zhuti,bid from bbs"&totable&" where id="&rs("bid")&" order by id")
rrzz="RE:"&las("zhuti")
set las=nothing
formname="huitie"
value=rs("bbsid")&"|"&rs("bid")&"|"&rs("bd")
end if
response.write"<div align=center><center><table class=list border=1 cellpadding=0 cellspacing=0 style='border-collapse:collapse; border-left-width:1px; border-right-width:1px; border-top-width:1px' bordercolor="&c1&" width=98% id=AutoNumber5 height=27><tr><td width=4% align=center background=pic/"&sp&"3.gif>"&_
"<input type=checkbox name="&formname&" value='"&value&"'></td><td width=42% align=left onmouseover=javascript:this.bgColor='#fafafa' onmouseout=javascript:this.bgColor=''> <a href=javascript:openscript1('recycle.asp?id="&rs("bbsid")&"&bd="&rs("bd")&"&totable="&totable&"&menu=look',600,400) title="&tltl&">"&LeftTrue(rrzz,44)&"</a></td><td width=9% align=center>"&kbbs(rs("name"))&"</td><td width=16% align=center>"&rs("riqi")&"</td></tr></table></center></div>"
i=i+1
if i>pagesetup then exit do
rs.movenext
loop
rs.Close
%>
<div align=center><center>
<table bgcolor=#fafafa border=1 cellpadding=0 cellspacing=0 style="border-collapse:collapse; border-left-width:1px; border-right-width:1px; border-top-width:1px" bordercolor=<%=c1%> width="98%" id=AutoNumber5 height="30">
<tr>
<td> <input onclick=CheckAll(this.form) type="checkbox" name="chkall" value="ON">全部选中
<input type="submit" value=" 删除所选 " name="action">
<input type="submit" value=" 还原所选 " name="action"></td>
</tr></table></center></div>
</form>
<div align="center">
<center>
<TABLE bgcolor=<%=c2%> borderColor=<%=c1%> cellSpacing=0 cellPadding=0 width="98%" border=1 style="border-collapse: collapse; border-left-width: 1px; border-right-width: 1px; border-top-width: 1px">
<TBODY>
<TR height=25>
<TD height=2>
<TABLE cellSpacing=0 cellPadding=3 width="100%" border=0 background="pic/<%=sp%>3.gif" style="border-collapse: collapse; border-left-width:0; border-top-width:0; border-bottom-width:0">
<TBODY>
<TR>
<TD><b><font color="#FFFFFF"> <img border="0" src="pic/fl.gif"> 回收站共有</font><font color="#00FFFF"> <%=TotalPage%> </font><font color="#FFFFFF">页,<font color="#00FFFF"> <%=count%> </font>个话题,每页有<font color="#00FFFF"> <%=pagesetup%> </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 ""&href1&"<font color=yellow>1</font></a> ... "
end if
for i=ii to iii
If i<>PageCount then
href2=" <a href=?topage="& i &"&totable="&totable&">"
href3="<a href=?topage="&TotalPage&"&totable="&totable&">"
Response.Write ""&href2&"<font color=yellow>" & i & "</font></a> "
else
Response.Write " <font color=red><b>"&i&"</b></font> "
end if
next
if TotalPage > PageCount+5 then
Response.Write " ... "&href3&"<font color=yellow>"&TotalPage&"</font></a>"
end if
%> ]</font></b></TD>
<form name=form1 method="POST" action=javascript:Check()>
<TD height=2 align="right"><font color="#FFFFFF">页码:<input style=FONT-SIZE:9pt maxLength="6" size="6" name="topage" value="<%=PageCount%>">
<input style=FONT-SIZE:9pt value="GO!" type="submit"></font></TD></form>
</TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
</center>
</div><br><!--#include file="down.asp"-->
<%case"look"%><!--#include file="ubbcode.asp"-->
<%
totable=request.querystring("totable")
bbsid=request.querystring("id")
set look=myconn.execute("select body,name,riqi,id,bid from bbs"&totable&" where bbsid="&bbsid&"")
if look.eof then
response.write"<script>alert('该帖不存在或者已经被永久删除')</script><script>window.close();</script>"
response.end
end if
body=look("body")
name=look("name")
riqi=look("riqi")
tieid=look("id")
bid=look("bid")
set look=nothing
%><title>回收站</title><div align="center"><center><table border="1" cellpadding="0" cellspacing="0" style="TABLE-LAYOUT: fixed; WORD-BREAK: break-all; border-collapse:collapse;" bordercolor="<%=c1%>" width="98%">
<tr>
<td width="102%" colspan="3" height="24" bgcolor="<%=c1%>" background="pic/<%=sp%>3.gif">
<font color="#FFFFFF"> 帖子作者:<%=kbbs(name)%>
发表时间:<%=riqi%></font></td></tr>
<tr><td width="102%" colspan="3">
<blockquote>
<p style="line-height: 120%; margin: 5"><%=ubb(body)%> </p>
</blockquote>
</td>
</tr>
<tr><td width="33%" height="25" align="center">
<a href=# onclick="window.close();"><img border="0" src="pic/fl.gif"><a href="?menu=del&bbsid=<%=bbsid%>&tieid=<%=tieid%>&totable=<%=totable%>">
永久删除</a></td>
<td width="33%" height="25" align="center">
<a href="?menu=hy&bbsid=<%=bbsid%>&tieid=<%=tieid%>&upid=<%=bid%>&totable=<%=totable%>&bd=<%=bd%>">
<img border="0" src="pic/fl.gif"> 还原帖子</a></td>
<td width="34%" align="center">
<a href=# onclick="window.close();"><img border="0" src="pic/fl.gif"> 关闭窗口</td>
</tr>
</table>
</center>
</div>
<%case"del"%>
<!--#include file="conn.asp"-->
<%
bbsid=request.querystring("bbsid")
tieid=request.querystring("tieid")
if tieid=0 then
sql="delete*from bbs"&totable&" where bbsid="&bbsid&""
else
myconn.execute("delete*from bbstl where id="&tieid&"")
myconn.execute("delete*from vote where id="&tieid&"")
myconn.execute("delete*from voted where id="&tieid&"")
sql="delete*from bbs"&totable&" where bbsid="&bbsid&" or bid="&tieid&""
end if
myconn.execute(sql)
%><title>删除帖子</title>
<div align="center"><center><table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="<%=c1%>" width="98%">
<tr>
<td width="100%" height="24" align="center" background="pic/<%=sp%>3.gif">
<font color="#FFFFFF"><b>删除帖子</b></font></td></tr>
<tr>
<td width="100%" height="48" align="center">
<p style="line-height: 200%; margin: 6">删除帖子成功!<br><a href=# onclick="window.close();"><img border="0" src="pic/fl.gif"> 关闭窗口</a></td></tr>
</table>
</center>
</div>
<%case"hy"
bbsid=request.querystring("bbsid")
tieid=request.querystring("tieid")
upid=request.querystring("upid")
bd=request.querystring("bd")
mes="还原帖子成功!"
if tieid<>0 then
myconn.execute("update [bbsinfo] set topicnum=topicnum+1,bbsnum=bbsnum+1")
myconn.execute("update [bbstl] set type=0,bnum=0 where id="&tieid&"")
myconn.execute("update [bbs"&totable&"] set type=0,bnum=0 where id="&tieid&"")
myconn.execute("update [bdinfo] set bbsnum=bbsnum+1 where bn="&bd&" and key<>'0'")
end if
if tieid=0 then
set rs=myconn.execute("select top 1 id from bbstl where id="&upid&" and type<>5")
if rs.eof then
mes="找不到原帖,不能还原帖子!"
else
myconn.execute("update [bdinfo] set bbsnum=bbsnum+1 where bn="&bd&" and key<>'0'")
myconn.execute("update [bbsinfo] set bbsnum=bbsnum+1")
myconn.execute("update [bbstl] set type=0,bnum=bnum+1 where id="&upid&"")
myconn.execute("update [bbs"&totable&"] set type=0,bnum=bnum+1 where id="&upid&"")
myconn.execute("update [bbs"&totable&"] set type=0 where bbsid="&bbsid&"")
end if
set rs=nothing
end if
%>
<title>还原帖子</title>
<div align="center"><center><table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="<%=c1%>" width="98%">
<tr>
<td width="100%" height="24" align="center" background="pic/<%=sp%>3.gif">
<font color="#FFFFFF"><b>还原帖子</b></font></td></tr>
<tr>
<td width="100%" height="48" align="center">
<p style="line-height: 200%; margin: 6"><%=mes%><br><a href=# onclick="window.close();"><img border="0" src="pic/fl.gif"> 关闭窗口</a></td></tr>
</table>
</center>
</div>
<%case"any"
zhuti=request.form("zhuti")
huitie=request.form("huitie")
action=request.form("action")
zhuti=split(zhuti,",")
znum=ubound(zhuti)
huitie=split(huitie,",")
hnum=ubound(huitie)
if action=" 删除所选 " then
for i=0 to znum
htid=split(zhuti(i),"|")
myconn.execute("delete*from bbs"&totable&" where id="&htid(0)&" or bid="&htid(0)&"")
myconn.execute("delete*from bbstl where id="&htid(0)&"")
myconn.execute("delete*from vote where id="&htid(0)&"")
myconn.execute("delete*from voted where id="&htid(0)&"")
next
for i=0 to hnum
htid=split(huitie(i),"|")
myconn.execute("delete*from bbs"&totable&" where bbsid="&htid(0)&"")
next
end if
if action=" 还原所选 " then
for i=0 to znum
htid=split(zhuti(i),"|")
myconn.execute("update [bdinfo] set bbsnum=bbsnum+1 where bn="&htid(1)&" and key<>'0'")
myconn.execute("update [bbs"&totable&"] set bnum=0,type=0 where id="&htid(0)&"")
myconn.execute("update bbstl set bnum=0,type=0 where id="&htid(0)&"")
myconn.execute("update [bbsinfo] set topicnum=topicnum+1,bbsnum=bbsnum+1")
next
end if
for i=0 to hnum
htid=split(huitie(i),"|")
set rs=myconn.execute("select top 1 id from bbstl where id="&htid(1)&" and type<>5")
if not rs.eof then
myconn.execute("update [bdinfo] set bbsnum=bbsnum+1 where bn="&htid(2)&" and key<>'0'")
myconn.execute("update bbsinfo set bbsnum=bbsnum+1")
myconn.execute("update [bbs"&totable&"] set bnum=bnum+1 where id="&htid(1)&"")
myconn.execute("update [bbstl] set bnum=bnum+1 where id="&htid(1)&"")
myconn.execute("update [bbs"&totable&"] set type=0 where bbsid="&htid(0)&"")
end if
set rs=nothing
next
response.redirect"?totable="&totable&""
%>
<%end select%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -