info_tj.asp
上传用户:btntkt
上传日期:2021-04-16
资源大小:5296k
文件大小:1k
源码类别:

WEB源码(ASP,PHP,...)

开发平台:

DOS

  1. <%
  2. where=Request.ServerVariables("HTTP_REFERER")
  3. IP = Request.ServerVariables("REMOTE_ADDR")
  4. response.cookies("dmwh_user_ip")=ip
  5. '更新访问统计基本数据
  6. set rs=conn.Execute ("select * from count_total")
  7. if rs("zzday")<>date() then
  8.   conn.Execute("Update count_total set zzday=#"&date()&"#,yesterday=today,today=1,total=total+1")
  9. else
  10.   conn.Execute("Update count_total set today=today+1,total=total+1")
  11. end if
  12. '更新在线访客
  13. set rs=server.createobject("adodb.recordset")
  14. sql="select * from count_online where ip='"&IP&"' and datediff('h',time,now())<1"
  15. rs.open sql,conn,1,3
  16. if (rs.eof and rs.bof) then 
  17.     rs.addnew
  18.     rs("IP")=ip
  19.     rs.update
  20. end if
  21. rs.close
  22. set rs=nothing
  23. '更新访问记录
  24. set rs=server.createobject("adodb.recordset")
  25. sql="select * from count_shop where  ip='"&IP&"' and date()=day and datediff('h',times,time())<2"
  26. rs.open sql,conn,1,3
  27.     if (rs.eof and rs.bof) then
  28.     rs.addnew
  29.     rs("IP")=IP
  30.     rs("where")=left(where,200)
  31.     rs.update
  32.     end if
  33. rs.close
  34. set rs=nothing
  35. %>