%
Dim strQ
strQ = Request.querystring("Q")
IF strQ = "1" THEN strQ = strTxtAdminRequest ELSE strQ = "" END IF
%>
<%
'Set some variables
Dim rsChatRequest2 'Chat request record sheet
'Open a new connection to the database
adoCon.Open cString
'Create new SQL string
StrSQL="SELECT * FROM tblActiveUsers WHERE IP='" & strIPAddress & "';"
'Create new record sheet
set rsChatRequest2 =Server.CreateObject("ADODB.Recordset")
'Set cursor and locktypes
rsChatRequest2.CursorType = 2
rsChatRequest2.LockType = 3
'Open row data where the logged in users IP equals the IP in the database
rsChatRequest2.open StrSQL, CString
'Set
rsChatRequest2.fields("ChatRequest")=0
rsChatRequest2.Update
'Close record sheet and clean up
rsChatRequest2.Close
Set rsChatRequest2 = Nothing
%>
<%
'Redirect the administrator if the password in query string matches the one in the database
IF strAdminPass = QstrAdminPass THEN Response.redirect("chat.asp?addpass="&strAdminPass&"&ID="&intUsrID)
%>