📄 active.asp
字号:
<!--#include virtual="/online/online_conn.asp"--><%
user_time=request.cookies("user_time")
user_session=session.sessionid
user_ip=Request.ServerVariables("REMOTE_ADDR")
user_from=Request.ServerVariables("HTTP_REFERER")
from=request.querystring("from")
if Request.ServerVariables("QUERY_STRING")<>"" then
site=Request.ServerVariables("PATH_INFO")&"?"&Request.ServerVariables ("QUERY_STRING")
else
site=Request.ServerVariables("PATH_INFO")
end if
if from<>"" then
site=from
end if
site=left(site,120)
end_time=dateadd("n",-time_out,now())
user_name="访客"
online_conn.Execute("delete * from active_user where active_time<#"&end_time&"#")
online_sql00="select session_id from active_user where session_id='"&user_session&"'"
set online_rs=online_conn.Execute (online_sql00)
if not online_rs.eof then
online_sql01="update active_user set active_time='"&now()&"',user_name='"&user_name&"',site='"&site&"' where session_id='"&user_session&"'"
online_conn.Execute (online_sql01)
response.cookies("user_time").expires=dateadd("n",time_out,now())
else
if user_time="" then
response.cookies("user_time")="1"
response.cookies("user_time").expires=dateadd("n",time_out,now())
online_sql02="insert into active_user (session_id,ip,site,user_name,user_from) values('"&user_session&"','"&user_ip&"','"&site&"','"&user_name&"','"&user_from&"')"
online_conn.Execute (online_sql02)
online_sql03="select * from count_date where my_date=#"&date()&"#"
set date_rs=online_conn.Execute (online_sql03)
if not date_rs.eof then
online_sql04="update count_date set my_count=my_count+1 where my_date=#"&date()&"#"
online_conn.Execute (online_sql04)
else
online_sql05="insert into count_date (my_count) values('1')"
online_conn.Execute (online_sql05)
end if
date_rs.close
set date_rs=nothing
end if
end if
online_rs.close
set online_rs=nothing
online_conn.close
set online_conn=nothing%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -