答案:主动离开:leave.asp
<%
response.expires=0
sendid=session("userid")
if sendid<>"" then
chatdata=application("chatdata")
onliuser=application("onliuser")
if chatdata(sendid,1)=request.servervariables("remote_addr") then '验证用户IP地址
onliuser=replace(onliuser,",'"&chatdata(sendid,0)&"'","")
for i=0 to 50
chatdata(i,4)=(chatdata(i,4) mod 4) +4 '通知更新名单
next
chatdata(sendid,0)="" '清空用户名
chatdata(sendid,1)="" '清空Ip地址
chatdata(sendid,3)="" '清空私聊内容
chatdata(sendid,4)=0 '清空权限和音乐开关及免打挠开关
chatdata(sendid,5)="" '清空隐藏名单
application.lock
application("chatdata")=chatdata
application("onliuser")=onliuser
application.unlock
end if
end if
session("userid")=""
response.redirect "login.asp"
function finduser(fuser)
reval=100
for i=0 to 99
if chatdata(i,0)=fuser then
reval=i
exit for
end if
next
finduser=reval
end function
%>
被动离开:kickout.htm
<script language="javascript">
<!--
if (self.parent.frames.length != 0)top.location=document.location.href;
// -->
</script>
<br><br><br><center><font size=5>你被这个聊天室的管理员踢出了本聊天室</font></center>
上一个:登录文件,文件名login.asp
下一个:action.js,动作处理文件