📄 votedy.asp
字号:
<!--#include file="const.asp"-->
<!--#include file="connv.asp"-->
<%
'=========================================================
'产品目录:风讯产品N系列
'软件名称:风讯图文信息系统
'当前版本:2003.8.0
'=========================================================
'Copyright (C) 2002-2003 cooin.com. All rights reserved.
'网站: http://www.cooin.com
'程序制作:轻风云(QQ:655071) skeen@cooin.com,skeen@263.net,skeen@sohu.com
'论坛支持:风讯论坛(http://www.cooin.com/bbs)
'=========================================================
%>
<%
addr0=request.servervariables("server_name")
addr1=request.servervariables("url")
addr1=replace(addr1,"votedy.asp","")
addr="http://"&addr0&addr1
set rs=server.createobject("adodb.recordset")
'读取投票项目
if isnull(request("id")) or request("id")="" then
set rs=conn.execute("select top 1 * from class order by id desc")
vote="vote"
else
set rs=conn.execute("select * from class where id="&request("id"))
vote="vote"&request("id")
end if
response.write vote&"="&""""&""&""""&chr(10)
'如果投票不存在则提示出错
if rs.eof then
response.write vote&"="&vote&"+"&""""&"没有该投票;"&""""&chr(10)
response.write "document.write ("&vote&");"
response.end
end if
'如果有投票,则读取相关资料
title=rs("title")
style=rs("style")
classid=rs("id")
rs.close
'读取选择支
sql="select * from vote where class="&classid
rs.open sql,conn,3,1
response.write vote&"="&vote&"+"&""""&"<form name=form"&vote&" method='POST'>"&""""&chr(10)
response.write vote&"="&vote&"+"&""""&"<table border='0' width='100%' cellspacing='0' cellpadding='0'>"&""""&chr(10)
response.write vote&"="&vote&"+"&""""&"<tr>"&""""&chr(10)
response.write vote&"="&vote&"+"&""""&"<td width='100%' height='25'>"&""""&chr(10)
response.write vote&"="&vote&"+"&""""&"<p align='center'><b>"&title&"<b></td>"&""""&chr(10)
response.write vote&"="&vote&"+"&""""&"</tr>"&""""&chr(10)
response.write vote&"="&vote&"+"&""""&"<tr>"&""""&chr(10)
response.write vote&"="&vote&"+"&""""&"<td width='100%'>"&""""&chr(10)
response.write vote&"="&vote&"+"&""""&"<div align='center'>"&""""&chr(10)
response.write vote&"="&vote&"+"&""""&"<center>"&""""&chr(10)
response.write vote&"="&vote&"+"&""""&"<table border='0' width='90%' cellspacing='0' cellpadding='0'>"&""""&chr(10)
'排列选择支
do while not rs.eof
response.write vote&"="&vote&"+"&""""&"<tr>"&""""&chr(10)
response.write vote&"="&vote&"+"&""""&"<td width='100%'><input type='"&style&"' name='voted' value='"&rs("id")&"' size='20'>"&rs("vote")&"</td>"&""""&chr(10)
response.write vote&"="&vote&"+"&""""&"</tr>"&""""&chr(10)
rs.movenext
loop
response.write vote&"="&vote&"+"&""""&"</table>"&""""&chr(10)
response.write vote&"="&vote&"+"&""""&"</center>"&""""&chr(10)
response.write vote&"="&vote&"+"&""""&"</div>"&""""&chr(10)
response.write vote&"="&vote&"+"&""""&"</td>"&""""&chr(10)
response.write vote&"="&vote&"+"&""""&"</tr>"&""""&chr(10)
response.write vote&"="&vote&"+"&""""&"<tr>"&""""&chr(10)
response.write vote&"="&vote&"+"&""""&"<td width='100%' valign='bottom' align='center' height='30'><input type='button' value='投票' name='B1' onclick='tou"&vote&"();'> <input type='button' value='查看' name='B1' onclick=window.open('"&addr&"showvote.asp?classid="&classid&"','','width=650,height=300,resizable=1,scrollbars=1');></td>"&""""&chr(10)
response.write vote&"="&vote&"+"&""""&"</tr>"&""""&chr(10)
response.write vote&"="&vote&"+"&""""&"</table></form>"&""""&chr(10)
response.write vote&"="&vote&"+"&""""&"<\script>function tou"&vote&"(){window.open('about:blank','tou','width=650,height=300,resizable=1,scrollbars=1');form"&vote&".action='"&addr&"votetou.asp?classid="&classid&"&style="&style&"';form"&vote&".target='tou';form"&vote&".submit();}</\script>"&""""&chr(10)
'释放对象
rs.close
set rs=nothing
conn.close
set conn=nothing
response.write "document.write ("&vote&")"&chr(10)
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -