%Response.Buffer=true
response.expires=0
application.lock
call get_guests
call get_maxuser
application.unlock
set rsparam=conn.execute("select * from param")
conn.Execute("DELETE FROM room WHERE not room_keep AND (DATEDIFF('n',room_time,now())>(3000+room_exp))")
conn.Execute("update room set room_keep="&true&" where not room_keep and room_exp>"&rsparam("roomkeepexp"))
set rs=Server.CreateObject("ADODB.RecordSet")
Rs.Open "select id,room_name,room_owner,room_exp from room",conn,1,1%>
|刷新|建房|
<%dim roomarr
redim roomarr(rs.recordcount-1,3)
j=0
do while not (rs.bof or rs.eof)
count=0
for i=0 to MaxUser
if guests(i,0)<>"" and guests(i,5)=rs("ID") and guests(i,4)<>rsparam("superlevel") then count=count+1
next
roomarr(j,0)=rs("room_name")
roomarr(j,1)=rs("room_owner")
roomarr(j,2)=rs("room_exp")
roomarr(j,3)=count
j=j+1
rs.movenext
loop
flag=0
do while flag=0
flag=1
for i=2 to j-1
if roomarr(i,3)>roomarr(i-1,3) then
flag=0
for n=0 to 3
a=roomarr(i,n)
roomarr(i,n)=roomarr(i-1,n)
roomarr(i-1,n)=a
next
end if
next
loop
for i=0 to j-1%>
<%=roomarr(i,0)%>[<%=roomarr(i,3)%>人]<%
if guests(session("myid"),4)-rsparam("ldelroom")>=0 and i<>0 then%>※<%end if
next%>