Music switch and image switch/do not flex switch operation file admin/dontimg.asp
<%
Option Explicit
Dim room,user,dd,ai,chatdata,sendid,dispstr,dispstr2
User=request.form ("User")
Dd=request.form ("DD")
Ai=request.form ("AI")
Chatdata=application ("Chatdata")
Sendid=finduser (user)
Select Case DD
Case "0"
If ai= "on" Then
Dispstr=right ("0" &time,8) & ", System, 0," &user& ", ff0000,0, you successfully opened the image and MIDI"
Dispstr2= "Parent.midisw=true;"
Else
Dispstr=right ("0" &time,8) & ", System, 0," &user& ", ff0000,0, you successfully shut off the image and MIDI"
Dispstr2= "Parent.midisw=false;"
End If
Case "1" ' do not want to flex operation
If ai= "on" Then
if (Chatdata (sendid,4) mod 2) =1 Then ' has been opened
Dispstr=right ("0" &time,8) & ", System, 0," &user& ", ff0000,0, do not make a scratch switch is already open
Else
Chatdata (sendid,4) =chatdata (sendid,4) +1
Application.Lock
Application ("Chatdata") =chatdata
Application.UnLock
Dispstr=right ("0" &time,8) & ", System, 0," &user& ", ff0000,0, successfully opened do not scratch function"
End If
Else
if (Chatdata (sendid,4) mod 2) =0 Then ' has been closed
Dispstr=right ("0" &time,8) & ", System, 0," &user& ", ff0000,0, please do not scratch the flex switch is off.
Else
Chatdata (sendid,4) =chatdata (sendid,4)-1
Application.Lock
Application ("Chatdata") =chatdata
Application.UnLock
Dispstr=right ("0" &time,8) & ", System, 0," &user& ", ff0000,0, successfully closed do not scratch function"
End If
End If
End Select
%>
<meta http-equiv= "Refresh" content= "4; Url=.. /refresh.asp?room=<% =room%>&user=<% =user%> ">
<script language= ' JavaScript ' >
<% if Dispstr2<> "" Then Response.Write dispstr2%>
Parent.comm=new Array (' <% =dispstr%> ');
Parent.writecomm ();</script>
<%
function Finduser (fuser)
Dim reval,i
reval=100
For I=0 to 99
If Chatdata (i,0) =fuser Then
Reval=i
Exit For
End If
Next
Finduser=reval
End Function
%>