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

📄 showvote.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">
</head>
<body background="images/ebg.jpg">
<table border="0" width="100%" bordercolorlight="#000000" cellspacing="1" cellpadding="0" bordercolordark="#FFFFFF" height="73" align="center" bgcolor="#666666">
  <tr align="center" bgcolor="#d7b4e0"> 
    <td colspan="3" height="23">~<%=title%>~</td>
    </tr>
	<%rs.movefirst
	do while not rs.eof%>
    
  <tr bgcolor="#FFDFFF"> 
    <td height="23" width="30%" bgcolor="#FFDFFF"> 
      ·<%=rs("vote")%> 
    </td>
		<%h=(rs("count")*300)/totalcount%>
    <td height="23" width="45%" valign="middle"> 
      <table border="0" width="<%=h%>" height="13" bgcolor="<%=rs("color")%>" cellspacing="0" cellpadding="0" bordercolorlight="#000000" bordercolordark="#FFFFFF">
          <tr>
            <td width="100%" style="border-style: solid; border-width: 1" valign="middle"></td>
          </tr>
        </table>
    </td>
    <td height="23" bgcolor="#FFDFFF"> 
      <p align="center"><font color="#FF0000"><%=rs("count")%></font> 票(<%=cint((rs("count")*10000)/totalcount)/100%>%) 
    </td> 
    </tr>
	<%rs.movenext
	loop%>
    
  <tr bgcolor="#d7b4e0"> 
    <td colspan="3" height="21"> 
      <p align="center">共有投票<b><font color=red><%=totalren%></font></b>人次 
    </td>
    </tr>
  </table>
 
<div align="center"><a href="javascript:window.close()"><br>
  关闭窗口</a></div>

⌨️ 快捷键说明

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