📄 counteshow.asp
字号:
<!--#include file="cls_DB.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>投票结果显示</title>
</head>
<body>
<h3 align="center">在线投票</h3>
<table width="600" border="0" align="center" cellpadding="0"
cellspacing="1" bgcolor="#999999" >
<tr>
<td width="746" height="30" bgcolor="#FFFFFF">
<table width="100%" border="0">
<tr>
<td width="493">投票结果</td>
<td width="95"><a href="index.asp">返回首页</a></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="746" height="147" valign="top" bgcolor="#F0F0F0">
<%
Tid=request("tid")
openDB
set rst=conn.execute("select * from titles where ID="&Tid)
ZhuTi=rst("ZhuTi")
Counts=rst("Counts")
XuanZe=rst("XuanZe")
KaiShiTime=rst("KaiShiTime")
JieShuTime=rst("JieShuTime")
rst.close
set rst=nothing
sql="select options,votes from options where Tid="&Tid
set rs=Server.CreateObject("ADODB.Recordset")
rs.open sql,conn,1,1
xx=rs.recordcount
%>
<table width="543" height="126" border="0" align="center">
<tr>
<td width="517" colspan="2">投票主题:<%=ZhuTi%>
</td>
</tr>
<%
for i=1 to xx
if Counts=0 then
percent=0
else
percent=(rs("votes")/Counts)*100
end if
response.Write "<tr><td>["&i&"]"&rs("options") &"</td>"&_
"<td><img src='pic.gif' height=11 width="&percent&"> "&_
formatnumber(percent,1)&"%["&rs("votes")&"人]</td></tr>"
rs.movenext
next
rs.close
set rs=nothing
closeDB
%>
<tr>
<td colspan="2"><hr>开始时间:<%=KaiShiTime%><br>
结束时间:<%=JieShuTime%><br>
投票总数:<%=Counts%>票<br>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -