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

📄 vote.asp

📁 本系统为ASP版 1
💻 ASP
字号:
<% Response.Buffer=True %> 
<%MDBpath="../suyannan/"%>
<!--#include file="../suyannan/mdb_path_info.asp"-->
<!--#include file="char.inc"-->
<LINK href=http://www.stock01.com/inc/style.css rel=stylesheet>
<%
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") 
		set rs=server.createobject("adodb.recordset")
		sql="update vote set answer"&options&"=answer"&options&"+1 where IsChecked=1"
		rs.open sql,conn,1,3
		set rs=nothing
	end if
end if
%><head>
<title><%=redcaff%>投票结果</title>
</head>
<table border="0" bgcolor=ffffff width="100%" height="100%"><tr><td align="center">
  <table border="0" width="300" align="center">
    <%
total=0
set rs=server.createobject("adodb.recordset")
sql="select * from vote where IsChecked=1"
rs.open sql,conn,1,1
%>
<tr align="center"> 
      <td height="24" colspan="4">『<font color="#000073"><%=rs("Title")%></font>』投票结果<br></td></tr>
<tr>
      <td height="24" colspan="4">=======================================================<br></td></tr>
<tr> 
      <td align="center">序号</td><td align="center" colspan="2">百比分</td><td align="right">人数</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 height="24"> 
      <td width="101"><b><%=i%>.<%=rs("select"&i)%>:</b></td>
      <td width="120"><img src=../images/RSCount.gif width=<%=int(answer*2)%> height=8></td>
      <td width="50"><%=round(answer,3)%>%</td>
      <td width="30" align="right"><%=rs("answer"&i)%>人</td>
      <%
	end if
next
%>
<tr> 
      <td colspan="4"> 共有【<%=total%>】人参加投票<br>=======================================================</td></tr>
<tr> 
      <td colspan="4" align="center">非常感谢您的支持<BR><BR>【<a href="javascript:window.close()">关闭窗口</a>】 
      </td></tr>
  </table> 
  <% rs.close     
set rs=nothing     
conn.close     
set conn=nothing %>
</td></tr></table> 

⌨️ 快捷键说明

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