Manage user kick file admin/admin.asp

Source: Internet
Author: User
Manage user kick file admin/admin.asp


<%
User=request.form ("User")
Adbut=request.form ("Kaction")
Whoto=request.form ("Hdish")
%><meta http-equiv= "Refresh" content= "4; Url=.. /refresh.asp?user=<% =user%> ">
<%
Chatdata=application ("Chatdata")
Chatcomm=application ("Chatcomm")
Chatpoin=application ("Chatpoin")
Sendid=finduser (user)

If Sendid<51 and Chatdata (sendid,1) =request.servervariables ("REMOTE_ADDR") Then
If session ("admlevel") = "9" Then
Reciid=finduser (Whoto)

Select Case Adbut
Case "SIP"
If Reciid<51 Then
Dispstr=right ("0" &time,8) & ", System, 0," &user& ", ff0000,0," &whoto& "IP address is" &chatdata "( whotoid,1)
Else
Dispstr=right ("0" &time,8) & ", System, 0," &user& ", ff0000,0," &whoto& "not in this chat room"
End If
%><script language= ' JavaScript ' >
Parent.comm=new Array (' <% =dispstr%> ');
Parent.writecomm (); </script><%

Case "Kip"
If reciid<51 and Sendid<>reciid then
Kicklist=application ("Kicklist")
If InStr (Kicklist, ", '" &chatdata (reciid,1) & "") <1 Then
kicklist=kicklist& "," "&chatdata (reciid,1) &" "
Chatpoin=chatpoin+1 MoD 50
Chatcomm (Chatpoin) = "'" &right ("0" &time,8) & ", System, 0, everyone, ff0000,0," &whoto& "IP was kicked out of the chat room by the administrator" "
Application.Lock
Application ("Kicklist") =kicklist
Application ("Chatpoin") =chatpoin
Application ("Chatcomm") =chatcomm
Application.UnLock
End If
End If
Case "Name"
If reciid<51 and Sendid<>reciid then
Kicklist=application ("Kicklist")
If InStr (Kicklist, ", ' #" &chatdata (reciid,0) & "") <1 Then
kicklist=kicklist& ", ' #" &chatdata (reciid,0) & ""
Chatpoin=chatpoin+1 MoD 50
Tmp=chatdata (reciid,0)
Chatdata (reciid,0) = ""
Chatdata (reciid,1) = ""
For I=0 to 50
Chatdata (i,4) = (chatdata (i,4) mod 4) # +4
Next
Chatcomm (Chatpoin) = "'" &right ("0" &time,8) & ", System, 0, everyone, ff0000,0," &whoto& "was kicked out of the chat room by the admin" "
Application.Lock
Application ("Kicklist") =kicklist
Application ("Chatpoin") =chatpoin
Application ("Chatcomm") =chatcomm
Application ("Chatdata") =chatdata
Application ("Onliuser") =replace (Application ("Onliuser"), ", '" &tmp& "", "")
Application.UnLock
End If
End If
End Select
End If
End If


function Finduser (fuser)
reval=51
For I=0 to 50
If Chatdata (i,0) =fuser Then
Reval=i
Exit For
End If
Next
Finduser=reval
End Function
%>



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.