⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 08).txt

📁 是一相当简单的聊天窒 ,可以简单的聊天,聊天窒,那就下吧
💻 TXT
字号:
<%
dim refreshtime,delaytime,totalusers,onlineuser(),tmp(),num,i,newuser,user,username
refreshtime=15
delaytime=refreshtime*3
newuser=request("username")
application.lock
if application(newuser&"lasttime")=empty then
   if application("totalusers")=empty then application("totalusers")=0
    redim tmp(application("totalusers")+1)
    num=0
    if application("totalusers")>0 then
    for i=lbound(application("onlineuser")) to ubound(application("onlineuser"))
         user=application("onlineuser")(i)
         if user<>newuser and user<>session("username") then
            tmp(num)=user
             num=num+1
         else 
            application(user&"lasttime")=empty
         end if
   next
   end if
   session("username")=newuser
   tmp(num)=session("username")
   application("totalusers")=num+1 
   redim preserve tmp(application("totalusers"))
   application("onlineuser")=tmp
end if
application(session("username") & "lasttime")=timer
redim tmp(application("totalusers"))
num=0
for i=0 to application("totalusers")-1
    user=application("onlineuser")(i)
   if(timer-application(user&"lasttime"))<delaytime then
      tmp(num)=user
      num=num+1
   else
       napplication(user & "lasttime")=empty
   end if
next
if num<>application("totalusers") then
   redim preserve tmp(num)
   application("onlineuser")=tmp
   application("totalusers")=num
end if
application.unlock

%>
<html>
<head><title>用户信息</title>
<meta http-equiv="content-type" content="text/html; charset=gb2312">
<meta http-equiv="refresh" content="<%=refreshtime%">;url=<%=request.servervariables("Path_info")%>?username=<%=request("username")%>">
</head>
<body bgcolor="snow">
<font color="#FF0000">在线人数:</font><%=application("totalusers")%><br>
<ol type="1">
<% for i=0 to (application("totalusers")-1)
       response.write "<li>"& application("onlineuser") (i) & "</li>"
   next
%>
</ol>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -