<%application.lock response.expires=0 toroom=trdb(trim(request("toroom"))) set rs1=conn.execute("select * from room where room_name='"&toroom&"'") myname=Session("myname") myid=Session("myid") if myid="" then response.end set rsparam=conn.execute("select * from param") call get_guests set rs=conn.execute("select room_name from room where ID="&guests(myid,5)) old_room=rs("room_name")%>
<%errText="" if rs1.bof or rs1.eof then errText=""&toroom&"不存在!" elseif guests(myid,5)=rs1("ID") then errText="你已经在"&toroom&"里了!" elseif myname=rs1("room_auto") and rs1("room_owner")<>myname and guests(myid,4)<>rsparam("superlevel") then errText="你被拒绝进入"&toroom&"!" else if guests(myid,4)<>rsparam("superlevel") then call get_says say_id=says(current,0)+1 current=current+1 if current>MaxTalk then current=0 says(current,0)=say_id says(current,1)=myname says(current,2)="大家" says(current,3)=false says(current,4)=rs1("ID") says(Current,5)="'【欢迎】在清脆的笑声中##从%%走了过来!','"&myname&"','"&old_room&"',0,'cc00cc','green',-3,'"&time()&"'," say_id=say_id+1 current=current+1 if current>MaxTalk then current=0 mess="'【换房】##说:“我到%%去了。有事呼我哈!”','"&myname&"','"&toroom&"',0,'0000cc','green',-3,'"&time()&"'," says(current,0)=say_id says(current,1)=myname says(current,2)="大家" says(current,3)=false says(current,4)=guests(myid,5) says(current,5)=mess call put_says end if guests(myid,5)=rs1("ID") call put_guests%> <%response.end end if application.unlock%>
<%=errText%>