if bid="" or bid if request.QueryString("stype")="" then
if request.cookies("yvsyxylvote")"" then
response.write "你已经投过票了"
response.end
end if
options=request("options")
response.cookies("yvsyxylvote")=Request.ServerVariables("REMOTE_ADDR")
conn.execute("update vote set answer"&options&"=answer"&options&"+1 where bjid="&bid&"")
end if
%>
投票结果
td{font-size:9pt;line-height:120%;color:#353535}
body{font-size:9pt;line-height:120%}
a:link { color: #000000; text-decoration: none }
a:visited { color: #000000; text-decoration: none }
a:active { color: #000000; text-decoration: none }
a:hover { color: #336699; text-decoration: none; position: relative; right: 0px; top: 1px }
total=0
set rs=server.createobject("adodb.recordset")
sql="select * from vote where bjid="&bid&""
rs.open sql,conn,1,1
%>
===============================================================================
选项
百比分
人数
for i=1 to 6
if rs("Select"&i)"" then
total=total+rs("answer"&i)
end if
next
%>
if rs("Select"&i)"" then
if total=0 then
answer=0
else
answer=(rs("answer"&i)/total)*100
end if
%>
.:
%
人
end if
next
%>
共有【】人参加投票
===============================================================================
【关闭窗口】
closeconn%>