?? vote.asp
字號:
<!--#include file="conn.asp"--><%
dim sql,rs
dim lastid
dim multi
lastid=encodestr(Request.querystring("ID"))
Set rs = Server.CreateObject("ADODB.Recordset")
if lastid="" then
sql="select top 1 id from vote order by id desc"
rs.open sql,conn,1,1
if rs.eof then
rs.close
set rs=nothing
response.write "沒有記錄!"
response.end
end if
lastid=rs(0)
rs.close
end if
sql="select * from vote where id="&lastid&" order by options"
rs.open sql,conn,1,1
if rs.eof then
rs.close
set rs=nothing
response.write "數據已經被破壞!"
response.end
end if
multi=rs("multi")
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>無標題文檔</title>
<style type="text/css">
<!--
.style1 {color: #0000CC}
.style4 {
color: #3366FF;
font-style: italic;
}
.ttr {
color: #3366FF;
margin: 0px;
padding: 0px;
border-top: thin none;
border-right: medium none;
border-bottom: 1px dotted #A4D1FF;
border-left: thin none;
}
-->
</style>
</head>
<body>
<form name="form1" method="post" action="votedo.asp">
<table width="200" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#9B9BFF">
<tr>
<td width="21%" height="35" bgcolor="#BBD3F4" class="style4">投票:<%= rs("title") %></td>
</tr>
<tr>
<td height="168" bordercolor="#333333" bgcolor="#D7E8FB">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<%
rs.movenext
while not rs.eof %>
<tr valign="middle">
<td width="4%" class="ttr">
<%if multi=0 then%>
<input name="svote" type="radio" value="<%= rs("options") %>">
<%else%>
<input name="mvote" type="checkbox" value="<%= rs("options") %>">
<%end if%>
</td>
<td width="8%" class="ttr"><strong class="style1"> <%= Chr(64+rs("options")) %></strong></td>
<td width="88%" class="ttr"> <%= rs("title") %> </td>
</tr>
<%
rs.movenext
wend
%>
</table>
</td>
</tr>
<tr>
<td><table width="100%" height="28" border="0" cellpadding="0" cellspacing="0" bgcolor="#B3B8D9">
<tr>
<td width="47%" align="center"><input name="ID" type="hidden" id="ID" value="<%=lastid%>"> <input name="multi" type="hidden" id="multi" value="<%=multi%>">
<input type="submit" name="Submit" value="提交"></td>
<td width="53%" align="center"><input type="reset" name="Submit2" value="重置"></td>
</tr>
</table></td>
</tr>
</table>
</form>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -