% on error resume next function fUserAgent(ua) if instr(ua, "Opera") then if instr(ua, "Opera 3.") then strBrowser = "Opera 3.x" elseif instr(ua, "Opera 4.") then strBrowser = "Opera 4.x" elseif instr(ua, "Opera 5.") then strBrowser = "Opera 5.x" elseif instr(ua, "Opera 6.") then strBrowser = "Opera 6.x" else strBrowser = "Opera" end if elseif instr(ua, "MSIE") then if instr(ua, "MSIE 6.") then strBrowser = "Microsoft IE 6.x" elseif instr(ua, "MSIE 5.") then strBrowser = "Microsoft IE 5.x" elseif instr(ua, "MSIE 7.") then strBrowser = "Microsoft IE 7.x" elseif instr(ua, "MSIE 4.") then strBrowser = "Microsoft IE 4.x" elseif instr(ua, "MSIE 3.") then strBrowser = "Microsoft IE 3.x" if instr(ua, "MSIE 3.02") then strBrowser = "Microsoft IE 3.02" end if else strBrowser = "Microsoft IE" end if elseif instr(ua, "Mozilla") and instr(ua, "compatible") = 0 then if instr(ua, "Netscape7") then strBrowser = "Netscape 7.x" elseif instr(ua, "Netscape6") then strBrowser = "Netscape 6.x" elseif instr(ua, "Mozilla/4") then strBrowser = "Netscape Navigator 4.x" elseif instr(ua, "Mozilla/5") then strBrowser = "Firefox" elseif instr(ua, "Mozilla/3") then strBrowser = "Netscape Navigator 3.x" elseif instr(ua, "Netscape") then strBrowser = "Netscape" else if instr(ua, "Mozilla/5") then strBrowser = Mid(ua, instr(ua, "rv:")+3) strBrowser = Mid(strBrowser, 1, instr(strBrowser, ")")) strBrowser = Mid(strBrowser, 1, Len(strBrowser)-1) strBrowser = "Mozilla " & strBrowser else strBrowser = "Mozilla" end if end if else strBrowser = "Sinistro" end if if instr(ua, "ia_archiver") then strBrowser = "Alexa.Com" if instr(ua, "Googlebot") then strBrowser = "Google" if instr(ua, "Safari") then strBrowser = "Google" if instr(ua, "TeomaAgent") then strBrowser = "Teoma.Com" if instr(ua, "Zyborg") then strBrowser = "Wisenut.Com" if instr(ua, "Gulliver") then strBrowser = "NorthernLight.com" if instr(ua, "Architext") then strBrowser = "Excite.com" if instr(ua, "FAST-WebCrawler") then strBrowser = "AllTheWeb.com" if instr(ua, "Slurp") then strBrowser = "Inktomi.com" if instr(ua, "Jeeves") then strBrowser = "AskJeeves.com" if instr(ua, "Scooter") then strBrowser = "AltaVista.com" if instr(ua, "Mercator") then strBrowser = "AltaVista.com" if instr(ua, "crawler@fast") then strBrowser = "AllTheWeb.com" if instr(ua, "Crawler") then strBrowser = "Crawler.de" if instr(ua, "InfoSeek") then strBrowser = "InfoSeek.com" if instr(ua, "Lycos") then strBrowser = "Lycos.com" if instr(ua, "Fluffy") then strBrowser = "SearchHippo.com" if instr(ua, "Ultraseek") then strBrowser = "InfoSeek.com" if instr(ua, "MantraAgent") then strBrowser = "LookSmart.com" if instr(ua, "Moget") then strBrowser = "Goo.jp" if instr(ua, "T-H-U-N-D-E-R-S-T-O-N-E") then strBrowser = "Thunderstone.com" if instr(ua, "MuscatFerret") then strBrowser = "Euroferret.com" if instr(ua, "VoilaBot") then strBrowser = "Voila.fr" if instr(ua, "Sleek Spider") then strBrowser = "Search-info.com" if instr(ua, "KIT_Fireball") then strBrowser = "FireBall.de" if instr(ua, "WebCrawler") then strBrowser = "Webcrawler.com" if instr(ua, "wombat") then strBrowser = "Web Wombat" if instr(ua, "Windows 95") or instr(ua, "Win95") then strSystem = "Windows 95" elseif instr(ua, "Win 9x 4.90") then strSystem = "Windows ME" elseif instr(ua, "Windows 98") or instr(ua, "Win98") then strSystem = "Windows 98" elseif instr(ua, "Windows 3.1") or instr(ua, "Win16") then strSystem = "Windows 3.x/Windows NT 3.x" elseif instr(ua, "NT 5.0") or instr(ua, "Windows 2000") then strSystem = "Windows 2000" elseif instr(ua, "NT 5.1") or instr(ua, "Windows XP") then strSystem = "Windows XP" elseif instr(ua, "NT") or instr(os, "NT") then strSystem = "Windows NT" elseif instr(ua, "Mac") then strSystem = "Mac" if instr(ua, "PowerPC") or instr(ua, "PPC") then strSystem = "Mac PPC" elseif instr(ua, "68000") or instr(ua, "68K") then strSystem = "Mac 68K" end if elseif instr(ua, "Linux") then strSystem = "Linux" elseif instr(ua, "X11") then strSystem = "UNIX" else strSystem = "Sinistro" end if if strSystem =" Sinistro " then strSystem = "Spider/Bot From" fUserAgent = strSystem & " - " & strBrowser end function function fUserAgent1(ua) if instr(ua, "Opera") then if instr(ua, "Opera 3.") then strBrowser = "Opera 3.x" elseif instr(ua, "Opera 4.") then strBrowser = "Opera 4.x" elseif instr(ua, "Opera 5.") then strBrowser = "Opera 5.x" elseif instr(ua, "Opera 6.") then strBrowser = "Opera 6.x" else strBrowser = "Opera" end if elseif instr(ua, "MSIE") then if instr(ua, "MSIE 6.") then strBrowser = "Microsoft IE 6.x" elseif instr(ua, "MSIE 5.") then strBrowser = "Microsoft IE 5.x" elseif instr(ua, "MSIE 7.") then strBrowser = "Microsoft IE 7.x" elseif instr(ua, "MSIE 4.") then strBrowser = "Microsoft IE 4.x" elseif instr(ua, "MSIE 3.") then strBrowser = "Microsoft IE 3.x" if instr(ua, "MSIE 3.02") then strBrowser = "Microsoft IE 3.02" end if else strBrowser = "Microsoft IE" end if elseif instr(ua, "Mozilla") and instr(ua, "compatible") = 0 then if instr(ua, "Netscape7") then strBrowser = "Netscape 7.x" elseif instr(ua, "Netscape6") then strBrowser = "Netscape 6.x" elseif instr(ua, "Mozilla/4") then strBrowser = "Netscape Navigator 4.x" elseif instr(ua, "Mozilla/5") then strBrowser = "Firefox" elseif instr(ua, "Mozilla/3") then strBrowser = "Netscape Navigator 3.x" elseif instr(ua, "Netscape") then strBrowser = "Netscape" else if instr(ua, "Mozilla/5") then strBrowser = Mid(ua, instr(ua, "rv:")+3) strBrowser = Mid(strBrowser, 1, instr(strBrowser, ")")) strBrowser = Mid(strBrowser, 1, Len(strBrowser)-1) strBrowser = "Mozilla " & strBrowser else strBrowser = "Mozilla" end if end if else strBrowser = "Sinistro" end if if instr(ua, "ia_archiver") then strBrowser = "Alexa.Com" if instr(ua, "Googlebot") then strBrowser = "Google" if instr(ua, "Safari") then strBrowser = "Google" if instr(ua, "TeomaAgent") then strBrowser = "Teoma.Com" if instr(ua, "Zyborg") then strBrowser = "Wisenut.Com" if instr(ua, "Gulliver") then strBrowser = "NorthernLight.com" if instr(ua, "Architext") then strBrowser = "Excite.com" if instr(ua, "FAST-WebCrawler") then strBrowser = "AllTheWeb.com" if instr(ua, "Slurp") then strBrowser = "Inktomi.com" if instr(ua, "Jeeves") then strBrowser = "AskJeeves.com" if instr(ua, "Scooter") then strBrowser = "AltaVista.com" if instr(ua, "Mercator") then strBrowser = "AltaVista.com" if instr(ua, "crawler@fast") then strBrowser = "AllTheWeb.com" if instr(ua, "Crawler") then strBrowser = "Crawler.de" if instr(ua, "InfoSeek") then strBrowser = "InfoSeek.com" if instr(ua, "Lycos") then strBrowser = "Lycos.com" if instr(ua, "Fluffy") then strBrowser = "SearchHippo.com" if instr(ua, "Ultraseek") then strBrowser = "InfoSeek.com" if instr(ua, "MantraAgent") then strBrowser = "LookSmart.com" if instr(ua, "Moget") then strBrowser = "Goo.jp" if instr(ua, "T-H-U-N-D-E-R-S-T-O-N-E") then strBrowser = "Thunderstone.com" if instr(ua, "MuscatFerret") then strBrowser = "Euroferret.com" if instr(ua, "VoilaBot") then strBrowser = "Voila.fr" if instr(ua, "Sleek Spider") then strBrowser = "Search-info.com" if instr(ua, "KIT_Fireball") then strBrowser = "FireBall.de" if instr(ua, "WebCrawler") then strBrowser = "Webcrawler.com" if instr(ua, "wombat") then strBrowser = "Web Wombat" fUserAgent1 = strBrowser end function %> <% site1 = request("site") If Session("Log") = false Then function data() dia = day(date()) if day(date()) <= 9 then dia = "0" & day(date()) end if mes = month(date()) if month(date()) <= 9 then mes = "0" & month(date()) end if ano = year (date()) data = dia & "/" & mes & "/" & ano & "" end function b = Request.ServerVariables("REMOTE_ADDR") c = fUserAgent(Request.ServerVariables("HTTP_USER_AGENT")) D_Source = "D:\hshome\diogocury\db\celebrityicarai.mdb" P_Source = "d41d8cd98f00b204e980" strConnString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & D_Source &";Jet OLEDB:Database Password=" & P_Source & "" Set Conn = Server.CreateObject("ADODB.Connection") Conn.Open strConnString Set oRsVisita = Server.CreateObject("ADODB.Recordset") oRsVisita.Open "SELECT * from CONTADOR Where DATA ='" & data() & "'" , conn if oRsVisita.eof then conn.Execute("INSERT into CONTADOR (data, contador) values ('" & data() & "',' 1 ')") else if oRsVisita.Fields("Contador") <> "" then contdio = oRsVisita.Fields("Contador") + 1 Conn.Execute("Update CONTADOR set contador= '" & contdio & "' WHERE DATA ='" & data() & "' ") else cont2 = "1" Conn.Execute("Update CONTADOR set contador= '"& cont2 &"' WHERE DATA ='" & data() & "' ") end if if site1 = "" then if oRsVisita.Fields("Outros") <> "" then site2 = oRsVisita.Fields("Outros") + 1 Conn.Execute("Update CONTADOR set OUTROS = " & site2 & " WHERE DATA ='" & data() & "' ") else site2 = "1" Conn.Execute("Update CONTADOR set OUTROS = '"& site2 &"' WHERE DATA ='" & data() & "' ") end if elseif site1 = "google" then if oRsVisita.Fields("GOOGLE_MAUA") <> "0" then site2 = oRsVisita.Fields("GOOGLE_MAUA") + 1 Conn.Execute("Update CONTADOR set GOOGLE_MAUA= " & site2 & " WHERE DATA ='" & data() & "' ") else site2 = "1" Conn.Execute("Update CONTADOR set GOOGLE_MAUA = '"& site2 &"' WHERE DATA ='" & data() & "' ") end if elseif site1 = "google_Penedo" then if oRsVisita.Fields("google_Penedo") <> "" then site2 = oRsVisita.Fields("google_Penedo") + 1 Conn.Execute("Update CONTADOR set google_Penedo= " & site2 & " WHERE DATA ='" & data() & "' ") else site2 = "1" Conn.Execute("Update CONTADOR set google_Penedo = '"& site2 &"' WHERE DATA ='" & data() & "' ") end if elseif site1 = "Viscondedemaua.com.br" then if oRsVisita.Fields("VISCONDEDEMAUA") <> "" then site2 = oRsVisita.Fields("VISCONDEDEMAUA") + 1 Conn.Execute("Update CONTADOR set VISCONDEDEMAUA= " & site2 & " WHERE DATA ='" & data() & "' ") else site2 = "1" Conn.Execute("Update CONTADOR set VISCONDEDEMAUA = '"& site2 &"' WHERE DATA ='" & data() & "' ") end if elseif site1 = "GuiaMaua" then if oRsVisita.Fields("GuiaMaua") <> "" then site2 = oRsVisita.Fields("GuiaMaua") + 1 Conn.Execute("Update CONTADOR set GuiaMaua= " & site2 & " WHERE DATA ='" & data() & "' ") else site2 = "1" Conn.Execute("Update CONTADOR set GuiaMaua = '"& site2 &"' WHERE DATA ='" & data() & "' ") end if elseif site1 = "Yahoo_searchmkt" then if oRsVisita.Fields("YAHOO_SEARCH_MKT") <> "" then site2 = oRsVisita.Fields("YAHOO_SEARCH_MKT") + 1 Conn.Execute("Update CONTADOR set YAHOO_SEARCH_MKT= " & site2 & " WHERE DATA ='" & data() & "' ") else site2 = "1" Conn.Execute("Update CONTADOR set YAHOO_SEARCH_MKT = '"& site2 &"' WHERE DATA ='" & data() & "' ") end if elseif site1 = "EMAIL" then if oRsVisita.Fields("EMAIL") <> "" then site2 = oRsVisita.Fields("EMAIL") + 1 Conn.Execute("Update CONTADOR set EMAIL= " & site2 & " WHERE DATA ='" & data() & "' ") else site2 = "1" Conn.Execute("Update CONTADOR set EMAIL = '"& site2 &"' WHERE DATA ='" & data() & "' ") end if elseif site1 = "promo" then if oRsVisita.Fields("PROMO") <> "" then site2 = oRsVisita.Fields("PROMO") + 1 Conn.Execute("Update CONTADOR set PROMO= " & site2 & " WHERE DATA ='" & data() & "' ") else site2 = "1" Conn.Execute("Update CONTADOR set PROMO = '"& site2 &"' WHERE DATA ='" & data() & "' ") end if elseif site1 = "portal" then if oRsVisita.Fields("PORTAL") <> "" then site2 = oRsVisita.Fields("PORTAL") + 1 Conn.Execute("Update CONTADOR set PORTAL= " & site2 & " WHERE DATA ='" & data() & "' ") else site2 = "1" Conn.Execute("Update CONTADOR set PORTAL = '"& site2 &"' WHERE DATA ='" & data() & "' ") end if elseif site1 = "viscorgbr" then if oRsVisita.Fields("viscorgbr") <> "" then site2 = oRsVisita.Fields("viscorgbr") + 1 Conn.Execute("Update CONTADOR set viscorgbr= " & site2 & " WHERE DATA ='" & data() & "' ") else site2 = "1" Conn.Execute("Update CONTADOR set viscorgbr = '"& site2 &"' WHERE DATA ='" & data() & "' ") end if elseif site1 = "visite" then if oRsVisita.Fields("VISITE") <> "" then site2 = oRsVisita.Fields("VISITE") + 1 Conn.Execute("Update CONTADOR set VISITE= " & site2 & " WHERE DATA ='" & data() & "' ") else site2 = "1" Conn.Execute("Update CONTADOR set VISITE = '"& site2 &"' WHERE DATA ='" & data() & "' ") end if end if end if conn.Execute("INSERT into VISITANTES (data, hora, ip, navegador, site) values ('" & data() & "','" & time() & "','" & b & "','" & c & "','" & site1 & "')") session("Log") = true conn.close set conn = nothing end if %>
![]() |