<!--#include file="conn.asp"-->
<%
TempId=cint(request.form("id"))
if TempId<>"" then
if request.ServerVariables("REMOTE_ADDR")=request.Cookies("IPAddress") then
response.Write("<script language='javascript'>")
response.Write("alert('感谢您的支持,您已经投过票了,请勿重新投票,谢谢!~')")
response.write("history.back();</script>")
else
response.Cookies("IpAddress")=request.ServerVariables("REMOTE_ADDR")
response.Cookies("IPAddress").Expires=Date()+1
sql="update tb_Vote set Number=Number+1 where bookID="&Tempid
rs.open sql,conn
set rs=nothing
conn.close
set conn=nothing
response.Write("投票成功,谢谢您的支持!~")
response.Redirect("vote.asp")
end if
end if
%
<!--#include file="conn.asp"-->
<%
TempId=cint(request.form("id"))
if TempId<>"" then
if not request.ServerVariables("REMOTE_ADDR")=request.Cookies("IPAddress") then '缺少not
response.Write("<script language='javascript'>")
response.Write("alert('感谢您的支持,您已经投过票了,请勿重新投票,谢谢!~')")
response.write("history.back();</script>")
else
response.Cookies("IpAddress")=request.ServerVariables("REMOTE_ADDR")
response.Cookies("IPAddress").Expires=Date()+1
sql="update tb_Vote set Number=Number+1 where bookID="&TempId
conn.execute(sql)
response.Write("投票成功,谢谢您的支持!~")
response.Redirect("vote.asp")
end if
end if
%>