if application(newuser&"lastaccesstime")=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&"lastaccesstime")=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
redim tmp(application("totalusers"))
num=0
for i=0 to application("totalusers")-1
user=application("onlineuser")(i)
if (timer-application(user&"lastaccesstime"))<idletime then
tmp(num)=user
num=num+1
else
application(user&"lastaccesstime")=empty
application(usermsg)=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>
<meta http-equiv="refresh" content="<%=refreshtime%> ,url=<%=Request.ServerVariables("path_info")%>?username=<%=request("username")%>">
<script language="vbscript">
sub openchat()
window.open "calling.asp","chatwindow","menubar=0,width=366,height=177"
end sub
</script>
</head>
<body leftmargin="0" topmargin="0" bgcolor="#F7F7F7">
<table width="120" cellspacing="1" cellpadding="0" width="100%" border="0" bgcolor="seagreen" align="center">
<tr>
<td align="center" height="20">
<font color="white" size="2">
<b>在线名单</b>
</font>
</td>
</tr>
<tr>
<td align="center" height="20">
<font color="white" size="2">
<b>共<%=application("totalusers")%>人</b>
</font>
</td>
</tr>
<tr bgcolor="#F7F7F7">
<td align="center">
<script language="JavaScript1.2">
iens6=document.all||document.getElementById
ns4=document.layers
var speed=6
if (iens6){
document.write('<div id="container" style="position:relative;width:120;height:190;overflow:hidden">')
document.write('<div id="content" style="position:absolute;width:120;left:0;top:0">')
}
</script>
<table cellspacing="1" cellpadding="0" width="100%" border="0" bgcolor="seagreen" align="center">
<%for i=0 to (application("totalusers")-1)%>
<tr bgcolor="#F7F7F7">
<td>
<font size="2"> <%=application("onlineuser")(i)%></font>
</td>
</tr>
<%next%>
</table>
<script language="JavaScript1.2">
if (iens6)
document.write('</div></div>')
</script>
</td>
</tr>
</table>
<table width="100%">
<tr bgcolor="#F7F7F7">
<td>
<img src="../../tu/1.gif" onmouseout="clearTimeout(movedownvar)" onmouseover="movedown()" style="CURSOR: hand" width="15" height="15"> <img src="../../tu/3.gif" style="CURSOR: hand" WIDTH="21" HEIGHT="15" onclick="openchat()"> <img src="../../tu/2.gif" onmouseout="clearTimeout(moveupvar)" onmouseover="moveup()" style="CURSOR: hand" width="15" height="15">
</td>
</tr>
</table>
<script language="JavaScript1.2">
if (iens6){
var crossobj=document.getElementById? document.getElementById("content") : document.all.content
var contentheight=crossobj.offsetHeight
}
else if (ns4){
var crossobj=document.nscontainer.document.nscontent
var contentheight=crossobj.clip.height
}
function movedown(){
if (iens6&&parseInt(crossobj.style.top)>=(contentheight*(-1)+100))
crossobj.style.top=parseInt(crossobj.style.top)-speed
else if (ns4&&crossobj.top>=(contentheight*(-1)+100))
crossobj.top-=speed
movedownvar=setTimeout("movedown()",100)
}
function moveup(){
if (iens6&&parseInt(crossobj.style.top)<=0)
crossobj.style.top=parseInt(crossobj.style.top)+speed
else if (ns4&&crossobj.top<=0)
crossobj.top+=speed
moveupvar=setTimeout("moveup()",100)
}
function getcontent_height(){
if (iens6)
contentheight=crossobj.offsetHeight
else if (ns4)
document.nscontainer.document.nscontent.visibility="show"
}
window.onload=getcontent_height
</script>
<%
if application(usermsg)<>"" then
application("showmsg")=application(usermsg)
%>