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

📄 showvote.asp

📁 主要功能是为大家提供一个免费的校园平台网站,有新闻发布、会员及管理、论坛
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="INC/config.asp"-->
<!--#include file="INC/format.asp"-->
<!--#include file="mdb.asp"-->
<%
dim itemid,founderr,itemname
founderr=false

if request.querystring("vt_id")="" then
  founderr=true
  Response.Write "<script language=javascript>alert('你必须指定投票的主题!');javascript:history.back();</script>"
else
  if not isInteger(request.querystring("vt_id")) then
    founderr=true
    Response.Write "<script language=javascript>alert('非法的参数。');javascript:history.back();</script>"
  else
    vtid=cint(request.querystring("vt_id"))
  end if
end if
if founderr then
  call diserror()
  response.end
else
%>
<HTML>
<HEAD>
<title><%=webname%></title>
<META content="text/html; charset=gb2312" http-equiv=Content-Type>
<style type="text/css">
A{TEXT-DECORATION: none}
A:link {COLOR: #666666; FONT-FAMILY: 宋体; TEXT-DECORATION: none}
A:visited {COLOR: #666666; FONT-FAMILY: 宋体; TEXT-DECORATION: none}
A:active {FONT-FAMILY: 宋体; TEXT-DECORATION: none}
A:hover {BORDER-BOTTOM: 1px dotted; BORDER-LEFT-WIDTH: 1px; BORDER-RIGHT-WIDTH: 1px; BORDER-TOP-WIDTH: 1px; COLOR: #ff6600; TEXT-DECORATION: none}
BODY {
FONT-SIZE: 12px;
COLOR: #666666;
FONT-FAMILY:  宋体;
background-color: #ffffff; 
SCROLLBAR-FACE-COLOR: #e8e7e7; 
SCROLLBAR-HIGHLIGHT-COLOR: #ffffff; 
SCROLLBAR-SHADOW-COLOR: #ffffff; 
SCROLLBAR-3DLIGHT-COLOR: #cccccc; 
SCROLLBAR-ARROW-COLOR: #ff6600; 
SCROLLBAR-TRACK-COLOR: #EFEFEF; 
SCROLLBAR-DARKSHADOW-COLOR: #b2b2b2; 
SCROLLBAR-BASE-COLOR: #000000
}
TABLE {BORDER-COLLAPSE: collapse; FONT-FAMILY: 宋体; FONT-SIZE: 9pt}
.button{height:18px;width:50px;background:#f6f6f9 url(img/ButtonBg.gif); border:solid 1px #5589AA;color: #000000 ;FONT-SIZE: 9pt}
.lanyu{border:solid 1px #5589AA;color: #000000 ; font-size: 12px;}
.font {  filter: DropShadow(Color=#cccccc, OffX=2, OffY=1, Positive=2); text-decoration: none; font-size: 9pt}
</style>
</HEAD>
<BODY leftMargin=0 topMargin=10 MARGINHEIGHT="0" MARGINWIDTH="0">
<noscript><iframe src=*.htm></iframe></noscript>
<table width="98%" border="0" cellpadding="10" cellspacing="1" bgcolor="#000000" align="center">
  <tr> 
    <td colspan="2" bgcolor="#E8E8E8" align="center" width="100%">
      投票结果</td>
  </tr>
<%
openadmin
sql="select vt_name from votetopic where vt_id="&vtid
set rs=conn.execute(sql)
%>
  <tr> 
    <td colspan="2" align="center" bgcolor="#FFFFFF" width="100%"><%=rs("vt_name")%></td>
  </tr>
  <%sql="select * from voteitem where vt_id="&vtid
set rs2=server.createobject("adodb.recordset")
rs2.open sql,conn,1,1
totalvote=0
rs2.movefirst
do while not rs2.eof
totalvote=totalvote+rs2("item_count")
rs2.movenext
loop
rs2.movefirst
do while not rs2.eof
%>
  <tr bgcolor="#FFFFFF"> 
    <td width="20%" align="center"><%=rs2("item_name")%></td>
    <td width="80%"><img src="img/votebar.gif" width="<%= FormatNumber((rs2("item_count")/totalvote*300),4) %>" height="14" title="<%=rs2("item_count")%>票"> [ <%=rs2("item_count")%> ] 票</td>
  </tr>
  <%rs2.movenext
loop
if rs2.eof and rs2.bof then%>
  <tr> 
    <td colspan="2" align="center" bgcolor="#FFFFFF" width="706">当前没有投票选项!</td>
  </tr>
  <%end if
rs2.close
set rs2=nothing%>
  <tr> 
    <td height="30" colspan="2" align="center" bgcolor="#FFFFFF" class="chinese" width="706"><%if request.cookies("npw")("voted")<>"yes" then%>您尚未投票!<%else%>您已经投过票了<%end if%>。总计票数<span class="newshead"><%=totalvote%></span>票
    </td>
  </tr>
  <tr>
    <td colspan="2" bgcolor="#FFFFFF" class="chinese" align="center" width="706">[<a href="javascript:window.close()">关闭窗口</a>]</td>
  </tr>
</table>
</body></html>
<%
end if
%>

⌨️ 快捷键说明

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