📄 votedetail.asp
字号:
<!--#include file="conn.asp"-->
<head>
<title>查看投票结果</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="css.css" rel="stylesheet">
</head>
<body leftmargin="0" topmargin="0">
<table width="361" border="0" align="center" cellpadding="0" cellspacing="0">
<tr class="tabbgcolorli">
<td> ☆ 本次统计结果</td>
</tr>
</table>
<%
dim rs
dim sql
dim total
set rs=server.createobject("adodb.recordset")
sql="select * from vote order by id"
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "<div align=center>目前还没有投票!</div>"
else
do while not rs.eof
total=total+rs("votenum")
rs.movenext
loop
if total=0 then
response.write "<div align=center>目前还没有人投票,欢迎您选择投票!</div>"
else
%>
<table width="361" border="0" align="center" cellpadding="0" cellspacing="1" class="tabbgcolorli">
<tr>
<td bgcolor="#FFFFFF"> <div align="center"></div>
<div align="center">[目前共有<%=total%>人参与本站调查]</div></td>
</tr>
</table>
<%
rs.movefirst
do while not rs.eof
%>
<br>
<table width="361" border="0" align="center" cellpadding="0" cellspacing="1" class="tabbgcolorli">
<tr>
<td width="194" bgcolor="#FFFFFF"><div align="center"><%=rs("name") %>:<img src=redbar.gif width=<%=int(rs("votenum")*2)%> height=10> <%=rs("votenum")%>人 </div></td>
<td width="164" bgcolor="#FFFFFF"><div align="center">占:<%=round((rs("votenum")/total)*100,2)%>%</div></td>
</tr>
</table>
<%
rs.movenext
loop
end if
end if
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
<p>
</body>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -