<!--#include file="mdb.asp"-->
<!--#Include File="Check_hx.asp"-->
<!--#include file="INC/config.asp"-->
<!--#include file="INC/format.asp"-->
<%
dim itemid,itemname
if request.querystring("vt_id")="" then
  Response.Write "<script language=javascript>alert('你必须指定投票的主题！');javascript:history.back();</script>"
  Response.End
else
  if not isInteger(request.querystring("vt_id")) then
   Response.Write "<script language=javascript>alert('非法的参数。');javascript:history.back();</script>"
   Response.End
  else
    vtid=cint(request.querystring("vt_id"))
  end if
end if
%>
<HTML>
<HEAD>
<title><%=webname%></title>
<META content="text/html; charset=gb2312" http-equiv=Content-Type>
<style type="text/css">
A:link { COLOR: #000000; TEXT-DECORATION: none}
A:visited {COLOR: #000000; TEXT-DECORATION: none}
A:hover { COLOR: #FF6600; TEXT-DECORATION: none}
.white:link { COLOR: #666666; TEXT-DECORATION: none}
.white:visited {COLOR: #666666; TEXT-DECORATION: none}
.white:hover { COLOR: #FF6600; TEXT-DECORATION: none}
BODY {
SCROLLBAR-FACE-COLOR: #d9d9d9; 
SCROLLBAR-HIGHLIGHT-COLOR: #ffffff; 
SCROLLBAR-SHADOW-COLOR: #d0d2c8; 
SCROLLBAR-3DLIGHT-COLOR: #000000; 
SCROLLBAR-ARROW-COLOR: #000000; 
SCROLLBAR-TRACK-COLOR: #EEEAE7;
SCROLLBAR-DARKSHADOW-COLOR: #000000
}
.t1 {background-color:#f5f5f5}
.t2 {background-color:#ffffff}
.cn {FONT-SIZE: 12px; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana,Arial,sans-serif}
.title {FONT-SIZE: 15px; FONT-FAMILY: Verdana,Arial,sans-serif; LINE-HEIGHT: 150%}
.me {FONT-SIZE: 14px; FONT-FAMILY: Verdana,Arial,sans-serif; LINE-HEIGHT: 150%}
.gp {FONT-SIZE: 13px; FONT-FAMILY: Verdana,Arial,sans-serif; LINE-HEIGHT: 150%}
.tb {border-collapse: collapse}
.fm {font-family: "Verdana"; font-size: 13px; color: #000000; border: #666666; border-style: solid; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px;BACKGROUND-COLOR: #f5f5f5}
.form {font-family: "Verdana"; font-size: 13px; color: #000000; border: #666666; border-style: solid; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px;}
.fmcenter {font-family: "Verdana";color:red;text-align:center;font-size: 13px; border: #666666; border-style: solid; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px;}
.button {background: #ffffff; border-bottom: #333333 1px solid; border-left: #333333 1px solid; border-right: #333333 1px solid; border-top: #333333 1px solid; color: #333333;  font-family: "Verdana"; font-size: 12px; height: 20px;}
.em2 {FONT-SIZE: 12px; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana,Arial,sans-srif;text-indent:24px}
.tx {font-family: "Verdana"; font-size: 12px; color: #000000; border: #666666; border-style: solid; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px;}
.webbt {background: #ffffff; border-bottom: #333333 1px solid; border-left: #333333 1px solid; border-right: #333333 1px solid; border-top: #333333 1px solid; color: #333333;  font-family: "Verdana"; font-size: 12px; height: 20px;cursor: hand;}
</style>
</HEAD>
<body background="img/bg1.gif" leftmargin="0" topmargin="0" bgproperties="fixed">
<%
sql="select vt_name from votetopic where vt_id="&vtid
set rs=conn.execute(sql)
IF rs.eof Then
  Response.Redirect "show_error.asp?eid=参数错误，找不到相关的记录!"
  Response.End
End IF
%>
<table width="650" border="0" cellpadding="0" cellspacing="0">
  <tr> 
    <td height="10" colspan="2"></td>
  </tr>
  <tr> 
    <td width="17">&nbsp;</td>
    <td width="633"><img src="img/vote_logo.gif" width="185" height="42"> 
      <div style="width: 100%; height:100%; filter: dropshadow(color=#cccccc, offx=6, offy=6, positive=1"> 
        <table width="98%" border="1" cellpadding="0" cellspacing="0" bordercolor="#000000" bgcolor="#f0f0f0" class="tb">
          <tr> 
            <td> <table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr> 
                  <td height="22" style="padding-left:5px">&nbsp;</td>
                </tr>
              </table>
              <table width="92%" border="0" align="center" cellpadding="0" cellspacing="2" bgcolor="#FFFFFF">
                <tr> 
                  <td align="center" class="cn" style="padding-left:15px;padding-right:15px;padding-top:13px;padding-bottom:13px"> 
                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                      <tr> 
                        <td class="me"><strong>调 查 主 题：<font color="#cc0000"><%=rs("vt_name")%></font></strong></td>
                      </tr>
                      <tr> 
                        <td height="6"></td>
                      </tr>
                    </table>
                    <table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="#333333" class="tb">
                       <tr bgcolor="#f5f5f5"> 
                        <td width="37%" align="center" class="cn"><strong>投 票 项 目</strong></td>
                        <td width="54%" align="center" class="cn"><strong>图 形 显 示</strong></td>
                        <td width="9%" align="center" class="cn"><strong>票 数</strong></td>
                      </tr>
<%sql="select * from voteitem where vt_id="&vtid
set rs2=server.createobject("adodb.recordset")
rs2.open sql,conn,1,1
totalvote=0
rs2.movefirst
do while not rs2.eof
totalvote=totalvote+rs2("item_count")
rs2.movenext
loop
rs2.movefirst
do while not rs2.eof
%>
                      <tr> 
                        <td class="cn" style="padding-left:8px;padding-right:8px"><%=rs2("item_name")%></td>
                        <td class="cn" style="padding-left:8px;padding-right:8px"><img src="img/votebar.gif" width="<%= FormatNumber((rs2("item_count")/totalvote*300),4) %>" height="15" title="<%=rs2("item_count")%>票" align="absmiddle"> <span style='font: 10px Verdana;color:#000000'><%= FormatNumber((rs2("item_count")/totalvote*100),0) %>%</span></td>
                        <td align="center" class="cn"><%=rs2("item_count")%></td>
                      </tr>
<%rs2.movenext
loop
if rs2.eof and rs2.bof then%>
  <tr> 
    <td colspan="2" align="center" bgcolor="#FFFFFF" width="606">当前没有投票选项！</td>
  </tr>
<%end if
rs2.close
set rs2=nothing%>
                      <tr align="center"> 
                        <td colspan="3" class="cn"><%if request.cookies("npw")("voted")<>"yes" then%>您尚未投票！欢迎您提出宝贵意见。<%else%>您已经投过票了，感谢您的支持和参与！<%end if%>  总计票数： <span class="newshead"><%=totalvote%></span> 票</td>
                      </tr>
                      <tr align="center"> 
                        <td height="36" colspan="3" class="cn"> <input type=submit name="upfile2" value="关闭窗口" style="cursor:hand" onclick=window.location="javascript:self.close();" onFocus="this.blur()"></td>
                      </tr>
                    </table></td>
                </tr>
              </table>
              <table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr> 
                  <td height="22">&nbsp;</td>
                </tr>
              </table></td>
          </tr>
        </table>
        <br>
      </div></td>
  </tr>
  <tr> 
    <td colspan="2">&nbsp;</td>
  </tr>
</table>
</body>
</html>