function MM_openBrWindow(theURL,winName,features) { //v2.0 window.open(theURL,winName,features); } <% Dim strQ,login_o 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 set rs1 = server.createobject("ADODB.RecordSet") StrSq1="SELECT * FROM tblSettings" rs1.open StrSq1,cString,3,3 set rsp = server.createobject("ADODB.RecordSet") StrSqp="SELECT * FROM tblSettings where o_online = 1" rsp.open StrSqp,cString if rsp.EOF then %> document.write("/chat/email.asp','chat','width=400,height=320,status=no')\">/chat/images/off.png>"); <% else %> document.write("/chat/','chat','width=400,height=320,status=no')\">/chat/images/on.png>"); <% NomeOperador = rsp("OperatorName") login_o = rsp("login") end if 'if rs1.recordcount => CInt("3") then 'set rs0 = server.createobject("ADODB.RecordSet") 'StrSq0_0="SELECT TOP 1 * FROM tblSettings where o_ocupado <> 1 AND o_online = 1 order by id desc " 'rs0.open StrSq0_0,cString 'if rs0.EOF then %> <% 'else %> <% 'NomeOperador = rs0("OperatorName") 'login_o = rs0("login") 'end if 'end if %>