<%Response.Buffer=true response.expires=0 myid=Session("myid") myname=Session("myname") set rsparam=conn.execute("select * from param") if myid="" or myname="" then call echoerr("你还没有登陆到聊天室!","default.asp") response.end end if application.lock call get_guests call get_maxuser if myname<>guests(myid,0) or Session("mytemp")<>guests(myid,1) then call echoerr("你还没有登陆到聊天室!!","default.asp") response.end end if if guests(myid,4)=rsparam("superlevel") then myname="聊天室管理员" if guests(myid,4)-rsparam("ldelroom")<0 then call echoerr("你想撤房子,可惜力气不够!","room.asp") response.end end if errText="" selroom=trdb(request("room")) set rs1=conn.execute("select ID from room where room_name='"&selroom&"'") if not (rs1.eof or rs1.bof) and rs1("ID")<>1 then if request("cmdYes")="撤房" then forwhat=left(trdb(request("forwhat")),40) if forwhat="" then errText="不注明原因,你想乱来啊?" else for i=0 to MaxUser if guests(i,5)=rs1("ID") then guests(i,5)=1 guests(i,7)=1 end if next conn.Execute("INSERT INTO record (occ_env,occ_time,for_what) VALUES ('"&myname&" 撤掉了房间 『"&selroom&"』','"&now()&"','"&forwhat&"')") 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)="大家" says(current,2)="大家" says(current,3)=false says(current,4)=-2 says(current,5)="'【撤房】##使出一招“摧枯拉朽”,一阵劲风过处,%%倒塌了!','"&myname&"','"&selroom&"',0,'#3366cc','green',-3,'"&time()&"'," guests(myid,11)=now() call put_guests call put_says conn.execute("delete from room where room_name='"&selroom&"'") errText="你成功地撤掉了房子『"&selroom&"』!" end if call echoerr(errText,"room.asp") else %>
 

<%end if else call echoerr("房间"&selroom&"不存在或不能被撤!","room.asp") end if application.unlock%>