<!--#include file="inc_const.asp"-->
<%response.expires=0
Response.CacheControl = "Private"
application.lock

set cschat=server.createobject("ffcschat.cssbchat")
my_level=cschat.getLevel(Session,Application(ConstStr & "_user_list"),Application(ConstStr & "_room_list"))
myname=cschat.myname
room_id=cschat.room_id
set cschat=nothing
application.unlock
if  my_level-application( ConstStr & "_superlevel")<>0 then response.end

username=request("name")
if instr(Application( ConstStr & "_user_list"),"<$"&username&"$>")<>0 then
  response.redirect("showerr.asp?errtext=该用户正在聊天室里！")
  response.end
end if
Set Conn=Server.CreateObject("ADODB.Connection")
conn.open Application( ConstStr & "_connstr")
room_array=split(Application( ConstStr & "_room_list"),"<$"&room_id&"$>")
room_array2=split(room_array(1),"$>")
room_name=room_array2(0)
conn.execute("delete from user where username='"&username&"' and user_level<"&my_level)
occ_env=room_name&">"&myname&">"&Request.ServerVariables("REMOTE_ADDR")&">"&username&"> >此处只作记录>删除用户%%"
conn.Execute("INSERT INTO record (stype,occ_time,occ_env) VALUES (54,'"&now()&"','"&occ_env&"')")
conn.close
Set conn=nothing
response.redirect("showerr.asp?errtext=你成功的删除了聊友<u>"&username&"</u>！")
%>














