登陆用户统计代码!

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<TITLE>记录登陆者,以及记录登陆者是否在线</TITLE>
<META http-equiv=Content-Type content="text/html; charset=utf-8">
<META http-equiv=Content-Language content="utf-8">
<META http-equiv="Pragma" content="no-cache">
<META name="copyright" content="www.ilovereplica.com      replica handbags ">
<META name="author" content="www.ilovereplica.com       replica handbags ">
<link rel="stylesheet" href="images/cp.css" _fcksavedurl=""images/cp.css"" _fcksavedurl=""images/cp.css"" _fcksavedurl=""images/cp.css"" _fcksavedurl=""images/cp.css"" type="text/css">
<meta http-equiv="refresh" content="10">
</head>
<body bgcolor="" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onMouseOver="window.status=' www.ilovereplica.com replica handbags ';return true">
<!--#include file="引用ip归属地.asp"-->
<%ipname=request.ServerVariables("HTTP_X_FORWARDED_FOR")
if ipname="" then
ipname=request.ServerVariables("REMOTE_ADDR")
end if%>
<!--#include file="打开数据库连接.asp"-->
<%set rs=server.CreateObject("adodb.recordset")
rs.Open "select * from denglu_user where ipname='"&ipname&"'" ,conn,1,3
dim ipname
if rs.eof then
 rs.addnew
 rs("ipname")=ipname
 rs("shijian")=1
 rs("lastlogin")=now()
 rs("cip")=cip
 rs("naddress")=naddress(cIp)
 rs("Windows1")=Windows
 rs("IE1")=IE
 session("ipname")=ipname
 session("shijian")=rs("shijian")
 rs.update
else
 if datediff("n",rs("lastlogin"),now())>1 then
 rs("shijian")=rs("shijian")+1
 rs("lastlogin")=now()
 rs("cip")=cip
 rs("naddress")=naddress(cIp)
 rs("Windows2")=Windows
 rs("IE2")=IE
 session("ipname")=ipname
 session("shijian")=rs("shijian")
 rs.update
 rs.close
 end if
end if%>
<%session("ipname")=ipname%>
<%conn.execute "update denglu_user set h='"&now()&"', f=1 where ipname='"&session("ipname")&"'"%>

本文由replica 发表在 http://www.ilovereplica.com/ 上!

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值