📄 count.asp
字号:
<%
''''''''''''''''''''''''''''''''''''''''''''
'
' TXSite / 通用网站系统
'
' 版本 :v1.8.20
'
' 制作人 :milp(milp@21cn.com)
'
' 版权所有:源码之家(http://www.21tx.com)
'
' 主页地址:http://www.21tx.com
' http://www.bestnets.net
' http://www.soucn.com
'
' 技术支持:http://www.21tx.com/bbs
'
''''''''''''''''''''''''''''''''''''''''''''
Option Explicit
%>
<!--#include file="conn.asp"-->
<%
dim s
s=trim(Request("s"))
If s="" Then s=0
rs.open "select * From TXcount where id="&trim(Request("id"))&"",conn,1,3
if rs.bof and rs.eof then
rs.close
Call error
end if
If Cstr(Month(rs("cDate"))) <> CSTR(Month(DATE())) Then
rs("cLastMonth") = rs("cMonth")
rs("cMonth") = 1
Else
If Cstr(Day(rs("cDate"))) <> CSTR(Day(DATE())) THEN
rs("cYesterday") = rs("cToday")
rs("cToday") = 1
End If
End If
rs("cDate") = now()
rs("cTotal") =rs("cTotal")+1
rs("cToday") =rs("cToday")+1
rs("cMonth") =rs("cMonth")+1
rs("cIP")=Request.ServerVariables("REMOTE_HOST")
rs.Update
If s=1 Then
response.write "document.write(""<font color=#c0c0c0>当前在线"&Application("online")&"人,峰值在线"&Application("maxonline")&"人,从"&FormatDateTime(rs("addate"),1)&"起已有"&rs("cTotal")&"人浏览过本页</font>"");"
ElseIf s=2 Then
Output(rs("cTotal"))
End If
rs.close
Call objend()
Function Output(cTotal)
Dim S,i,CountOut
S = CStr(cTotal)
For i=1 to Len(S)
CountOut=CountOut& "<img src=/images/countimg/" & Mid(S, i, 1) & ".gif align=middle border=0>"
Next
CountOut="document.write("""&CountOut&""");"
response.write CountOut
End Function
Sub error()
response.write "document.write(""统计出错!"");"
response.end
End Sub
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -