相思资源网 Design By www.200059.com
<%
NowUrl=request.servervariables("HTTP_REFERER")
UserName = session("Wenday_sys_User")
if UserName="" then
UserName="客人"
end if
call sqlonline()
Response.Write "document.write(" & chr(34) & " <font color=#000000>当前在线 "& online() &"人</font>"& chr(34) & ")"
'Response.Write "document.write(" & chr(34) & " <a href=count/ShowOnline.asp title=查看在线列表><font color=#000000>当前在线"& online() &"人</font></a>"& chr(34) & ")"
sub sqlonline()
dim statuserid
statuserid=replace(Request.ServerVariables("REMOTE_HOST"),".","")
Response.Cookies("Wenday_Sys")("onlineid")=statuserid
sql="select id from "&CategoryName&"_online where id="&cstr(request.cookies("Wenday_Sys")("onlineid"))
set rs=conn.execute(sql)
if rs.eof and rs.bof then
sql="insert into "&CategoryName&"_online(id,UserName,ip,startime,lastimebk,browser,actforip,Now_Url) values ("&statuserid&",'"&UserName&"','"&Request.ServerVariables("REMOTE_HOST")&"',now(),now(),'"&Request.ServerVariables("HTTP_USER_AGENT")&"','"&Request.ServerVariables("HTTP_X_FORWARDED_FOR")&"','"&request.servervariables("HTTP_REFERER")&"')"
else
sql="update "&CategoryName&"_online set lastimebk=now(),UserName='"&UserName&"' where id="&cstr(request.cookies("Wenday_Sys")("onlineid"))
end if
conn.execute(sql)
set rs=nothing
Rem 删除超时用户
sql="Delete FROM "&CategoryName&"_online WHERE DATEDIFF('s', lastimebk, now()) > "&kicktime&"*60"
Conn.Execute sql
end sub
function online()
dim tmprs
sql="Select count(id) from "&CategoryName&"_online"
set tmprs=conn.execute(sql)
online=tmprs(0)
set tmprs=nothing
if isnull(online) then online=0
end function
CloseDatabase
%>
NowUrl=request.servervariables("HTTP_REFERER")
UserName = session("Wenday_sys_User")
if UserName="" then
UserName="客人"
end if
call sqlonline()
Response.Write "document.write(" & chr(34) & " <font color=#000000>当前在线 "& online() &"人</font>"& chr(34) & ")"
'Response.Write "document.write(" & chr(34) & " <a href=count/ShowOnline.asp title=查看在线列表><font color=#000000>当前在线"& online() &"人</font></a>"& chr(34) & ")"
sub sqlonline()
dim statuserid
statuserid=replace(Request.ServerVariables("REMOTE_HOST"),".","")
Response.Cookies("Wenday_Sys")("onlineid")=statuserid
sql="select id from "&CategoryName&"_online where id="&cstr(request.cookies("Wenday_Sys")("onlineid"))
set rs=conn.execute(sql)
if rs.eof and rs.bof then
sql="insert into "&CategoryName&"_online(id,UserName,ip,startime,lastimebk,browser,actforip,Now_Url) values ("&statuserid&",'"&UserName&"','"&Request.ServerVariables("REMOTE_HOST")&"',now(),now(),'"&Request.ServerVariables("HTTP_USER_AGENT")&"','"&Request.ServerVariables("HTTP_X_FORWARDED_FOR")&"','"&request.servervariables("HTTP_REFERER")&"')"
else
sql="update "&CategoryName&"_online set lastimebk=now(),UserName='"&UserName&"' where id="&cstr(request.cookies("Wenday_Sys")("onlineid"))
end if
conn.execute(sql)
set rs=nothing
Rem 删除超时用户
sql="Delete FROM "&CategoryName&"_online WHERE DATEDIFF('s', lastimebk, now()) > "&kicktime&"*60"
Conn.Execute sql
end sub
function online()
dim tmprs
sql="Select count(id) from "&CategoryName&"_online"
set tmprs=conn.execute(sql)
online=tmprs(0)
set tmprs=nothing
if isnull(online) then online=0
end function
CloseDatabase
%>
标签:
显示在线人数
相思资源网 Design By www.200059.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
相思资源网 Design By www.200059.com
暂无显示在线人数的评论...