Take the initiative to leave: 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 ' Authenticate User IP address
Onliuser=replace (Onliuser, "," "&chatdata (sendid,0) &" "" ")
For I=0 to 50
Chatdata (i,4) = (chatdata (i,4) mod 4) +4 ' Notify update list
Next
Chatdata (sendid,0) = "' Empty user name
Chatdata (sendid,1) = "' Empty IP Address
Chatdata (sendid,3) = "' Empty private chat content
Chatdata (sendid,4) =0 ' clear permission and music switch and free flex switch
Chatdata (sendid,5) = "' Empty Hidden list"
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
%>
Passive departure: kickout.htm
<script language= "JavaScript" >
<!--
if (self.parent.frames.length!= 0) Top.location=document.location.href;
-->
</script>
<br><br><br><center><font size=5> You were kicked out of this chat room by the manager of this chat room </font></center>