作家
登录

显示在线人数

作者: 来源:www.28hudong.com 2013-03-30 09:04:50 阅读 我要评论

<%NowUrl=request.servervariables("HTTP_REFERER")UserName = session("Wenday_sys_User")if UserName="" then UserName="客人"end ifcall 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=nothingRem 删除超时用户sql="Delete FROM "&CategoryName&"_online WHERE DATEDIFF('s', lastimebk, now()) > "&kicktime&"*60"Conn.Execute sqlend subfunction 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=0end function CloseDatabase%>

  推荐阅读

  一个查ASP木马的小东东

关于查ASP木马的程序,记得半年前在八进制发了一个测试版(具体的URL:http://forum.eviloctal.com/read-htm-tid-19665.html),得到很多朋友的指导,学到了很多东西,非常感谢他们。现在我发的这个升级版,修补了以>>>详细阅读


本文标题:显示在线人数

地址:http://www.17bianji.com/kaifa2/ASP/33238.html

关键词: 探索发现

乐购科技部分新闻及文章转载自互联网,供读者交流和学习,若有涉及作者版权等问题请及时与我们联系,以便更正、删除或按规定办理。感谢所有提供资讯的网站,欢迎各类媒体与乐购科技进行文章共享合作。

网友点评
自媒体专栏

评论

热度

精彩导读
栏目ID=71的表不存在(操作类型=0)