'读取时间
function ReadTimefromCookies() as integer
if Not request.Cookies.Item("ReTime"
is Nothing then
ReadTimefromCookies=20-(int(Timer())-val(request.Cookies.Item("ReTime"
.values("lastTime"
))
else
ReadTimefromCookies=0
End if
End function
'记录回帖时间
Sub wirteTimeToCookies()
response.Cookies.Item("ReTime"
.values("lastTime"
=Int(Timer())
response.Cookies.Item("ReTime"
.Expires=DateTime.now.AddDays(1)
End Sub
‘验证是否小于30秒
function validateOfCookies() as boolean
Dim i as integer
if Not request.Cookies.Item("ReTime"
is Nothing then
i = int(Timer())-Val(request.Cookies.Item("ReTime"
.values("lastTime"
)
if i>=20 then
validateOfCookies=true
Else
validateOfCookies=false
End if
Else
validateOfCookies=true
End if
End function