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

📄 adminact.asp

📁 程序网络论坛HigroupBBS v4.00 默认管理员帐号密码都是Marcos
💻 ASP
字号:
<!--#include file="MarcosCB.asp"-->
<style>
<%=skinCss%>
</style>
<%
	getConn()
	isIn()
	isAdmin()
	
	dim theAct
	
	theAct=getPost("theAct")

'	echo server.scriptTimeout	
	server.scriptTimeout=60*1000 '设置脚本超时时长为1个小时

	select case theAct
		case "delSMS"
			delSMS()
		case "delNoTopic"
			delNoTopic()
		case "delNoBoard"
			delNoBoard()
		case "countReplyCount"
			countReplyCount()
		case "countAll"
			countAll()
		case "updateLastPostInfo"
			updateLastPostInfo()
		case "updateTopicReply"
			updateTopicReply()
		case "updateAll"
			delNoTopic()
			delNoBoard()
			countReplyCount()
			countAll()
			updateLastPostInfo()
			updateTopicReply()
	end select
	
	sub delSMS()
		sql="delete from Marcos_Message where toRecycled=true and fromRecycled=true"
		conn.execute(sql)
	end sub
	
	rem 删除所有无主题回复
	sub delNoTopic()
		sql="delete from Marcos_Reply where topicId not in(select topicId from Marcos_Topic)"
		conn.execute(sql)
	end sub

	rem 删除所有无版块主题
	sub delNoBoard()
		sql="delete from Marcos_Topic where boardId not in(select boardId from Marcos_Board)"
		conn.execute(sql)
	end sub
	
	rem 重新统计每个主题的回复数
	sub countReplyCount()
		sql="select count(replyId),Marcos_Reply.topicId from Marcos_Reply where isRecycled=false group by topicId"
		set rs_sys=conn.execute(sql)
		do until rs_sys.eof
			conn.execute("update Marcos_Topic set replyCount="&rs_sys(0)&" where topicId="&rs_sys(1))
			rs_sys.movenext
		loop
	end sub
	
	rem 重新统计每个版块的主题数和回复数
	sub countAll()
		sql="select count(topicId),sum(replyCount),Marcos_Topic.boardId from Marcos_Topic where isRecycled=false group by boardId"
		set rs_sys=conn.execute(sql)
		do until rs_sys.eof
			conn.execute("update Marcos_Board set topicCount="&rs_sys(0)&",replyCount="&rs_sys(1)&" where boardId="&rs_sys(2))
			rs_sys.movenext
		loop
	end sub

	rem 更新每个版块的最后更新数据
	sub updateLastPostInfo()
		sql="select boardId from Marcos_Board where topBoardId<>0"
		set rs_sys=conn.execute(sql)
		do until rs_sys.eof
			updatePostInfo(rs_sys(0))
			rs_sys.movenext
		loop
	end sub
	
	rem 更新最近五百个主题的最后回复信息
	sub updateTopicReply()
		sql="select top 500 topicId,addTime from Marcos_Topic where isRecycled=false order by addTime desc"
		set rs_sys=conn.execute(sql)
		do until rs_sys.eof
			sql="select top 1 lastPostInfo,topicId,replyTime from Marcos_Reply where topicId="&rs_sys(0)&" order by replyTime desc"
			set rs_tmp=conn.execute(sql)
			if not rs_tmp.eof then
				lastPostInfo=rs_tmp(0)
				lastReplyTime=rs_tmp(2)
			 else
				lastPostInfo="回复者:@@暂无回复$$$回复时间:@@无$$$回复内容:@@无"
				lastReplyTime=rs_sys(1)
			end if
			conn.execute("update Marcos_Topic set lastPostInfo='"&lastPostInfo&"',lastReplyTime='"&lastReplyTime&"' where topicId="&rs_sys(0))
			rs_sys.movenext
		loop
	end sub
	
	if theAct<>"" then
		delPageIndex()
		echo "<br><center>所有操作完成!总用时"&(timer-sTime)*1000&"ms</center>"
	end if
	
	closeConn()
%>
<table width="600" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="<%=borderColor%>">
  <tr align="center"> 
    <td class="tr">&nbsp;</td>
    <td height="22" class="tr">系统统计</td>
  </tr>
  <tr align="center">
    <td>动作</td>
    <td height="22"><input type="button" name="Submit" value="清理短信回收站" onClick="location.href='?theAct=delSMS';doSth(this);"></td>
  </tr>
  <tr align="center"> 
    <td class="td">说明</td>
    <td height="40" class="td">清理短信回收站,<font class="warningColor">建议过一段时间执行一次</font></td>
  </tr>
  <tr align="center"> 
    <td>动作</td>
    <td height="22"><input type="button" name="button" value="删除所有无主题回复" onclick="location.href='?theAct=delNoTopic';doSth(this);"></td>
  </tr>
  <tr align="center"> 
    <td class="td">说明</td>
    <td height="40" class="td">删除所有无主题回复,一般不用操作</td>
  </tr>
  <tr align="center"> 
    <td>动作</td>
    <td height="22"><input type="button" name="button2" value="删除所有无版块主题" onclick="location.href='?theAct=delNoBoard';doSth(this);"></td>
  </tr>
  <tr align="center"> 
    <td class="td">说明</td>
    <td height="40" class="td">删除所有无版块主题,一般不用操作</td>
  </tr>
  <tr align="center"> 
    <td>动作</td>
    <td height="22"><input type="button" name="button3" value="重新统计每个主题的回复数" onclick="if(confirm('操作前请确认论坛处于关闭状态\n确认不会有人在统计期间对数据库进行操作!')){location.href='?theAct=countReplyCount';doSth(this);}"></td>
  </tr>
  <tr align="center"> 
    <td class="td">说明</td>
    <td height="40" class="td">重新统计每个主题的回复数, 数据量大<br>
      的时候需要占用大量资源及时间,<font class="warningColor">一般不建议使用</font></td>
  </tr>
  <tr align="center"> 
    <td>动作</td>
    <td height="22"><input type="button" name="button4" value="重新统计每个版块的主题数和回复数" onclick="location.href='?theAct=countAll';doSth(this);"></td>
  </tr>
  <tr align="center"> 
    <td class="td">说明</td>
    <td height="40" class="td">重新统计每个版块的主题数和回复数,一般不用操作</td>
  </tr>
  <tr align="center"> 
    <td>动作</td>
    <td height="22"><input type="button" name="button5" value="更新每个版块的最后更新数据" onclick="location.href='?theAct=updateLastPostInfo';doSth(this);"></td>
  </tr>
  <tr align="center"> 
    <td class="td">说明</td>
    <td height="40" class="td">更新每个版块的最后更新数据</td>
  </tr>
  <tr align="center"> 
    <td>动作</td>
    <td height="22"><input type="button" name="button6" value="更新最近五百个主题的最后回复信息" onclick="location.href='?theAct=updateTopicReply';doSth(this);"></td>
  </tr>
  <tr align="center"> 
    <td class="td">说明</td>
    <td height="40" class="td">更新最近五百个主题的最后回复信息</td>
  </tr>
  <tr align="center"> 
    <td>动作</td>
    <td height="22"><input type="button" name="button7" value="更新所有" onclick="if(confirm('操作前请确认论坛处于关闭状态\n确认不会有人在统计期间对数据库进行操作!\n')){location.href='?theAct=updateAll';doSth(this);}"></td>
  </tr>
  <tr align="center"> 
    <td class="td">说明</td>
    <td height="40" class="td">当版面数据变得很乱时建议使用,<font class="warningColor">一般不建议使用</font><br>
      数据量大的时候需要占用大量资源及时间,最好在本地执行!</td>
  </tr>
  <tr align="center"> 
    <td class="tr">&nbsp;</td>
    <td height="22" class="tr">&nbsp;</td>
  </tr>
</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>
<script lanuage="javascript">
function doSth(th){
	th.disabled=true;
//	setTimeout("document.write('代码执行中,请耐心等待...')",2*1000);
}
</script>

⌨️ 快捷键说明

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