允许一个IP允许多投,又不让反复刷票,加个投票间隔时间限制一下,按你的文件参考下边
Sub Vote()
If UserTF=1 and LoginTF=False Then
Response.Write "<script>alert('对不起,只有登录会员才能投票!');history.back(-1);</script>"
Response.End()
End If
if Request.Cookies("LastTime") <>"" then
Response.Write "<script>alert('两分钟内仅能为一位选手投票,谢谢您参与');history.back();</script>"
Response.End() //跳转到查看投票结果的网页
else
Response.Cookies("LastTime") = now()
Response.Cookies("LastTime").Expires = dateadd("S",120,now()) //红色这块可以改时间限制,这个是定义的每次投票间隔120秒。另外服务器上的时间必须准。
end if
if UserGroup<>"0" and KS.FoundInArr(UserGroup, KSUser.GroupID, ",")=False Then
Response.Write "<script>alert('对不起,您所在的会员组不允许投票!');history.back(-1);</script>"
Response.End()
End If
If UserIPTF=1 and not Conn.Execute("Select TOP 1 ID From KS_PhotoVote Where UserIp='" & KS.GetIP & "' and ChannelID=" & ChannelID & " And ClassID='" & ClassID & "'").eof Then
Response.Write "<script>alert('对不起,您已投过票,不能再投!');history.back();</script>"
Response.End()
End If