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

📄 count.asp

📁 后台登陆admin.asp
💻 ASP
字号:
<%
dim DBPath,conn1
set conn1=server.CreateObject("adodb.connection")
DBPath = Server.MapPath("bbs/yydl/ynsky#bbs.asp")
conn1.open "provider=microsoft.jet.oledb.4.0; data source="&DBpath
'在线用户统计
set onlinecount=conn1.execute("select count (*) from hx66online")
set rs=server.createobject("adodb.recordset")
set onabout=conn1.execute("select*from hx66count where hx66='hx66'")
onabo=onlinecount(0)
onabo2=onabout("hx66count")
if onabo>onabo2 then
rs.open "select*from hx66count where hx66='hx66'",conn1,1,3
rs("hx66count")=onabo
rs("hx66date")=now()
rs.update
rs.close
end if
onabout.close
%>
<%
ckuname=Request.Cookies("HX_USER")("User_Name")
userhidden=Request.Cookies("HX_USER")("userhidden") 
'在线会员-游客统计
dim duration
duration=1200
sql="select hx66date from hx66online"
set rs1=conn1.execute(sql)
while not rs1.eof
if datediff("s",rs1("hx66date"),now())>=duration then
sql="delete * from hx66online where hx66date=#"&rs1("hx66date")&"#"
conn1.execute(sql)
end if
rs1.movenext
wend
'conn1.execute("delete * from hx66online where hx66date<now-0.015")
set rs=server.createobject("adodb.recordset")
'游客在线信息更新开始
youip=Request.servervariables("REMOTE_ADDR")
yousql="select * from hx66online where hx66ips='"&youip&"'"
set onlineip=conn1.execute(yousql)
rs.open yousql,conn1,1,3

if onlineip.eof then
'增加
rs.addnew
if Request.Cookies("HX_USER")("User_Name")="" then
rs("hx66name")="游客"
rs("hx66type")=0
else
rs("hx66name")=""&ckuname&""
rs("hx66type")=userhidden
end if
rs("hx66ips")=Request.servervariables("REMOTE_ADDR")
rs("hx66date")=now()
rs("hx66title")=""&start&""
rs.update
rs.close
else
'更新
rs("hx66title")=""&start&""
rs("hx66date")=now()
if Request.Cookies("HX_USER")("User_Name")="" then
rs("hx66name")="游客"
rs("hx66type")=0
else
rs("hx66name")=""&ckuname&""
rs("hx66type")=userhidden
end if
rs.update
rs.close
end if
'信息结束
%>

⌨️ 快捷键说明

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