<% site = Request.ServerVariables("HTTP_REFERER")%> <% ip = Request.ServerVariables("REMOTE_ADDR")%> <% host = Request.ServerVariables("REMOTE_HOST")%> <% strNothing = "Bookmark" %> <% 'response.write(thePage) %> <% if not InStr(site,"www.nusantech.com?m=laporan")>0 then 'Create a connection to our database Set cnn = Server.CreateObject("ADODB.Connection") Set rst = Server.CreateObject("ADODB.Recordset") 'open your connection using a connection string 'cnn.Open "driver={Microsoft Access Driver (*.mdb)};;DBQ=c:/inetpub/foldername/where.mdb" cnn.open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & "C:/Domains/nusantech.com/db/traffic.mdb" & ";Persist Security Info=False" SQLstmt="SELECT * FROM Traffic WHERE Host='" & host & "' AND IP='" & ip & "'" set RS=cnn.execute(SQLstmt) if RS.EOF then sqltext = "SELECT * FROM Traffic" rst.Open sqltext,cnn,3,3 rst.AddNew if site = "" then rst("site")= strNothing else rst("site") = site end if rst("ip") = ip rst("host") = host rst("tarikh") = now() rst("page") = thePage rst.Update rst.close end if 'doesnt exist if not RS.EOF then DSNstr="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & "C:/Domains/nusantech.com/db/traffic.mdb" & ";Persist Security Info=False" set cn=server.createobject("ADODB.Connection") cn.connectionstring=DSNstr cn.open if site="" then SQLstmt="SELECT Site FROM Traffic WHERE Host='" & host & "' AND ip='" & IP & "'" Set RSa=cn.execute(SQLstmt) if not RSa.EOF then site=RSa("Site") if RSa.EOF then site="Refresh/Bookmark" RSa.close end if 'site="" SQLstmt="UPDATE Traffic SET Site='" & site & " " & themsg & "',Page='" & thePage & "',tarikh='" & now() & "' WHERE Host='" & host & "' AND ip='" & IP & "'" if InStr(site,"www.nusantech.com") then SQLstmt="UPDATE Traffic SET Page='" & thePage & "',tarikh='" & now() & "' WHERE Host='" & host & "' AND ip='" & IP & "'" 'response.write(SQLstmt) cn.execute(SQLstmt) cn.close set cn=nothing end if 'already exist RS.close cnn.close set cnn=nothing end if 'inStr %>