📄 dataaccount.asp
字号:
<!--#include file=../../INC/txlconst.asp-->
<!--#include file=../../INC/txlfun.asp-->
<%
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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -