<%@ codepage ="936" %>
<!-- #include file="setup.asp" -->
<%
forumid=Request("forumid")
id=Request("id")
if Request("postvote")="" then
error("<li>请选择，您要投票的项目！")
end if
if instr(Request.Cookies("vote"),""&Request("id")&"|")>0 then
error("<li>您已经投过票了，无需重复投票！")
end if
sql="select * from forum where id="&Request("id")&""
rs.Open sql,Conn,1,3
for each ho in request.form("postvote")
pollresult=split(rs("pollresult"),"|")
for i = 0 to ubound(pollresult)
if not pollresult(i)="" then
if cint(ho)=i then
pollresult(i)=pollresult(i)+1
end if
allpollresult=""&allpollresult&""&pollresult(i)&"|"
end if
next
rs("pollresult")=allpollresult
rs("lasttime")=now
rs.update
allpollresult=""
next
rs.close
Response.Cookies("vote")=""&Request.Cookies("vote")&""&Request("id")&"|"
sql="select * from bbsconfig where id="&forumid&""
rs.Open sql,Conn,1
bbsname=rs("bbsname")
rs.close
succtitle="投票成功"
message=message&"<li><a href=showtopic.asp?id="&id&"&forumid="&forumid&">返回主题</a><li><a href=forumdisplay.asp?forumid="&forumid&">"&bbsname&"</a><li><a href=index.asp>返回论坛首页</a>"
succeed(""&message&"<meta http-equiv=refresh content=3;url=showtopic.asp?id="&id&"&forumid="&forumid&">")
%>
