?? vote.asp
字號:
<!--
┌─ o91.com───────────────┐
│ 動感購物商務平臺WWW.SNSN.NET版權所有 │
│ 設計:模糊視線13855119911 QQ:9912515 │
└────────────────────┘
-->
<!--#include file="conn.asp"-->
<%dim options,total,sql,i,answer
if request.QueryString("stype")="" then
if Request.ServerVariables("REMOTE_ADDR")=request.cookies("IPAddress") then
response.write"<SCRIPT language=JavaScript>alert('感謝您的支持,您已經投過票了,請勿重復投票,謝謝!');"
response.write"javascript:window.close();</SCRIPT>"
else
options=request.form("options")
response.cookies("IPAddress")=Request.ServerVariables("REMOTE_ADDR")
conn.execute("update shop_toupiao set answer"&options&"=answer"&options&"+1 where IsChecked=1")
end if
end if
%><head>
<title>投票結果</title>
<link href="images//css.css" rel="stylesheet">
</head>
<div align="center">
<TABLE width=98% border=0 cellPadding=0 cellSpacing=1 bgcolor="#CCCCCC">
<TBODY>
<TR>
<TD height=25 colSpan=2 bgcolor="#FFFFFF"> <img
src="images/go.gif"><b>投票結果<strong></strong></b></TD>
</TR>
<TR>
<TD align=left vAlign=top bgcolor="#FFFFFF"> <table width="100%" border="0" cellspacing="0" cellpadding="0" height="5">
<tr>
<td height="10"></td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="98%" height="48" style="border-collapse: collapse" align="center">
<%
total=0
set rs=server.createobject("adodb.recordset")
sql="select * From shop_toupiao where IsChecked=1"
rs.open sql,conn,3,3
%>
<tr>
<td height="48" valign="top" colspan="3" align=center><font color="#000000">
</font> <font color="#000073"> <%=rs("Title")%></font> </td>
</tr>
<tr>
<td height="22">序號</td>
<td height="22">百比分</td>
<td height="22">人數</td>
</tr>
<%
for i=1 to 8
if rs("Select"&i)<>"" then
total=total+rs("answer"&i)
end if
next
%>
<%for i=1 to 8
if rs("Select"&i)<>"" then
if total=0 then
answer=0
else
answer=(rs("answer"&i)/total)*100
end if
%>
<tr>
<td valign="top"><%=i%>.<%=rs("select"&i)%>:</td>
<td valign="top"><img src=images/RSCount.gif width=<%=int(answer*2)%> height=8>
<%=round(answer,3)%>%</td>
<td valign="top"><%=rs("answer"&i)%>人</td>
<%
end if
next
%>
<tr>
<td colspan="3"> 共有【<%=total%>】人參加投票</td>
</tr>
</table>
<div align="center"></div>
<p align="center">【<a href="javascript:window.close()">關閉窗口</a>】
<% rs.close
set rs=nothing
conn.close
set conn=nothing %>
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="5">
<tr>
<td height="10"></td>
</tr>
</table></TD>
</TR>
</TBODY>
</TABLE>
</div>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -