一个登陆时间问题

来源:百度知道 编辑:UC知道 时间:2024/05/13 02:49:38
因为要做一个加积分的! 所以限制一下!请问一下

If DateDiff("n",rs("lasttime"),Now())>5 then

是什么意思! 是等于5分钟!还是5个小时! 还是5天!

if rs.eof or userpwd<>rs("userpwd") then
response.write"<SCRIPT language=JavaScript>alert('用户名或密码有错误!');"
response.write"javascript:history.go(-1)</SCRIPT>"
response.end
else
Userip = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
If Userip = "" Then userip = Request.ServerVariables("REMOTE_ADDR")
lastip=Userip
response.cookies("s_lastip")=rs("lastip")
rs("lastip")=lastip
response.cookies("dat")=rs("lasttime")
rs("lastip")=lastip
If DateDiff("n",rs("lasttime"),Now())>5 then
rs("Cishu")=rs("Cishu")+1
rs("jf")=rs("jf")+5

End If

DateDiff("n",rs("lasttime"),Now())>5 then
"n" 表示分钟
m 月

y 年

s 秒

h 小时

只用时间控制就行了,IP不需要,如果你觉得需要,加上也没关系。

反对哈佛罗阿放大率