<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="conn.asp"-->
<%vid=cint(request.form("vid"))
action=request.form("action")
cf=request.form("cf")
kind=request.form("kind")
vdd=request.form("vdd")
v=request.form("v")
'session("vdd").timeout=1
if cf="n" and vdd=Request.Cookies("vote_num") then
	response.write "<script>alert('该投票不能重复进行');window.close();</script>"
else
	if v<>"" and vid<>"" then
	if action="vote" then
		select case kind
		case "1" '单选
		conn.execute("update vitem set vcount=vcount+1 where id="&cint(v))
		case "2" '多选
		vv=replace(v," ","")
		vvv=split(vv,",")
		for i= 0 to ubound(vvv)
		conn.execute("update vitem set vcount=vcount+1 where id="&cint(vvv(i))&"")
		next
		end select
		Response.Cookies("vote_num").Expires=now()+0.08
		Response.Cookies("vote_num")=vdd
	response.write "<script>alert('投票成功');window.close();</script>"
	end if
	else
	response.write "<script>alert('投票选项不能为空');window.close();</script>"
	end if
end if
%>

