<!--#include file="const.asp"-->
<!--#include file="conn.asp"-->
<%

if request.cookies("ci")<>"" and request.cookies("classid")=request("classid") then
response.write "<script>alert('Çë²»ÒªÖØ¸´Í¶Æ±');</script>"
response.write "<script>window.close();</script>"
response.end
end if
set rs=server.createobject("adodb.recordset")
if request("style")="radio" then
sql="select * from vote where id="&request("voted")
rs.open sql,conn,3,2
rs("count")=rs("count")+1
rs.update
rs.close
elseif request("style")="checkbox" then
for i=1 to request("voted").count
sql="select * from vote where id="&request("voted")(i)
rs.open sql,conn,3,2
rs("count")=rs("count")+1
rs.update
rs.close
next
end if
response.cookies("ci")="yes"
response.cookies("classid")=request("classid")
set rs=nothing
conn.close
set conn=nothing
response.write "<script>window.open('showvote.asp?classid="&request("classid")&"','','width=650,height=300,resizable=1,scrollbars=1');</script>"
response.write "<script>window.close();</script>"
'Response.Write Err.description%>