vote_show.asp
上传用户:xxtaishan
上传日期:2022-01-02
资源大小:4063k
文件大小:2k
源码类别:

IP电话/视频会议

开发平台:

ASP/ASPX

  1. <!--#include file="vote_conn.asp"-->
  2. <%classid=request("classid")
  3. set rs=server.createobject("adodb.recordset")
  4. set rs=conn.execute("select title from class where id="&classid)
  5. title=rs("title")
  6. rs.close
  7. sql="select * from vote where class="&classid
  8. rs.open sql,conn,3,1
  9. totalcount=0
  10. do while not rs.eof
  11. totalcount=totalcount+rs("count")
  12. rs.movenext
  13. loop
  14. totalren=totalcount
  15. if totalcount=0 then
  16. totalcount=1
  17. end if
  18. %>
  19. <head>
  20. <title></title>
  21. <link rel="stylesheet" type="text/css" href="STYLE.CSS">
  22. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  23. </head>
  24. <body>
  25. <div align="center">
  26.   <center>
  27.     <table border="0" width="412" bordercolorlight="#000000" cellspacing="0" cellpadding="0" bordercolordark="#FFFFFF" height="73">
  28.       <tr bgcolor="#6699FF"> 
  29.         <td width="596" colspan="3" height="23"> 
  30.           <div align="center">调查标题:<%=title%> </div>
  31.         </td>
  32.     </tr>
  33. <%rs.movefirst
  34. do while not rs.eof%>
  35.     <tr>
  36.         <td height="23" width="164"> 
  37.           <p align="center"><%=rs("vote")%></td>
  38. <%h=(rs("count")*300)/totalcount%>
  39.         <td height="23" width="300" valign="middle"> 
  40.           <table border="0" width="<%=h%>" height="13" bgcolor="<%=rs("color")%>" cellspacing="0" cellpadding="0" bordercolorlight="#000000" bordercolordark="#FFFFFF">
  41.           <tr>
  42.             <td width="100%" style="border-style: solid; border-width: 1" valign="middle"></td>
  43.           </tr>
  44.         </table>
  45.       </td>
  46.         <td height="23" width="129"> 
  47.           <p align="center"><font color=green><%=rs("count")%></font> 票(<%=cint((rs("count")*10000)/totalcount)/100%>%)</td> 
  48.     </tr>
  49. <%rs.movenext
  50. loop%>
  51.     <tr>
  52.         <td width="596" colspan="3" height="21"> 
  53.           <p align="center">共有投票<b><font color=red><%=totalren%></font></b>人次</td>
  54.     </tr>
  55.   </table>
  56.   </center>
  57. </div>