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

📄 counter.asp

📁 本系统是一套开源WEB的网站管理系统
💻 ASP
字号:
<!--#include file="include/conn.asp"-->
<!--#include file="include/config.asp"-->
<%
if isOpenCounter>0 then
if isOpenCounter=1 or isOpenCounter=3 then
dim months,rs
months=month(now())
Set rs=Server.CreateObject("ADODB.RecordSet")
'rs.cursorLocation=3
rs.Open "select * from ms_tongji",connstr,1,3
if session("maosintongji")="" then
	if rs.eof and rs.bof then
		rs.addnew
		rs("total")=rs("total")+1
		rs(months&"month")=1
		rs("today")=1
		rs("stardate")=now
		rs("lastdate")=now
		rs("lastip")=ip
		rs.update
		session("maosintongji")="yes"
		response.Cookies("maosintongji")="yes"
		response.Cookies("maosintongji").Expires=DateAdd("n",20,now)
	else
		rs("total")=rs("total")+1
		rs(months&"month")=rs(months&"month")+1
		if cstr(day(rs("lastdate")))<>cstr(day(date())) then
				rs("yesterday")=rs("today")
				rs("today")=1
		end if
		rs("today")=rs("today")+1
		rs("lastdate")=now
		rs("lastip")=Request.ServerVariables("REMOTE_ADDR")
		rs.update
		session("maosintongji")="yes"
		session.Timeout=20
	end if
end if
dim total,lastMonth,isYesterday,curMonth,istoday
total=rs("total")
lastMonth=rs(months-1&"month")
isYesterday=rs("yesterday")
curMonth=rs(months&"month")
istoday=rs("today")
rs.close
set rs=nothing
response.write("window.status='总访问量:"&total&" 人;上月访问量:"&lastMonth&" 人;本月访问量:"&curMonth&" 人;今日访问量:"&istoday&" 人;昨日访问量:"&isYesterday&" 人'")
end if
end if
%>

⌨️ 快捷键说明

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