<!--#include file="conn/conn.asp"-->
<!--#include file="conn/config.asp"-->
<!--#include file="conn/nosql.asp"-->
<%dim options,total,sql,i,answer,anid
if request.QueryString("stype")="" then
	if Request.ServerVariables("REMOTE_ADDR")=request.cookies("IPAddress") then
		response.write"<SCRIPT language=JavaScript>alert('感谢您的支持，您已经投过票了，请勿重复投票，谢谢！');"
		response.write"javascript:window.close();</SCRIPT>"
	else
		options=nosql(request.form("options"))
		response.cookies("IPAddress")=Request.ServerVariables("REMOTE_ADDR") 
		conn.execute("update snsn_toupiao set answer"&options&"=answer"&options&"+1 where IsChecked=1")
	end if
end if
%><head>
<title>投票结果</title>
<link rel="SHORTCUT ICON" href="/shortcut.ico">
<meta name="generator" content="snsn-shop">
<meta name=keywords content="<%=webgjz%>">
<meta name="description" content="<%=webmx%>">
<meta name="MSSmartTagsPreventParsing" content="TRUE">
<meta http-equiv="MSThemeCompatible" content="Yes">
<link href="/css.css" rel="stylesheet" type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
.style1 {
	color: #ff0000;
	font-weight: bold;
}
body {
	margin-top: 6px;
}
-->
</style>
</head>
<div align="center"> 
  <%
total=0
set rs=server.createobject("adodb.recordset")
sql="select * from snsn_toupiao where IsChecked=1"
rs.open sql,conn,3,3
%>
  <table width="400" height="48" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#CCCCCC" style="border-collapse: collapse">
    <tr bgcolor="efefef">
      <td height="6" colspan="3" align=center valign="top"><span class="style1"><%=rs("Title")%></span></td>
    </tr>
    <tr bgcolor="#FFFFFF">
      <td valign="top">序号</td>
      <td valign="top">百比分</td>
      <td valign="top">人数</td>
    </tr>
    <%
for i=1 to 8
	if rs("Select"&i)<>"" then
		total=total+rs("answer"&i)
	end if
next

%>
    <%for i=1 to 8
	if rs("Select"&i)<>"" then
		if total=0 then
			answer=0
		else
			answer=(rs("answer"&i)/total)*100
		end if
%>
    <tr bgcolor="#FFFFFF">
      <td valign="top"><%=i%>.<%=rs("select"&i)%>：</td>
      <td valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td><img src=images/vote_0.gif width=<%=int(answer*2)%> height=20></td>
            <td><%=round(answer,3)%>%</td>
          </tr>
      </table></td>
      <td valign="top"><%=rs("answer"&i)%>人</td>
      <%
	end if
next
%>
    <tr bgcolor="#FFFFFF">
      <td colspan="3"> 共有【<%=total%>】人参加投票</td>
    </tr>
  </table>
</div>  
<% rs.close     
set rs=nothing     
conn.close     
set conn=nothing %>
