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

📄 showvote.asp

📁 很好的企业网站管理系统!可以适应各种不同的小型企业!
💻 ASP
字号:
<!--#include file=conn.asp-->
<link rel="stylesheet" href="admin/admin.css" type="text/css">
<%
  if request.querystring("action")<>"show" then
  if session("habitus")="true" then response.write"对不起,您不能重复投票":response.end
  for i=1 to request.form("ID").count
    conn.execute("update Vote set Count=Count+1 where ID="&request.form("ID")(i))
    session("habitus")="true"
  next
  end if
  if request.querystring("VoteClassID")="" then response.redirect"Votemanage.asp"
  set rs=server.createobject("adodb.recordset")
  sql="select title,type from VoteClass where VoteClassID="&request.querystring("VoteClassID")
  rs.open sql,conn,1,1

  set rs1=server.createobject("adodb.recordset")
  sql1="select VoteOper,Count,ID from Vote where VoteClassID="&request.querystring("VoteClassID")
  rs1.open sql1,conn,1,1
  while not rs1.eof
    AllCount=AllCount+rs1("Count")
	rs1.movenext
  wend
  rs1.movefirst
  if AllCount=0 then response.write"当前没有人投票":response.end
%>
<title><%=rs("title")%></title>
<body bgcolor="#FCEFC7">
<table width="425" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="425" height="28" class=fl><b><%=rs("title")%></b><br>
      共有 <font color="#FF0000"><%=AllCount%></font> 人参加</td>
  </tr>
  <tr> 
    <td width="425">
    <table width="452" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#BB9600">
        <tr align="center" valign="middle" bgcolor="#FFCC00"> 
          <td width="18" height="19"> </td>
          <td width="164">选项</td>
          <td width="211">比例</td>
          <td width="54"> <p>票数</p></td>
        </tr>
        <%i=1:while not rs1.eof%>
        <tr align="center" valign="middle" bgcolor="#FFFFFF"> 
          <td width="18"><%=i%></td>
          <td height="23" width="164"><%=rs1("VoteOper")%></td>
          <td width="211"><%=left((rs1("Count")/AllCount)*100,4)%>%<img src=images/space.gif width=<%=rs1("Count")/AllCount*150%> height=10></td>
          <td width="54"><%=rs1("Count")%></td>
        </tr>
        <%rs1.movenext:i=i+1:wend%>
      </table></td>
  </tr>
</table>
<%
  rs.close
  set rs=nothing
  rs1.close
  set rs1=nothing
%>

⌨️ 快捷键说明

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