⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 recycle.asp

📁 现在好了
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<!--#include file="conn.asp"-->
<!-- #include file="inc/const.asp" -->
<!-- #include file="inc/dv_ubbcode.asp" -->
<%
Dvbbs.Loadtemplates("")
Dim AllPostTable,AllPostTableName,i,sql,Rs
AllPostTable1
AllPostTableName=Split(AllPostTableName,"|")
AllPostTable=Split(AllPostTable,"|")
Dim NowUseBbs
NowUseBbs=Dvbbs.NowUseBbs
Function AllPostTable1()
	Dim Trs
	Set Trs=Dvbbs.Execute("select * from [Dv_TableList]")
	AllPostTable=""
	Do While Not TRs.EOF
		If AllPostTable=""  Then 
			AllPostTable=TRs("TableName")
			AllPostTableName=TRs("TableType")
		Else
			AllPostTable=AllPostTable&"|"&TRs("TableName")
			AllPostTableName=AllPostTableName&"|"&TRs("TableType")
		End If
	TRs.MoveNext
	Loop 
	Trs.Close 
	
End Function 
Rem 修改记录:2004-5-3 行396 Dvbbs.YangZheng
Server.ScriptTimeOut=999999
dim bBoardEmpty
dim totalrec
dim n,RowCount
dim p
dim currentpage,page_count,Pcount
dim tablename
Dvbbs.stats="论坛回收站"
Dvbbs.nav()
If Not Dvbbs.master Then Response.redirect "showerr.asp?ErrCodes=<li>您没有权限浏览本页。&action=OtherErr"
Dvbbs.ShowErr()
Dvbbs.Head_var 2,0,"",""
Dim EmotPath
EmotPath=Split(Dvbbs.Forum_emot,"|||")(0)
Dim dv_ubb,abgcolor
Set dv_ubb=new Dvbbs_UbbCode
dv_ubb.PostType=2
If Request("reaction")="manage" Then
	dim topicid
	Dim trs,UpdateBoardID
	Dim fixid
	Manage_Main()
ElseIf Request("reaction")="view" Then
	View()
Else
	Main()
End If

Call Dvbbs.activeonline()
call Dvbbs.footer()

Sub Main()
	currentPage=request("page")
	If currentpage="" or not IsNumerIc(currentpage) Then
		currentpage=1
	Else
		currentpage=clng(currentpage)
	End If
	call AnnounceList1()
	call listPages3()
End Sub

Sub Manage_Main()
	topicid=replace(request("topicid"),"'","")
	topicid=replace(topicid,";","")
	topicid=replace(topicid,"--","")
	If request("action")<>"清空回收站" Then
		If topicid="" or IsNull(topicid) Then
			Response.redirect "showerr.asp?ErrCodes=<li>请选择相关帖子后进行操作。&action=OtherErr"
		End If
		fixid=replace(topicid,",","")
		fixid=Trim(replace(fixid," ",""))
		If Not IsNumeric(fixid) Then
			Response.redirect "showerr.asp?ErrCodes=<li>参数错误&action=OtherErr"
		End If
	End If 
	If request("tablename")="dv_topic" Then 
		tablename="dv_topic"
	ElseIf InStr(request("tablename"),"bbs")>0 Then
		tablename=Trim(request("tablename"))
		If Len(tablename)>8 Then
			Response.redirect "showerr.asp?ErrCodes=<li>错误的系统参数!&action=OtherErr"
		End If
	Else
		Response.redirect "showerr.asp?ErrCodes=<li>错误的系统参数!&action=OtherErr"
	End If

	If request("action")="删除" Then 
		call delete()
	ElseIf request("action")="还原" Then 
		call redel()
	ElseIf  request("action")="清空回收站" Then
		call Alldel()
	Else
		Response.redirect "showerr.asp?ErrCodes=<li>请指定所需参数。&action=OtherErr"
	End If
End Sub

Sub View()
	dim AnnounceID
	dim username
	If  request("id")="" Then
		Response.redirect "showerr.asp?ErrCodes=<li>请指定所需参数。&action=OtherErr"
	ElseIf Not IsNumeric(request("id")) Then
		Response.redirect "showerr.asp?ErrCodes=<li>请指定所需参数。&action=OtherErr"
	Else
		AnnounceID=request("id")
	End If
	tablename=Trim(request("tablename"))
	If Len(tablename)>8 Then
		Response.redirect "showerr.asp?ErrCodes=<li>请指定所需参数。&action=OtherErr"
	End If
	Set Rs=server.createobject("adodb.recordset")
	If InStr(tablename,"bbs")>0 Then
		sql="select Announceid,topic,body,username,dateandtime from "&replace(tablename,"'","")&" where AnnounceID="&AnnounceID
		tablename=request("tablename")
	Else
		sql="select topicid,title,title as body,postusername,dateandtime,posttable from dv_topic where topicID="&AnnounceID
		tablename="dv_topic"
	End  If
	If Not IsObject(Conn) Then ConnectionDatabase
	rs.open sql,conn,1,1
	If rs.eof and rs.bof Then
		Response.redirect "showerr.asp?ErrCodes=<li>没有找到相关信息&action=OtherErr"
	Else 
%>

<table cellpadding=3 cellspacing=1 border=0 align=center class=tableborder1>
<TBODY> 
<TR align=middle> 
<Th height=24><%=Dvbbs.htmlencode(rs(1))%></Th>
</TR>
<TR> 
<TD height=24 class=tablebody1>
<p align=center><a href="dispuser.asp?name=<%=Dvbbs.htmlencode(rs(3))%>" target=_blank><%=Dvbbs.htmlencode(rs(3))%></a> 发布于 <%=rs(4)%></p>
    <blockquote>   
      <br>   
<%
'shinzeal允许在回收站浏览中察看主题帖子内容
if tablename="dv_topic" then
dim rrs
Set rrs=Dvbbs.Execute("select body from "&rs("posttable")&" where rootID="&rs("topicid")&"")
response.Write dv_ubb.Dv_UbbCode(rrs(0),1,2,1)
set rrs=nothing
else
response.Write dv_ubb.Dv_UbbCode(rs(2),1,2,1)
end if%>
    </blockquote>
</TD>
</TR>
<TR align=middle> 
<TD height=24 class=tablebody2><a href="recycle.asp?reaction=manage&TopicID=<%=rs(0)%>&action=删除&tablename=<%=tablename%>">『 直接删除 』</a></TD>
</TR>
</TBODY>
</TABLE>
    </td>
  </tr>
</table>
<%
End If
rs.close
Set rs=nothing
End Sub

Sub AnnounceList1()
	response.write "<table cellpadding=0 cellspacing=0 border=0 width="&Dvbbs.mainsetting(0)&" align=center><tr>"&_
	"<td align=center width=2 valign=middle> </td>"&_
	"<td align=left valign=middle> 本页面只有系统管理员可进行操作,请选择需要的操作,列出所有:<a href=?tablename=dv_topic>主题表数据</a>"
	For i=0 to ubound(allposttable)
	response.write " | <a href=?tablename="&allposttable(i)&">帖子"&allposttablename(i)&"</a>"
	Next
	response.write "<BR><BR>注意:还原主题表数据将连跟贴(帖子)表数据一起还原,删除主题表数据将连跟帖(帖子)表一起删除</td>"&_
	"<td align=right> </td></tr></table><BR>"
	
		If instr(lcase(request("tablename")),"bbs")>0 then
			sql="select AnnounceID,boardID,UserName,Topic,body,DateAndTime from "&replace(request("tablename"),"'","")&" where boardid=444 and not parentid=0 order by announceid desc"
			tablename=request("tablename")
		Else
	 		sql="select topicID,boardID,PostUserName,Title,title as body,DateAndTime from dv_topic where boardid=444 order by topicid desc"
			tablename="dv_topic"
	End If 
	set rs=server.createobject("adodb.recordset")
	If Not IsObject(Conn) Then ConnectionDatabase
	rs.open sql,conn,1,1
	if rs.bof and rs.eof then
		'论坛无内容
		call showEmptyBoard1()
	else
		rs.PageSize = cint(Dvbbs.Forum_Setting(11))
		rs.AbsolutePage=currentpage
		page_count=0
  	    	totalrec=rs.recordcount
		call showPageList1() 
	end if
End sub
	
	
Rem 显示贴子列表	
Sub showPageList1()
	dim body
	dim vrs
	dim votenum,votenum_1
	dim pnum
	i=0
	response.write "<form name=recycle action=recycle.asp?reaction=manage method=post><input type=hidden value="&tablename&" name=tablename>"&_
				"<TABLE cellPadding=1 cellSpacing=1 align=center class=tableborder1>"&_
  				"<TBODY>"&_
				"<TR align=middle>"&_
				"<Th height=25 width=32>状态</Th>"&_ 
				"<Th width=*>主 题</Th>"&_
				"<Th width=80>作 者</Th>"&_
				"<Th width=195>最后更新 | 回复人</Th>"&_
				"</TR>"
	While (not rs.eof) and (not page_count = rs.PageSize)
	response.write "<TR align=middle>"&_
				"<TD class=tablebody2 width=32 height=27>"

	response.write "<input type=checkbox name=topicid value="&rs(0)&">"

	response.write "</TD>"&_
				"<TD align=left class=tablebody1 width=*>"

	body=replace(replace(Dvbbs.htmlencode(left(rs(4),20)),"<BR>",""),"</P><P>","")
	
	response.write "<a href=""?reaction=view&id="&rs(0)&"&tablename="&tablename&""">"
	if rs(3)="" or isnull(rs(3)) then
		response.write body
	else
		if len(rs(3))>26 then
			response.write ""&left(Dvbbs.htmlencode(rs(3)),26)&"..."
		else
			response.write Dvbbs.htmlencode(rs(3))
		end if
	end if
	response.write "</a>"

	response.write "</TD>"&_
	"<TD class=tablebody2 width=80><a href=dispuser.asp?name="& rs(2) &">"& rs(2) &"</a></TD>"

	response.write "<TD align=left class=tablebody1 width=195>&nbsp;"

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -