<% ' PcSoft Sayaç ' www.pcindir.com %> <%Set bag = Server.CreateObject("ADODB.Connection") bag.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("../db/sayac-kupa-bar.MDB")%> <% bugun="BUGUN" Set RS=server.createObject("ADODB.Recordset") sor = "select*from sayac " RS.open sor,Bag,1,3 rs.movefirst if rs("tarih") = date then RS.fields("ziyaret") = rs.fields("ziyaret") + 1 saybugun=rs("ziyaret") else rs("tarih")=date rs("ziyaret") = 1 saybugun=1 end if rs.getrows(1) rs("tarih") = date rs("ziyaret") = rs("ziyaret") + 1 saytoplam=rs("ziyaret") RS.update%> <% sure=1 ip=Request.ServerVariables("REMOTE_ADDR") Set kset = Server.Createobject("ADODB.Recordset") sql = "SELECT * FROM online where ip='"& ip &"'" kset.open sql, bag, 1, 3 ip=Request.ServerVariables("REMOTE_ADDR") Set kset = Server.Createobject("ADODB.Recordset") sql = "SELECT * FROM online where ip='"& ip &"'" kset.open sql, bag, 1, 3 If kset.eof Then kset.addnew kset("ip")=ip kset("tarih")=now else kset("tarih")=now end if kset.update kset.Close Set kset = Nothing Set kset = Server.Createobject("ADODB.Recordset") sql = "SELECT * FROM online" kset.open sql, bag, 1, 3 Do While Not kset.eof zaman=datediff("n",kset("tarih"),now) if zaman > sure then sql = "DELETE FROM online WHERE ip = '"&kset("ip")&"'" Set sil = bag.execute(sql) Set sil = Nothing end if kset.movenext Loop online = kset.RecordCount kset.Close Set kset = Nothing bag.Close Set bag = Nothing%> <%dim num%>
  Toplam Hit : <%Response.Write "" & saytoplam & ""%>