主动离开leave.asp和被动离开kickout.htm(被踢嘛)
发表于:2007-06-30来源:作者:点击数:
标签:
主动离开:leave.asp % response.expires=0 sendid=session(userid) if sendid then cha td ata=application(chatdata) onliuser=application(onliuser) if chatdata(sendid,1)=request.servervariables(remote_addr) then ‘’验证用户IP地址 onliuser=repla
主动离开:leave.asp
<%
response.expires=0
sendid=session("userid")
if sendid<>"" then
cha
tdata=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>
原文转自:http://www.ltesting.net