常州尚枫澜湾二手房:如何用asp实现在线用户列表

来源:百度文库 编辑:查人人中国名人网 时间:2024/04/30 00:29:26
我用cookies记录用户帐号,但需要显示用户是否登陆和显示在线用户的名单。
请问如何实现?

谢谢~
回答者gameboyLV的方法我认为不是特别可行,一是会占用服务器资源,二是如何及时释放,很多人直接关闭窗口;
回答者wb123bd提供的代码不完整,不过仍然感谢

加到相应位置
<%
if request("action")="show" then
response.write "[<a href=index.asp?action=off>关闭详细列表</a>]"
else
if cint(Forum_Setting(14))=1 and request("action")<>"off" then
response.write "[<a href=index.asp?action=off>关闭详细列表</a>]"
else
response.write "[<a href=index.asp?action=show>显示详细列表</a>]"
end if
end if
%>
从“onlineuser”可以看出数据库的设计
<%
if request("action")="off" then
call onlineuser(0,0,0)
elseif request("action")="show" then
call onlineuser(1,1,0)
else
call onlineuser(Forum_Setting(14),Forum_Setting(15),0)
end if
%>

把已登陆的用户记录到一个Appliction变量,退出时将该用户从变量中删除即可