%@ language="vbscript"%> <% sub counter0(titlenm) set conn=server.createObject("ADODB.Connection") dbpath=server.mappath("/research/research.asa") conn.open "driver={Microsoft Access Driver (*.mdb)};dbq="&dbpath set ts=server.createobject("ADODB.Recordset") ts.LockType=2 sqlstr="select * from index where name='" & trim(titlenm) & "'" ts.open sqlstr,conn if ts.eof then ts.addnew ts("name")=trim(titlenm) ts("num")=1 ts("datatime")=now() else ts("num")=ts("num")+1 ts("datatime")=now() end if ts.update ts.close set ts=nothing set conn=nothing end sub %> <% dim IP,IPCstr IP=Request.ServerVariables("REMOTE_ADDR") counter0(IP) %> <% counter0("主页") %>
|