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

📄 poll_browse.asp

📁 图书管理系统的所有程序
💻 ASP
字号:
<!--#include file="conn/conn.asp" -->
<!--#include file="adovbs.inc"-->
<%
Set rs = Server.CreateObject("ADODB.Recordset")
'此处应用了Group By 子句的With rollup关键字汇总投票总数
sql_rs= "SELECT bookname, sum(poll) as poll FROM tb_Poll Group by bookname  with rollup  ORDER BY poll DESC"
rs.open sql_rs,conn,3
rs.moveFirst
sumPoll=rs("poll")
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>投票成功!</title>
<link rel="stylesheet" href="css/style.css" type="text/css">
<!--#include file="search_top.asp"--> 
<br> 
<table width="799" border="0" cellpadding="0" cellspacing="1" bgcolor="#0099FF"> 
  <tr> 
    <td><table width="799" height="279" border="0" align="center" cellpadding="-1" cellspacing="-1"> 
        <tr> 
          <td height="95"><div align="center"> 
              <table width="100%"  border="0" cellspacing="-2" cellpadding="-2"> 
                <tr> 
                  <td width="11" rowspan="3" valign="bottom" bgcolor="#FFFFFF">&nbsp;</td> 
                  <td width="168" height="186" valign="bottom" bgcolor="#FFFFFF"> <div align="right"> 
                      <table  border="0" align="right" cellpadding="-2" cellspacing="-2"> 
                        <tr> 
                          <% rs.move 1,adBookmarkFirst
					'由于在查询时应用了Group By子句的关键字with rollup汇总投票总数,所以此处为总记录数-1
					For i=1 to rs.recordCount-1
		 			 imgname="images/image_poll/Img_"&i&".gif"%> 
                          <td width="27" valign="bottom"><img src=<%= imgname %> width="10"
					 height="<%= round(rs("poll")/sumPoll*100,2)%>"></td> 
                          <% rs.movenext
					Next
		 		%> 
                        </tr> 
                      </table> 
                    </div></td> 
                  <td width="461" rowspan="3" bgcolor="#FFFFFF"><table width="459" height="82" border="0"
			 align="center" cellpadding="0" cellspacing="0" bordercolor="#FFFFFF"
			  bordercolorlight="#FFFFFF" bordercolordark="#0000FF"> 
                      <tr> 
                        <td height="48" align="center" valign="middle" nowrap> <div align="left" class="style1"> 您已经成功投票,谢谢您的支持! 单击[返回]返回首页。</div></td> 
                      </tr> 
                      <tr> 
                        <td height="22" align="right" valign="middle" nowrap><div align="left"
				 class="style4">最受欢迎的图书列表:</div></td> 
                      </tr> 
                    </table> 
                    <table width="459" height="25" border="1" align="center"
			   cellpadding="0" cellspacing="0" bordercolor="#FFFFFF"
			    bordercolorlight="#FFFFFF" bordercolordark="#0099FF"> 
                      <%
			  rs.move 1,adBookmarkFirst
			  '由于在查询时应用了Group By 子句的关键字with rollup汇总投票总数,所以此处为总记录数-1
			   For j=1 to rs.recordCount-1
			   imgname="images/image_poll/img_"&j&".gif"%> 
                      <tr> 
                        <td width="25" align="right" valign="middle" nowrap> <div align="center"><img src=<%= imgname %> width="10" height="17"> </div></td> 
                        <td width="220" height="23" align="right" valign="middle" nowrap> <div align="left">&nbsp;<span class="style5"><%=rs("bookname")%> </span></div></td> 
                        <td width="120" align="right" valign="middle" nowrap> <div align="center">共有[<font color="#990000"> 
                            <%response.write rs("poll")%> 
                            </font>]人投票</div></td> 
                        <td width="84" align="right" valign="middle" nowrap> <div align="center">占 <font color="#990000"> 
                            <%response.write round(rs("poll")/sumPoll*100,2)%> 
                            </font>%</div></td> 
                      </tr> 
                      <% rs.MoveNext()
				  Next
				%> 
                    </table> 
                    <table width="96%"  border="0" cellspacing="-2" cellpadding="-2"> 
                      <tr> 
                        <td height="27" align="right">目前共有[<%=sumPoll%>]人投票!</td> 
                      </tr> 
                    </table></td> 
                </tr> 
                <tr> 
                  <td height="27" valign="bottom" bgcolor="#FFFFFF">&nbsp;</td> 
                </tr> 
              </table> 
            </div></td> 
        </tr> 
        <tr> 
          <td height="53" bgcolor="#FFFFFF"><div align="center"> 
              <input type="button" onClick="javascript:window.location.href='index.asp';" value="返 回" style="border:1px solid;border-color:#999966;background-color:#FF9966"> 
            </div></td> 
        </tr> 
        <tr> 
          <td height="13" bgcolor="#FFFFFF">&nbsp;</td> 
        </tr> 
      </table></td> 
  </tr> 
</table> 
<table width="799" height="60" border="0" cellpadding="-1" cellspacing="-1"> 
  <tr> 
    <td bgcolor="#FFFFFF"><div align="center"> 
        <p> </p> 
        <p>本站请用IE4.0或以上版本浏览, 800*600为最佳效果 <br> 
          版权所有:长春市明日科技有限责任公司<br> 
          客户信箱:mingrisoft@sina.com 联系电话:0431-4972266</p> 
      </div></td> 
  </tr> 
</table> 
</body></html>

⌨️ 快捷键说明

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