📄 polllist.asp
字号:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>投票列表</title>
<SCRIPT language=JavaScript>
function showvote(pid)
{
window.open("pollitem.asp?pid="+pid,'votewin','toolbar=no,scrollbars=no,menubar=no,resizable=1,width=500,height=280');
}
</SCRIPT>
<link rel="stylesheet" type="text/css" href="poll.css">
</head>
<body background="bg.gif">
<%
set conn=server.createobject("ADODB.CONNECTION")
conn.open "DBQ="+server.mappath("poll.mdb")+";DRIVER={Microsoft Access Driver (*.mdb)};"
set rs=server.createobject("adodb.recordset")
typeid=request("type")
sql="SELECT title,ID from descrip"
if typeid<>"" then sql=sql&" where typeid="&typeid
sql=sql&" order by ID desc"
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "<p>还 没 有 任 何 投 票</p>"
else%>
<div align="center">
<center>
<%
set rstype=server.createobject("adodb.recordset")
rstype.open "select * from types",conn,1,1
%>
<table>
<tr>
<% while not rstype.eof %>
<td><A href="polllist.asp?type=<%=rstype("id")%>"><%=rstype("typename")%></A></td>
<%
rstype.movenext
wend
rstype.close
set rstype=nothing
%>
</tr>
</table>
<table border=1 borderColorDark=#ffffec borderColorLight=#5e5e00 cellPadding=1 cellSpacing=0 width=70%>
<tr bgcolor=cccccc align=center><td width="100">标题序号</td><td width="493">调查标题</td></tr>
<%
cc=1
while not rs.eof
if cc mod 2=1 then
Response.Write "<tr bgcolor=#E7E7E7 align=center>"
else
Response.Write "<tr BGCOLOR=#F4F4F4 align=center>"
end if
%>
<td width="100"><%=rs("ID")%></td><td width="493"><A href='javascript:showvote(<%=rs("ID")%>)'><%=rs("title")%></A></td>
<%
cc=cc+1
rs.movenext
wend
Response.Write "</table>"
end if
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
<br><br><br>
<A HREF=main.asp> <img border="0" src="gohome.gif">
</table>
</center>
</div>
<br><br><br>
<div align="center">
<td width="745" height="53" <td width="305" height="27"><a href="pollword.asp">管理员操作</a></td>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -