<% Set Conn=CreateObject("ADODB.Connection") Conn.open "DRIVER= {Microsoft Access Driver (*.mdb)}; DBQ=" & server.mappath("2008cprsayac.mdb") %> <% Function Tarih() if instr(date,"/") then Tarih="#" & date & "#" Else Tarih="#" & mid(date,4,2) & "/" & left(date,2) & "/" & right(date,4) & "#" End if End function Dim Conn, Rs, Sql, Gunluk, Start, Toplam, Sil, Ip, Ekle, toplamtek, buguntek, Gizli Ip=Request.ServerVariables("REMOTE_ADDR") Nereden=Request.ServerVariables("HTTP_REFERER") %> <% Set Rs=Server.CreateObject("ADODB.Recordset") Sql="SELECT * FROM TabloIp WHERE ip='" & Ip & "' AND date=" & Tarih Rs.open Sql, Conn, 1, 3 if Rs.recordcount=0 then Ekle=1 Rs.addnew Rs("ip")=Ip Rs("nereden")=nereden Rs("date")=date Rs("time")=time Rs.update Else Ekle=0 End if Rs.close Sql="SELECT * FROM TabloTek" Rs.open Sql, Conn,1,3 if Rs("toplam")=0 then Rs("start")=date else if Rs("enson")<>date then Rs("buguntek")=0 Rs("bugun")=0 Sql="DELETE FROM TabloIp WHERE date<" & Tarih & "-30" Set sil=Conn.execute(Sql) Set sil=nothing End if End if Rs("toplam")=Rs("toplam")+1 Toplam=Rs("toplam") Rs("bugun")=Rs("bugun")+1 Gunluk=Rs("bugun") Rs("toplamtek")=Rs("toplamtek")+Ekle Rs("buguntek")=Rs("buguntek")+Ekle toplamtek=Rs("toplamtek") buguntek=Rs("buguntek") Rs("enson")=date Rs.update Start=Rs("start") Rs.close Set Rs=nothing Conn.close Set Conn=nothing Gizli=0 if Gizli=0 then %> <% End if %>