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

📄 vote.asp

📁 购物系统(本版为正式商业版
💻 ASP
字号:
<!--#include file="conn.asp"-->
<!--#include file="webconfig.asp"-->
<!--#include file="fuction.asp"-->
<%dim options,total,sql,i,answer,anid
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=nosql(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
if request("id")="" then
anid=0
else
anid=nosql(request("id"))
end if
%><head>
<title>投票结果</title>
<link rel="SHORTCUT ICON" href="/shortcut.ico">
<meta name="generator" content="snsn-shop">
<meta name=keywords content="<%=webgjz%>">
<meta name="description" content="<%=webmx%>">
<meta name="MSSmartTagsPreventParsing" content="TRUE">
<meta http-equiv="MSThemeCompatible" content="Yes">
<link href="/css.css" rel="stylesheet" type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"><style>
td{font-size:9pt;line-height:120%;color:#353535} 
body{font-size:9pt;line-height:120%} 

a:link          { color: #000000; text-decoration: none }
a:visited       { color: #000000; text-decoration: none }
a:active        { color: #000000; text-decoration: none }
a:hover         { color: #336699; text-decoration: none; position: relative; right: 0px; top: 1px }
</style>
</head>
<div align="center"> 
  <table width="370" border="0" cellspacing="0" cellpadding="0" align="center">
    <tr> 
      <td background="images/bj_6.gif" height="29"> 
        <table cellspacing=0 cellpadding=0 width=170 height="20">
          <tr> 
            <td width=5>&nbsp;</td>
            <td width=28> 
              <div align="center"><img src="images/icon2.gif" width="12" height="13"></div>
            </td>
            <td class=hg12 valign=bottom width="123">&nbsp;<font color="#000000"><b>投票结果</b></font></td>
            <td width=12>&nbsp;</td>
          </tr>
        </table>
      </td>
    </tr>
  </table>
</div>  
<table width="370" border="0" cellspacing="0" cellpadding="0" align="center">
  <tr> 
    <td background="images/bj_7.gif" height="29"> 
      <table border="0" cellpadding="0" cellspacing="0" width="95%" height="48" style="border-collapse: collapse" align="center">
        <%
total=0
set rs=server.createobject("adodb.recordset")
if anid="" and anid=0 then
sql="select * from shop_toupiao where IsChecked=1"
else
sql="select * from shop_toupiao where classid=" & anid & " and IsChecked=1 "
end if
rs.open sql,conn,3,3
%>
        <tr> 
          <td height="48" valign="top" colspan="3" align=center><font color="#000000"><br>
            =======================================================<br>
            </font> <font color="#000073"> <%=rs("Title")%></font> </td>
        </tr>
        <tr>
          <td valign="top">序号</td>
          <td valign="top">百比分</td>
          <td valign="top">人数</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%>】人参加投票<br>
            =======================================================</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 %>
    </td>
  </tr>
</table>
<table width="370" border="0" cellspacing="0" cellpadding="0" align="center">
  <tr> 
    <td background="images/bj_8.gif" height="23"> 
      <div align="center"></div>
      </td>
  </tr>
</table>

⌨️ 快捷键说明

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