dataaccount.asp

来自「自由领域ASP+WAP同学录(V1.0)系统是一套仿ChinaRen的即可用电脑」· ASP 代码 · 共 92 行

ASP
92
字号
<!--#include file=../../INC/txlconst.asp-->
<!--#include file=../../INC/txlfun.asp-->
<!--
<pre>
┌─ 自由领域ASP+WAP同学录系统 ─────────────────┐
│                                                               │
│  感谢你使用 自由领域ASP+WAP同学录系统(测试版)                │
│  使用本免费源码您必须遵守以下规定                             │
│    不得公开发表代码 不得用做商业用途,不得向其他使用者收费。  │
│                                                               │
│  使用时,请保留此段信息,谢谢配合                             │
│                                                               │
│                                       2004/12/19              │
│                                                               │
└────────────────  http://99167.jahee.com ───┘
</per>
-->
<%
Dim const_txl_HomeUrl
const_txl_HomeUrl = "../../"
%>
<!--#include file=../checkadmin.asp-->
<%
Call opendatabase
Call txl_SiteHead (const_txlname&"- 管理员")
If Request.QueryString("action") ="account" Then
	Call account
Else
	Call main
End If

Call CloseDataBase
Call SiteBottom
Sub main
%>
<style type="text/css">
<!--
.style1 {color: #FF0000}
-->
</style>

<br>
<table width="720" border="1" align="center" cellpadding="8" cellspacing="0" bordercolorlight="#cccccc" bordercolordark="#FFFFFF" bgcolor="#FFFFFF">
  <tr> 
    <td  bgcolor="#efefef">在同学录使用过程中,由于数据的删除操作,使有些统计信息不准确,通过该操作可以重新统计出数据.<br>
	<br>  	<b>注意:</b><span class="style1">本操作将是耗资源的漫长的过程,强烈建议暂停同学录后再作本操作
      点击下列连接进行操作</span></td>
  </tr>
  <tr> 
    <td height="23" align="center"><a href="?action=account&data=forum">重新统计留言</a> 
      | <a href="?action=account&data=bbs">重新统计论坛数据</a></td>
  </tr>
</table>
<br>
<%End SUb%>
<%
Sub account
	dim rs,tmpstr,tmprs
	Set rs=Server.CreateObject("Adodb.Recordset")
	If Request.QueryString("data")="forum" then
		rs.open "select studentid from ec order by studentid",conn,1,3
		while not rs.eof
			set tmprs=conn.execute ("select count(*) from forum where studentid='"&rs(0)&"'")
			conn.execute "update ec set forumtimes="&tmprs(0)&" where studentid='"&rs(0)&"'"
			tmprs.close
			rs.movenext
		wend
		rs.close
		set rs=nothing
	ElseIf Request.QueryString("data")="bbs" then
		rs.open "select boardid from boards order by boardid",conn,1,3
		while not rs.eof
			set tmprs=conn.execute ("select count(*) from Announce where boardid="&rs(0))
			conn.execute ("update boards set AnnounceNum="&tmprs(0)&" where boardid="&rs(0))
			tmprs.close
			rs.movenext
		wend
		rs.close
		set rs=nothing
	End If
	tmpstr="<li>对"
	If Request.QueryString("data")="forum" then
		tmpstr=tmpstr&"留言"
	ElseIf Request.QueryString("data")="bbs" then
		tmpstr=tmpstr&"论坛"
	End If
	tmpstr=tmpstr&"数据的重新统计已经完成</li>"
	tmpstr=tmpstr&"<li><a href='?'>返回</a></li>"
		Call	printsuc("操作成功!",tmpstr,779)
End Sub
%>

⌨️ 快捷键说明

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