<!-- #include file="inc/conn.asp"-->
<html>
<head>
<title>红嫂视屏交友情缘网</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="style.css" rel="stylesheet" type="text/css">
</head>
<body>
<% 
lanmu_id=request.querystring("id")
if not isnumeric(lanmu_id) then
  response.Write "操作错误！"
  response.end
end if
names=replace(request.querystring("names"),"'","''")
sql="select * from vote_body where lanmu_id="&lanmu_id
set rs=server.CreateObject("adodb.recordset")
rs.open sql,conn,1,3
if rs.eof then
response.write "暂时没有投票！"
response.end
end if
sum=0
do while not rs.eof
sum=sum+rs("counts")
rs.movenext                                                                                  
n=n+1                                                         
if n>=rs.pagesize then exit do                                                
loop                                                       
rs.movefirst

 %>
<table width="500" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#A2D4E2" class="style30">
  <tr align="center"> 
    <td colspan="4" bgcolor="#FFFFFF"><font color="#0066CC" size="3"><b><%=names%></b></font></td>
  </tr>
  <%n=1
   do while not rs.eof %>
  <tr bgcolor="#FFFFFF"> 
    <td width="138" height="25"><%= n %>：　<%= rs("bodys") %>　　　　</td>
    <td width="73" align="right"><span class="ybfont">　<%=rs("counts")  %>票　</span></td>
    <td width="209"><table width="100%" border="0" cellpadding="0" cellspacing="0">
        <tr> 
          <td width="<% if rs("counts")<>0 then %><%=formatnumber((rs("counts")/sum)*100,2)  %>%            <%else
	response.write "1%" 
	end if %>" bgcolor="#3366FF">&nbsp;</td>
          <td width="87%"></td>
        </tr>
      </table></td>
    <td width="63"><span class="ybfont">
      <% if rs("counts")<>0 then %>
      <%=formatnumber((rs("counts")/sum)*100,2)  %> 
      <%else
	response.write "0" 
	end if %>
      %</span></td>
  </tr>
  <%
rs.movenext                                                                                  
n=n+1                                                         
if n>=rs.pagesize then exit do                                                
loop                                                       
 %>
  <tr align="center"> 
    <td colspan="4" bgcolor="#FFFFFF">目前共有<font color="#ff0000"><%=sum%></font>人参予了投票</td>
  </tr>
</table>
</body>
</html>
<%
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
