set rstp=conn.execute("Select Count([ID]) From TouPiao Where IP='"&user_ip&"' and ArticleID="&ID&" and datediff(n,PostTime,getDate())<=80")
if not rstp.eof then
istp=rstp(0)
end if
tp_status=0
if istp>0 then
Response.Write ("<script language=javascript>alert('同一IP地址80分钟内只能对同一作品投票!');location='Class.asp'</script>")
response.End()
else
tp_status=1
end if
if tp_status=1 then
isql="INSERT INTO TouPiao(ArticleID,UserName,UserID,IP) VALUES ("&ArticleID&",'"&uName&"',"&uID&",'"&user_ip&"')"
Response.Write ("<script language=javascript>alert('恭喜你,投票成功!');location='Class.asp'</script>")
conn.execute(isql)
response.End()
end if