Set rs= Server.CreateObject("ADODB.Recordset")
strSql="select * from asp_username where id="&Session("Uid")
rs.open strSql,Conn,3,3
rs("Utime")=shijian
'rs("状态")=0
rs.update
rs.close
set rs=nothing
Conn.execute"update asp_username set zhuangtai=0 where Utime<"&shijian&"-3"
Conn.execute"update asp_username set zhuangtai=1 where Utime>"&shijian&"-2"
strsql_zx="select * from asp_username where zhuangtai=1 and shenghe=1 ORDER BY yonghuming, id DESC"
set my_rs_zx=server.createobject("adodb.recordset")
my_rs_zx.open strsql_ZX,conn,1,1
zaixian=0
do while not (my_rs_zx.eof or my_rs_zx.bof)
my_rs_zx.movenext
zaixian=zaixian+1
loop
strsql_lx="select * from asp_username where zhuangtai=0 and shenghe=1 ORDER BY yonghuming, id DESC"
set my_rs_lx=server.createobject("adodb.recordset")
my_rs_lx.open strsql_lX,conn,1,1
lixian=0
do while not (my_rs_lx.eof or my_rs_lx.bof)
my_rs_lx.movenext
lixian=lixian+1
loop
%>
<META content="MSHTML 5.00.2614.3500" name=GENERATOR></HEAD>
<BODY bgColor=#276db2 leftMargin=0 topMargin=5 marginheight="0" marginwidth="0">
<TABLE align=center border=0 cellPadding=0 cellSpacing=0 width=100>
<TBODY>
<TR align=middle>
<TD><FONT color=#ffffff>在线人员列表</FONT></TD></TR>
<%strSql="select * from asp_username where zhuangtai=1 and shenghe=1 ORDER BY yonghuming, id DESC"
set my_rs=server.createobject("adodb.recordset")
my_rs.open strsql,conn,1,1%>
<TR align=middle>
<TD height=5></TD></TR>
<TR align=middle>
<FORM action="" method=post name=form1>
<TD><SELECT multiple name=list
ondblclick=Javascript:OpenSmallWindows(this.form.list.options[this.form.list.selectedIndex].value)
size=25 style="BACKGROUND-COLOR: #f9f9f9; FONT-SIZE: 9pt; WIDTH: 100px">
<OPTION>----在线<%=zaixian%>人----</OPTION>
<%do while not (my_rs.eof or my_rs.bof)%>
<OPTION
value="show.asp?receiveuser=<%=my_rs("xingming")%>&id=<%=my_rs("id")%>"><%=my_rs("xingming")%></OPTION>
<%my_rs.movenext
loop%>
<OPTION>----离线<%=lixian%>人----</OPTION>
<%strsql_lx2="select * from asp_username where zhuangtai=0 and shenghe=1 ORDER BY yonghuming, id DESC"
set my_rs_lx2=server.createobject("adodb.recordset")
my_rs_lx2.open strsql_lx2,conn,1,3
%>
<%do while not (my_rs_lx2.eof or my_rs_lx2.bof)%>
function application_onstart
application("count")=0
end function
function session_onstart
application("count")=application("count")+1
end function
function session_onend
application("count")=application("count")-1
end function