?? user_count.asp
字號:
<!--#include file="conn.asp"-->
<!--#include file="user_chkpass.asp"-->
<!--#include file="inc/function.asp"-->
<link href="Admin_STYLE.CSS" rel="stylesheet" type="text/css">
<title>更新blog數據</title>
<body leftmargin="2" topmargin="0" marginwidth="0" marginheight="0" class="bgcolor">
<%
if CheckUserLogined()=False then
response.Redirect "user_login.asp"
end if
dim action,rs,sql,trs
action=request("action")
if action="DoUpdate" then
Set rs=Server.CreateObject("Adodb.RecordSet")
sql="select * from [user] where username='"&username&"'"
rs.Open sql,Conn,1,3
set trs=Conn.execute("select count(ID) from [blog] where username='"&username&"'")
if isNull(trs(0)) then
rs("logcount")=0
else
rs("logcount")=trs(0)
end if
set trs=Conn.execute("select count(ID) from comment where mainuser='"&username&"'")
if isNull(trs(0)) then
rs("commentcount")=0
else
rs("commentcount")=trs(0)
end if
set trs=Conn.execute("select count(ID) from message where mainuser='"&username&"'")
if isNull(trs(0)) then
rs("messagecount")=0
else
rs("messagecount")=trs(0)
end if
rs.update
rs.close
sql="select * from subject where username='"&username&"'"
rs.open sql,conn,1,3
while not rs.eof
set trs=conn.execute("select count(id) from blog where subjectid="&rs("id"))
if isnull(trs(0)) then
rs("subjectlognum")=0
else
rs("subjectlognum")=trs(0)
end if
rs.update
rs.movenext
wend
rs.close
set rs=nothing
set trs=nothing
response.Write("<br>已經成功將blog數據進行了更新!")
else
%>
<form name="form1" method="post" action="">
<br>
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" bgcolor="#FFFFFF" class="border">
<tr align="center" class="title">
<td height="25" colspan="2"><strong><font color="#FFFFFF">更 新 系 統 數 據</font></strong></td>
</tr>
<tr class="tdbg">
<td colspan="2"><p>說明:<br>
本操作將重新自己的日志數,評論數,留言數及專題文章數量,建議在統計數據不準的情況下使用。<br>
</p></td>
</tr>
<tr class="tdbg">
<td height="25"> </td>
<td height="25"><input name="Submit" type="submit" id="Submit" value="更新blog數據">
<input name="Action" type="hidden" id="Action" value="DoUpdate"></td>
</tr>
</table>
</form>
<%
end if
%>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -