<% Set zeus = Server.Createobject("ADODB.Connection") zeus.Open ("DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath("../db/sayac.mdb")) 'if session("sayac")=""true then Set RS = Server.Createobject("ADODB.Recordset") RS.open "SELECT * FROM hit where gun="& day(date()) &" and ay="& month(date()) &" and sene="& year(date()) &"" ,zeus,1,3 if rs.eof then rs.addnew rs("hit") = 1 rs("cogul") = 1 rs("gun") = day(date()) rs("ay") = month(date()) rs("sene") = year(date()) else IF Request.Cookies("sayac")("Sitez") = "" THEN rs("hit") = rs("hit") + 1 END IF rs("cogul") = rs("cogul") + 1 end if rs.update rs.close set rs = nothing Set rs = zeus.execute("Select * from hit where gun="& day(date()) &" and ay="& month(date()) &" and sene="& year(date()) &"") tekilhit = rs("hit") cogulhit = rs("cogul") sene=rs("sene") '***Referans Motoru Başlıyor gelinen = Request.ServerVariables("http_referer") if gelinen <> "" then Set RS = Server.Createobject("ADODB.Recordset") rs.open "SELECT * FROM gelen where site='"&gelinen&"' and gun="&day(date())&" and ay="&month(date())&" and sene="&year(date())&"", zeus, 1, 3 if not rs.eof then IF Request.Cookies("sayac")("Sitez") = "" THEN rs("hit") = rs("hit") + 1 END IF rs("cogul") = rs("cogul") + 1 else rs.addnew rs("site") = gelinen rs("hit") = 1 rs("cogul") = 1 rs("gun") = day(date()) rs("ay") = month(date()) rs("sene") = year(date()) end if rs.update rs.close set rs = nothing end if 'Set rs = zeus.execute("DELETE * from gelen where sene < "&year(date())&"") '***Browser ve Sistem Motoru Başlıyor ua = Request.ServerVariables("HTTP_USER_AGENT") If Instr(ua, "MSIE") Then If Instr(ua, "MSIE 6.") Then Browser = "Microsoft Internet Explorer 6.x" Elseif Instr(ua, "MSIE 5.") Then Browser = "Microsoft Internet Explorer 5.x" Elseif Instr(ua, "MSIE 4.") Then Browser = "Microsoft Internet Explorer 4.x" Elseif Instr(ua, "MSIE 3.") Then Browser = "Microsoft Internet Explorer 3.x" If Instr(ua, "MSIE 3.02") Then Browser = "Microsoft Internet Explorer 3.02" End If Else Browser = "Microsoft Internet Explorer" End If ElseIf Instr(ua, "Mozilla") and Instr(ua, "compatible") = 0 Then If Instr(ua, "Mozilla/4") Then Browser = "Netscape Navigator 4.x" Elseif Instr(ua, "Mozilla/3") Then Browser = "Netscape Navigator 3.x" Else Browser = "Netscape Navigator" End If End If If Instr(ua, "Windows 95") or Instr(ua, "Win95") Then System = "Windows 95" Elseif Instr(ua, "Windows 98") or Instr(ua, "Win98") Then System = "Windows 98" Elseif Instr(ua, "Windows 2000") or Instr(u, "Win2000") Then System = "Windows 2000" Elseif Instr(ua, "Windows XP") or Instr(u, "Win2000") Then System = "Windows XP" Elseif Instr(ua, "NT") or Instr(ua, "NT") Then System = "Windows NT" Elseif Instr(ua, "Mac") Then System = "Mac" If Instr(ua, "PowerPC") or Instr(ua, "PPC") Then System = "Mac PPC" Elseif Instr(ua, "68000") or Instr(ua, "68K") Then System = "Mac 68K" End If Elseif Instr(ua, "X11") Then System = "UNIX" End If Set RS = Server.Createobject("ADODB.Recordset") rs.open "SELECT * FROM browser where gun="&day(date())&" and ay="&month(date())&" and sene="&year(date())&" and browser='"&browser&"'", zeus, 1, 3 if not rs.eof then IF Request.Cookies("sayac")("Sitez") = "" THEN rs("hit") = rs("hit") + 1 END IF rs("cogul") = rs("cogul") + 1 else rs.addnew rs("browser") = browser rs("hit") = 1 rs("cogul") = 1 rs("gun") = day(date()) rs("ay") = month(date()) rs("sene") = year(date()) end if rs.update rs.close set rs = nothing 'Set rs = zeus.execute("DELETE * from browser where sene < "&year(date())&"") Set RS = Server.Createobject("ADODB.Recordset") rs.open "SELECT * FROM sistem where sistem='"&system&"' and gun="&day(date())&" and ay="&month(date())&" and sene="&year(date())&"", zeus, 1, 3 if not rs.eof then IF Request.Cookies("sayac")("Sitez") = "" THEN rs("hit") = rs("hit") + 1 END IF rs("cogul") = rs("cogul") + 1 else rs.addnew rs("sistem") = system rs("hit") = 1 rs("cogul") = 1 rs("gun") = day(date()) rs("ay") = month(date()) rs("sene") = year(date()) end if rs.update rs.close set rs = nothing 'Set rs = zeus.execute("DELETE * from sistem where sene < "&year(date())&"") 'end if Set RS = Server.Createobject("ADODB.Recordset") rs.open "Select * from hit", zeus, 1, 3 rsx=rs.recordcount for i= 1 to rsx hittir= hittir + rs("hit") rs.movenext next rs.close set rs = nothing Response.Cookies("sayac")("Sitez") = "x" Response.Cookies("sayac").Expires= date + 1 zeus.close set zeus=nothing session("sayac")="true" %>