buyok_tj2.asp

来自「是一套很好的数码购物系统」· ASP 代码 · 共 44 行

ASP
44
字号
<!--#include file="include/buyok_shop_30_conn.asp"-->

<%
where=request("where")
IP=Request.ServerVariables("HTTP_X_FORWARDED_FOR")
If IP = "" Then IP=Request.ServerVariables("REMOTE_ADDR")
info=request.servervariables("http_user_agent")
response.cookies("buyok_user_ip")=ip


'更新访问统计基本数据
set rs=conn.Execute ("select * from count_total")
if rs("zzday")<>date() then
  conn.Execute("Update count_total set zzday=#"&date()&"#,yesterday=today,today=1,total=total+1")
else
  conn.Execute("Update count_total set today=today+1,total=total+1")
end if

'更新在线访客
set rs=server.createobject("adodb.recordset")
sql="select * from count_online where ip='"&IP&"' and datediff('h',time,now())<0.5"
rs.open sql,conn,1,3
if (rs.eof and rs.bof) then 
    rs.addnew
    rs("IP")=ip
    rs.update
end if
rs.close
set rs=nothing

'更新访问记录
set rs=server.createobject("adodb.recordset")
sql="select * from count_shop where  ip='"&IP&"' and date()=day and datediff('h',times,time())<2"
rs.open sql,conn,1,3
    if (rs.eof and rs.bof) then
    rs.addnew
    rs("IP")=IP
    rs("where")=where
    rs("info")=info
    rs.update
    end if
rs.close
set rs=nothing
%>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?