<!--#include file="conn.asp"-->
<!--#include file="Class_Top.asp"-->
<%dim rs,sql,title,totalcount,totalren
dim style,classid,voteid,Locat
Locat="查看投票"
classid=request("classid")
set rs=conn.execute("select title from voteclass where id="&classid)
title=rs("title")
set rs=nothing
set rs=server.createobject("adodb.recordset")
sql="select * from vote where class="&classid
rs.open sql,conn,3,1
totalcount=0
do while not rs.eof
totalcount=totalcount+rs("count")
rs.movenext
loop
totalren=totalcount
if totalcount=0 then
totalcount=1
end if

call pagehead()
%>
<div align="center">
  <center>
 <table width="500" border="0" align="center" cellpadding="0" cellspacing="0" Class=TableBorder>
      <tr> 
        <td valign="top" align="center"><table width="100%" border="0" align="center" cellpadding="1" cellspacing="0" >
            <tr align="center"> 
              <th height="22" colspan="3"><strong><img src="Images/p1.GIF" width="16" height="16" align="absmiddle"> 
                网站关于<font color="#FF0000">“<%=Title%>”</font>的调查结果</strong></th>
            </tr>
            <tr> 
              <td> <table width="100%" border="0" align="center" cellpadding="3" cellspacing="0">
                  <tr> 
                    <td> <strong>　&middot;目前网友的总投票数为：<font color="#FF0000"><%=totalren%></font></strong>
                       </td>
                  </tr>
                </table> 
                <table border="0" width="100%" cellspacing="0" cellpadding="0" height="23">
                  <%rs.movefirst
	do while not rs.eof%>
                  <tr> 
                    <td height="23" width="150"> 
                      <p align="left">　&middot;<%=rs("vote")%></td>
                    <%h=(rs("count")*250)/totalcount%>
                    <td width="250" height="23" valign="middle"> 
                      <table border="0" width="<%=h%>" height="13" bgcolor="<%=rs("color")%>" cellspacing="0" cellpadding="0">
                        <tr> 
                          <td width="100%" style="border-style: solid; border-width: 1" valign="middle"></td>
                        </tr>
                      </table>
                    </td>
                    <td height="23" width="100"> 
                      <p align="left"><font color=green><%=rs("count")%></font> 
                        票(<%=cint((rs("count")*10000)/totalcount)/100%>%)</td>
                  </tr>
                  <%rs.movenext
	loop%>
                </table></td>
            </tr>
          </table></td>
      </tr>
      <tr> 
        <td valign="bottom"><br><div align="center">【<a href="javascript:window.close();">关闭窗口</a>】</div></td>
      </tr>
    </table>
  </center>
</div>
<%rs.close
set rs=nothing
call EndConnection()%>