📄 research.asp
字号:
<% Response.Buffer=True %>
<!--#include file="conn.asp"-->
<%
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 research set answer"&options&"=answer"&options&"+1 where IsChecked=true"
rs.open sql,conn,1,3
set rs=nothing
end if
end if
%><head>
<title>调查结果</title>
<style type="text/css">
<!--
BODY {FONT-FAMILY: 宋体; FONT-SIZE: 9pt}
td {font-size: 9pt}
a:link {text-decoration: none; color: <%=Tablebackcolor%>}
a:visited {color: <%=Tablebackcolor%>; text-decoration: none}
a:active {color: #0000FF; text-decoration: underline}
a:hover {color: #0000FF; text-decoration: underline}
div {font-size: 9pt}
-->
</style></head>
<body bgcolor="#FFCEFF">
<div align="center">
<table border="0" cellpadding="0" cellspacing="0" width="366" height="48">
<%
total=0
set rs=server.createobject("adodb.recordset")
sql="select * from research where IsChecked=true"
rs.open sql,conn,1,1
%>
<tr>
<td width="366" height="48" valign="top"><font color="<%=Tablebackcolor%>">『调查结果』<br>
===============================================<br>
</font> <font color="#000073"> <%=rs("Title")%></font> </td>
</tr>
<tr>
<td width="366" height="111" valign="top">
<%
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
%>
<%=i%>.<%=rs("select"&i)%>: <img src=images/RSCount.gif width=<%=int(answer*2)%> height=8> <%=rs("answer"&i)%>人 <%=round(answer,3)%>%<br>
<%
end if
next
%>
<br>
共有【<%=total%>】人参加调查<br>
===============================================</td>
</tr>
</table>
</div>
<p align="center">【<a href="javascript:window.close()">关闭窗口</a>】
<% rs.close
set rs=nothing
conn.close
set conn=nothing %>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -