⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 showvote1.asp

📁 多用户个人主页系统(ASP)
💻 ASP
字号:
<!--#include file="const.asp"-->
<!--#include file="conn.asp"-->
<%classid=request("classid")
set rs=server.createobject("adodb.recordset")
set rs=conn.execute("select title from class where id="&classid)
title=rs("title")
rs.close
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
%>

<head>
<title>投票结果</title>
<link rel="stylesheet" type="text/css" href="STYLE.CSS">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"></head>

<body bgcolor="#FFFFFF" leftmargin="0" topmargin="5">
<table width="97%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td bgcolor="#000000"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="1">
        <tr> 
          <td height="22" bgcolor="#00CC33"> 
            <div align="center"><%=title%> </div></td>
        </tr>
      </table></td>
  </tr>
</table>
<div align="center">
<center>
    <table width="97%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td bgcolor="#333333">
<table width="100%" height="71" border="0" align="center" cellpadding="0" cellspacing="1" bordercolorlight="#000000" bordercolordark="#FFFFFF">
            <%rs.movefirst
	do while not rs.eof%>
            <tr> 
              <td height="34" width="27%" bgcolor="#99cc00"> 
                <p align="center"><%=rs("vote")%></td>
              <%h=(rs("count")*300)/totalcount%>
              <td height="34" width="49%" valign="middle" bgcolor="#A5DB00"> 
                <table width="<%=h%>" height="13" border="0" align="center" cellpadding="0" cellspacing="0" bordercolorlight="#000000" bordercolordark="#FFFFFF" bgcolor="<%=rs("color")%>">
                  <tr> 
                    <td width="100%" style="border-style: solid; border-width: 1" valign="middle"></td>
                  </tr>
                </table></td>
              <td height="34" width="24%" bgcolor="#e0e0e0"> 
                <p align="center"><font color=green><%=rs("count")%></font> 
                  票(<%=cint((rs("count")*10000)/totalcount)/100%>%)</td>
            </tr>
            <%rs.movenext
	loop%>
            <tr bgcolor="#999999"> 
              <td height="22" colspan="3"><div align="center"><font color="#FFFFFF">共有<b><%=totalren%></b>人投票</font></div></td>
            </tr>
          </table>
        </td>
      </tr>
    </table>
  </center>
</div>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -