?? showvote.asp
字號:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#Include File="Check_hx.asp"-->
<!--#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:link { COLOR: #000000; TEXT-DECORATION: none}
A:visited {COLOR: #000000; TEXT-DECORATION: none}
A:hover { COLOR: #FF6600; TEXT-DECORATION: none}
.white:link { COLOR: #666666; TEXT-DECORATION: none}
.white:visited {COLOR: #666666; TEXT-DECORATION: none}
.white:hover { COLOR: #FF6600; TEXT-DECORATION: none}
BODY {
SCROLLBAR-FACE-COLOR: #d9d9d9;
SCROLLBAR-HIGHLIGHT-COLOR: #ffffff;
SCROLLBAR-SHADOW-COLOR: #d0d2c8;
SCROLLBAR-3DLIGHT-COLOR: #000000;
SCROLLBAR-ARROW-COLOR: #000000;
SCROLLBAR-TRACK-COLOR: #EEEAE7;
SCROLLBAR-DARKSHADOW-COLOR: #000000
}
.t1 {background-color:#f5f5f5}
.t2 {background-color:#ffffff}
.cn {FONT-SIZE: 12px; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana,Arial,sans-serif}
.title {FONT-SIZE: 15px; FONT-FAMILY: Verdana,Arial,sans-serif; LINE-HEIGHT: 150%}
.me {FONT-SIZE: 14px; FONT-FAMILY: Verdana,Arial,sans-serif; LINE-HEIGHT: 150%}
.gp {FONT-SIZE: 13px; FONT-FAMILY: Verdana,Arial,sans-serif; LINE-HEIGHT: 150%}
.tb {border-collapse: collapse}
.fm {font-family: "Verdana"; font-size: 13px; color: #000000; border: #666666; border-style: solid; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px;BACKGROUND-COLOR: #f5f5f5}
.form {font-family: "Verdana"; font-size: 13px; color: #000000; border: #666666; border-style: solid; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px;}
.fmcenter {font-family: "Verdana";color:red;text-align:center;font-size: 13px; border: #666666; border-style: solid; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px;}
.button {background: #ffffff; border-bottom: #333333 1px solid; border-left: #333333 1px solid; border-right: #333333 1px solid; border-top: #333333 1px solid; color: #333333; font-family: "Verdana"; font-size: 12px; height: 20px;}
.em2 {FONT-SIZE: 12px; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana,Arial,sans-srif;text-indent:24px}
.tx {font-family: "Verdana"; font-size: 12px; color: #000000; border: #666666; border-style: solid; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px;}
.webbt {background: #ffffff; border-bottom: #333333 1px solid; border-left: #333333 1px solid; border-right: #333333 1px solid; border-top: #333333 1px solid; color: #333333; font-family: "Verdana"; font-size: 12px; height: 20px;cursor: hand;}
</style>
</HEAD>
<body background="img/bg1.gif" leftmargin="0" topmargin="0" bgproperties="fixed">
<%
openadmin
sql="select vt_name from votetopic where vt_id="&vtid
set rs=conn.execute(sql)
%>
<table width="650" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="10" colspan="2"></td>
</tr>
<tr>
<td width="17"> </td>
<td width="633"><img src="img/vote_logo.gif" width="185" height="42">
<div style="width: 100%; height:100%; filter: dropshadow(color=#cccccc, offx=6, offy=6, positive=1">
<table width="98%" border="1" cellpadding="0" cellspacing="0" bordercolor="#000000" bgcolor="#f0f0f0" class="tb">
<tr>
<td> <table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="22" style="padding-left:5px"> </td>
</tr>
</table>
<table width="92%" border="0" align="center" cellpadding="0" cellspacing="2" bgcolor="#FFFFFF">
<tr>
<td align="center" class="cn" style="padding-left:15px;padding-right:15px;padding-top:13px;padding-bottom:13px">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="me"><strong>調 查 主 題:<font color="#cc0000"><%=rs("vt_name")%></font></strong></td>
</tr>
<tr>
<td height="6"></td>
</tr>
</table>
<table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="#333333" class="tb">
<tr bgcolor="#f5f5f5">
<td width="37%" align="center" class="cn"><strong>投 票 項 目</strong></td>
<td width="54%" align="center" class="cn"><strong>圖 形 顯 示</strong></td>
<td width="9%" align="center" class="cn"><strong>票 數</strong></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>
<td class="cn" style="padding-left:8px;padding-right:8px"><%=rs2("item_name")%></td>
<td class="cn" style="padding-left:8px;padding-right:8px"><img src="img/votebar.gif" width="<%= FormatNumber((rs2("item_count")/totalvote*300),4) %>" height="15" title="<%=rs2("item_count")%>票" align="absmiddle"> <span style='font: 10px Verdana;color:#000000'><%= FormatNumber((rs2("item_count")/totalvote*100),0) %>%</span></td>
<td align="center" class="cn"><%=rs2("item_count")%></td>
</tr>
<%rs2.movenext
loop
if rs2.eof and rs2.bof then%>
<tr>
<td colspan="2" align="center" bgcolor="#FFFFFF" width="606">當前沒有投票選項!</td>
</tr>
<%end if
rs2.close
set rs2=nothing%>
<tr align="center">
<td colspan="3" class="cn"><%if request.cookies("npw")("voted")<>"yes" then%>您尚未投票!歡迎您提出寶貴意見。<%else%>您已經投過票了,感謝您的支持和參與!<%end if%> 總計票數: <span class="newshead"><%=totalvote%></span> 票</td>
</tr>
<tr align="center">
<td height="36" colspan="3" class="cn"> <input type=submit name="upfile2" value="關閉窗口" style="cursor:hand" onclick=window.location="javascript:self.close();" onFocus="this.blur()"></td>
</tr>
</table></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="22"> </td>
</tr>
</table></td>
</tr>
</table>
<br>
</div></td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
</table>
</body>
</html>
<%
end if
%>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -