📄 online.asp
字号:
<%o_ip=Request.ServerVariables("REMOTE_ADDR")
if Request.ServerVariables("HTTP_X_FORWARDED_FOR")<>"" then o_ip=Request.ServerVariables("HTTP_X_FORWARDED_FOR")
o_system=system(Request.ServerVariables("HTTP_USER_AGENT"))&","&browser(Request.ServerVariables("HTTP_USER_AGENT"))
sqlonline = "select * from online where o_ip = '" & o_ip & "'"
set rsonline =conn.Execute (sqlonline)
o_username=cpbusername
if o_username = "" then o_username = "客人"
if not rsonline.eof then
sqlonline = "update online set o_hidden="&cpbhidden&",o_system='"&o_system&"',o_username = '"&o_username&"', o_LastTime = '" &nowtime&"' where o_ip = '" & o_ip & "'"
conn.execute(sqlonline)
else
sqlonline = "insert into online (o_hidden,o_username, o_ip,o_LastTime,o_system,o_topic) values ("&cpbhidden&",'" & o_username & "', '" & o_ip & "','"&nowtime&"','" & o_system & "',0)"
conn.Execute (sqlonline)
end if
if o_username <> "客人" then
sqlonline = "delete from online where o_username = '" & o_username & "' and o_ip <> '" & o_ip & "'"
conn.Execute (sqlonline)
end if
sqlonline = "select o_id, o_lasttime,o_username from online"
set rsonline = conn.Execute (sqlonline)
if not rsonline.eof then
do while not rsonline.Eof
if DateDiff("n",rsonline("o_lasttime"),nowtime)>secondss then
sqlonline = "update user set u_lastlogin='"&nowtime&"' where username = '" & rsonline("o_username")&"'"
conn.Execute (sqlonline)
sqlonline = "delete from online where o_id = " & rsonline("o_id")
conn.Execute (sqlonline)
end if
rsonline.movenext
loop
end if
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -