Refresh | filename Refresh frame: filename fresh.asp
<%
Option Explicit
Dim msg,tmsg,ws,action,user,whoto,tcolor,kicklist,chatpoin,chatcomm,chatdata,sendid,i,reciid
Dim tsecretly,thidename,dispstr,tchatpoin,tuserpoin,tchatcomm,j
Dim sendname,address1,reciname
User=request ("User")
Whoto=request.form ("Whoto")
Tmsg=request.form ("SAYS")
Tmsg=replace (tmsg, "\", "\ \")
Tmsg=replace (Tmsg, ",", "\,")
Tmsg=replace (Tmsg, "<", "<") ' Masks all HTML tags
Tmsg=replace (tmsg, "Tmsg=replace (tmsg, "<b", "<b") ' Release <b mark
If Request.Form ("ws") = "on" Then
Ws=true
Else
Ws=false
End If
Kicklist=application ("Kicklist")
' Whether the user was kicked
If InStr (Kicklist, "' #" &user& "") >0 Then
Response.Write "<script>parent.top.location= ' kickout.htm ';</script>"
Response.End
End If
If InStr (Kicklist, "'" &request.servervariables ("REMOTE_ADDR") & "") >0 Then
Response.Write "<script>parent.top.location= ' kickout.htm ';</script>"
End If
Chatpoin=application ("Chatpoin") ' Chat room pointer
Chatcomm=application ("Chatcomm") ' Chat room content
Chatdata=application ("Chatdata") ' Chat room user data
Sendid=-1
Reciid=-1
For I=0 to 50
If Chatdata (i,0) =user and Chatdata (i,1) =request.servervariables ("REMOTE_ADDR") then sendid=i ' Note, check the IP address in some, prevent the wall from being worn
If Chatdata (i,0) =whoto then reciid=i
Next
If Sendid=-1 Then
Response.Write "User does not enter chat room"
Response.End
End If
Chatdata (sendid,4) = (chatdata (sendid,4) mod 104) ' Flag, prevention is automatically kicked out of the chat room
Msg=right (time,8) & ", &user&", "&request.form (" Action ") &", "&whoto&", "& Request.Form ("Color")
If WS Then
msg=msg& ", 1"
Else
msg=msg& ", 0"
End If
msg= "' &msg&", "&tmsg
If Reciid=-1 and whoto<> "owner" then ws=true:reciid=sendid:msg=msg& <font color=red> ("&whoto&" Not in this chat room) </font> "
msg=msg& "' <br>"
If tmsg<> "" Then
If WS Then ' Whisper
If whoto<> "owner" then Chatdata (sendid,3) =chatdata (sendid,3) &msg
If Reciid<>-1 and Sendid<>reciid then Chatdata (reciid,3) =chatdata (reciid,3) &msg
Application.Lock
Application ("Chatdata") =chatdata
Application.UnLock
End If
If not WS or WS and whoto= "All people" then ' data that belongs to all
If chatpoin=49 Then
Chatpoin=0 ' array back, loop call
Call CheckName
Else
Chatpoin=chatpoin+1
End If
Chatcomm (Chatpoin) =msg ' writes content into application
Application.Lock
Application ("Chatcomm") =chatcomm
Application ("Chatpoin") =chatpoin
Application.UnLock
End If
End If
%><meta http-equiv= "Refresh" content= "3; url=refresh.asp?user=<% =user%> "><%
Tsecretly=chatdata (sendid,3) ' access to private chat content
Thidename=chatdata (sendid,5) ' Take a hidden list
Dim tmpstr
If tsecretly<> "then" show private chat content
Response.Write Thidename
Dispstr= ""
Dim temps
Tsecretly=split (tsecretly, "<br>")
For i=0 to UBound (tsecretly)-1
Tmpstr=split (tsecretly (i), ",")
If InStr (Thidename, ", '" &tmpstr (3) & "" ") <1 then dispstr=dispstr&", "&replace (tsecretly (i)," <br > "," "")
Next
Chatdata (sendid,3) = "' Empty private chat content
End If
Tuserpoin=chatdata (sendid,2) ' User pointer
Tchatpoin=chatpoin