 |
<%
dim objRS
dim objrs1
dim countnum
dim ifound
set objRS1=Server.CreateObject("ADODB.Recordset")
objRS1.Open "delete * FROM visits where datediff('d',"& date & ", date)>1", _
strConnectDb3,adOpenStatic,adLockOptimistic,adCmdText
set objRS1=Nothing
set objRS1=Server.CreateObject("ADODB.Recordset")
objRS1.Open "select * FROM visits", _
strConnectDb3,adOpenStatic,adLockOptimistic,adCmdText
ifound=false
while not objrs1.eof
if objrs1("ipaddress")=request.servervariables("REMOTE_ADDR") then
ifound=true
end if
objrs1.movenext
wend
set objRS=Server.CreateObject("ADODB.Recordset")
objRS.Open "Select * FROM counterhits where company='nnlinks'", _
strConnectDb1,adOpenStatic,adLockOptimistic,adCmdText
countnum=objrs("hitcount")+1
objrs("hitcount")=countnum
objrs.update
objrs.close
objRS.Open "Select * FROM counterhits where company='plantmates'", _
strConnectDb1,adOpenStatic,adLockOptimistic,adCmdText
if ifound=false then
countnum=objrs("hitcount")+1
objrs("hitcount")=countnum
objrs.update
objrs1.addnew
objrs1("date")=date
objrs1("ipaddress")=request.servervariables("REMOTE_ADDR")
objrs1.update
else
countnum=objrs("hitcount")
end if
objrs.close
objrs1.close
response.write "You are visitor number: " & countnum &""
%>
Copyright © 2003, All Rights Reserved, Last Modified May 12, 2008 Site Designed and Hosted by
Nashville Netlinks,
Inc. · Webmaster: Denise Fair
|
|