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

📄 adminrecycled.asp

📁 程序网络论坛HigroupBBS v4.00 默认管理员帐号密码都是Marcos
💻 ASP
字号:
<div id='dypopLayer' style='position:absolute;z-index:1000;' class='cPopText'></div>
<!--#include file="MarcosCB.asp"-->
<style>
<%=skinCss%>
</style> 
<script language=javascript src="MarcosJS.js"></script>
<body>
<%
	getConn()
	isIn()
	isAdmin()
%>
<table width="600" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="<%=borderColor%>">
  <form method="post">
  <tr> 
    <td height="22" colspan="5" align="center" class="tr">系统回收站管理&nbsp;&nbsp;<a href="?theAct=showTopic">主题|</a><a href="?theAct=showReply">回复|</a></td>
  </tr>
  <tr class="td"> 
    <td align="center">ID</td>
    <td height="22" align="center">标题</td>
    <td height="22" align="center">作者</td>
    <td height="22" align="center">添加时间</td>
    <td height="22" align="center">回收时间</td>
  </tr>
  <%
	dim i,page,theAct,isTopic,theAction
	page=getPost("page")
	theAct=getPost("theAct")
	isTopic=getPost("isTopic")
	theAction=getPost("theAction")
	
	if not isNumeric(page) then
		page=1
	end if

	if isTopic="True" then
		tableName="Marcos_Topic"
		colsName="topicId"
	 else
		tableName="Marcos_Reply"
		colsName="replyId"
	end if
	
	select case theAction
		case "del"
			for i=1 to request.form("theId").count
				theId=theId&","&request.form("theId")(i)
			next
			if theId<>"" then
				theId=mid(theId,2)
				sql="delete from "&tableName&" where isRecycled=true and "&colsName&" in("&theId&")"
				conn.execute(sql)
			end if
			locate "adminRecycled.asp?theAct="&theAct&"&page="&page
		case "recover"
			for i=1 to request.form("theId").count
				theId=theId&","&request.form("theId")(i)
			next
			if theId<>"" then
				theId=mid(theId,2)
			end if
			if tableName="Marcos_Reply" then
				echo "<script>alert('对不起,回复还原请到原主题!');history.back();</script>"
				closeConn()
				response.end
			 else
				 for i=1 to request.form("theId").count
					 topicId=trim(request.form("theId")(i))
					sql="select boardId,replyCount from Marcos_Topic where topicId="&topicId
					set rs_sys=conn.execute(sql)
					conn.execute("update Marcos_Board set topicCount=topicCount+1,replyCount=replyCount+"&rs_sys(1)&" where boardId="&rs_sys(0))
					conn.execute("update Marcos_Topic set isRecycled=false where topicId="&topicId)
				next
			end if
			locate "adminRecycled.asp?theAct="&theAct&"&page="&page
	end select
	
	select case theAct
		case "showTopic",""
			sql="select topicMood,topicTitle,topicContent,addTime,recycleTime,boardId,topicId,userName from Marcos_Topic where isRecycled=true order by recycleTime desc"
			isTopic=true
		case "showReply"
			sql="select replyMood,replyTitle,replyContent,replyTime,Marcos_Reply.recycleTime,Marcos_Topic.boardId,Marcos_Reply.topicId,Marcos_Reply.userName,Marcos_Reply.replyId from Marcos_Reply,Marcos_Topic where Marcos_Reply.isRecycled=true and Marcos_Topic.topicId=Marcos_Reply.topicId order by Marcos_Reply.recycleTime desc"
			isTopic=false
	end select

	rs.open sql,conn,1,1
	rs.pagesize=listNum
	if not rs.eof then
		rs.absolutePage=page
	end if
	for i=1 to rs.pageSize
		if rs.eof then
			exit for
		end if
		theTitle=fixNull(rs(1))
		if theTitle="" then
			if len(rs(2))>18 then
				theTitle=left(rs(2),18)&".."
			 else
				theTitle=rs(2)
			end if
		 else
			if len(theTitle)>18 then
				theTitle=left(theTitle,18)&".."
			end if
		end if
		theContent="正文:<br>"&replace(enCode(rs(2)),vbNewLine,"<br>")
		if len(theContent)>236 then
			theContent=left(theContent,236)&".."
		end if
		theLink="topicShow.asp?boardId="&rs(5)&"&topicId="&rs(6)
		theTitle="<a href="""&theLink&""" target=_blank><img src="""&rs(0)&""" border=0><a href="""&theLink&""" title="""&theContent&""">"&theTitle&"</a>"
		theTitle=replace(theTitle,"{$styleRoot}","001")
		if theAct="showReply" then
			theId=rs(8)
		 else
			theId=rs(6)
		end if
%>
  <tr onmouseover="javascript:this.className='trOnMOver';" onmouseout="javascript:this.className='';"> 
    <td align="center"><%=theId%><input name="theId" type="checkbox" id="theId" value="<%=theId%>"></td>
    <td height="22" align="center"><%=theTitle%></td>
    <td height="22" align="center"><%="<a href=""userInfo.asp?userName="&rs(7)&""" target=_blank>"&rs(7)&"</a>"%></td>
    <td height="22" align="center"><%=rs(3)%></td>
    <td height="22" align="center"><%=rs(4)%></td>
  </tr>
  <%
		rs.movenext
	next
	for i=1 to rs.pageCount
		pageList=pageList&"<a href=""?theAct="&theAct&"&page="&i&"""><font {$font"&i&"}>"&i&"</font></a> "
	next
	pageList=replace(pageList,"{$font"&page&"}","class=warningColor")
	rs.close
	closeConn()
%>
  <tr> 
    <td height="22" colspan="5" align="center" class="td"><%=pageList%></td>
  </tr>
  <tr> 
    <td height="22" colspan="5" align="center" class="tr"><input name="isTopic" type="hidden" id="isTopic" value="<%=isTopic%>">
      <input type="button" name="Submit" value="删 除" onclick="if(confirm('你确认要删除选中的记录吗?')){this.form.action='?theAction=del&theAct=<%=theAct%>&page=<%=page%>';this.form.submit();this.disabled=true;}">
      <input type="button" <%if isTopic=false then echo "disabled "%>name="Submit2" value="还 原" onclick="if(confirm('你确认要还原选中的记录吗?')){this.form.action='?theAction=recover&theAct=<%=theAct%>&page=<%=page%>';this.form.submit();this.disabled=true;}">
      <input type="reset" name="Submit22" value="重 置"> </td>
  </tr>
</form>
</table>
<br>
<table width="600" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="<%=borderColor%>">
  <tr> 
    <td height="25" align="center" class="tr"> </td>
  </tr>
  <tr> 
    <td height="60" align="center" bgcolor="#FFFFFF"><font face="Wingdings">v</font> 
      HigroupBBS <font face="Wingdings">v</font><br>
      Powered By <a href="javascript:;" title="QQ 26696782">Marcos</a> 2004.10</td>
  </tr>
</table>
</body>

⌨️ 快捷键说明

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