% //Cookies application lastVisit=request.Cookies("lastvisit") if lastVisit="" then response.Cookies("lastvisit")=now() else response.Cookies("lastvisit")=now() end if //Stop repeating counter sid=session("sid") Set Con = Server.CreateObject("ADODB.Connection") Con.Mode = 3 Con.open "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=C:\Inetpub\vhosts\wongpoon.com.hk\httpdocs\administration\wongpoon.mdb" set rs900=server.CreateObject("adodb.recordset") SQL900="select euserID from statistic order by euserID desc" set rs900=con.Execute(SQL900) if sid="" then session("sid")=session.SessionID if rs900.bof and rs900.eof = true then neweuserID=1 else rs900.movefirst neweuserID=rs900("euserID")+1 end if //***************************** //Get user IP address uip=Request.ServerVariables("remote_addr") set rs901=server.CreateObject("adodb.recordset") SQL901="insert into statistic values("&neweuserID&",'"&now&"','"&uip&"')" set rs901=con.Execute(SQL901) else rs900.movefirst neweuserID=rs900("euserID") end if %>
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||