28,391
社区成员
发帖
与我相关
我的任务
分享
<%
if kid=6 and tit<>"" and vote="" then
response.write "<script>alert('您还没有选择一项,不能进行投票!');top.history.back();</script>"
response.end
end if
if kid=6 and tit<>"" and vid>0 and vote<>"" then
sqlv="select * from vode where cid="&vid
set rsv=server.createobject("adodb.recordset")
rsv.open sqlv,conn,1,3
if not rsv.eof then
do while not rsv.eof
if isdate(rsv("edtime"))=False then rsv("edtime")=rsv("udtime")
if datediff("s",rsv("edtime"),now())<=1 then
response.write "<script>alert('您的投票请求过快,已被系统阻止!');window.history.back();</script>"
response.end
else
response.write rsv("cid")&"&#nbsp;"&rsv("vote")&"&#nbsp;"&rsv("eip")&"<BR>"
response.write vid&"&#nbsp;"&vote&"&#nbsp;"&ip_my
if rsv("vote")=vote and rsv("eip")=ip_my then
rsv("edtime")=now()
else
rsv.addnew
rsv("aid")=kid
rsv("cid")=vid
rsv("vote")=vote
rsv("eip")=ip_my
rsv("iip")=ip_mn
rsv("udtime")=now()
end if
if rsv("title")<>tit then rsv("title")=tit
rsv("hit")=rsv("hit")+1
if others<>"" then rsv("others")=others
rsv.update
response.write "<script>"&vbcrlf&"alert('恭喜您,成功为“"&rsv("title")&"”投了一票!');"&vbcrlf&"window.history.back
();"&vbcrlf&"</script>"
end if
rsv.movenext
loop
else
rsv.addnew
rsv("aid")=kid
rsv("cid")=vid
rsv("vote")=vote
rsv("eip")=ip_my
rsv("iip")=ip_mn
rsv("udtime")=now()
rsv("title")=tit
rsv("hit")=1
if others<>"" then rsv("others")=others
rsv.update
response.write "<script>"&vbcrlf&"alert('哇~~~您是“"&rsv("title")&"”的第一位投票者耶!谢谢哦
~~');"&vbcrlf&"window.history.back();"&vbcrlf&"</script>"
end if
response.end
end if%>