?? bs_vote.asp
字號:
<!--#include file="bsconfig.asp"-->
<%
'=========================================================
'
'產品名稱: 公司(企業)網站管理系統(簡稱:www.web300.cn)
'版權所有: www.web300.cn
'程序制作:www.web300.cn開發團隊
'Copyright 2006-2008 www.web300.cn - All Rights Reserved.
'
'========================================================
%>
<%
dim sql,rs,Action,ID
Action=Trim(Request("Action"))
ID=Trim(Request("VoteID"))
if Action="Set" and ID<>"" then
conn.execute "Update Vote set IsSelected=False where IsSelected=True"
conn.execute "Update Vote set IsSelected=True Where ID=" & ID
response.Write "<script language='JavaScript'type='text/JavaScript'>alert('設置成功!');</script>"
end if
sql="select * from Vote order by id desc"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
%>
<!-- #include file="Inc/Head.asp" -->
<BR>
<table cellpadding="2" cellspacing="1" border="0" width="560" align="center" class="a2">
<tr>
<td class="a1" height="25" align="center"><strong>調 查 管 理</strong></td>
</tr>
<tr class="a4">
<td align="center">
<br>
<form method="POST" action="Bs_Vote.asp">
<table width="500" border="0" align="center" cellpadding="0" cellspacing="2" Class="border">
<tr bgcolor="#C0C0C0" class="title">
<td width="37" height="25" align="center">選擇</td>
<td width="37" align="center">ID</td>
<td width="328" align="center">主題</td>
<td width="88" align="center">操作</td>
</tr>
<%
if not (rs.bof and rs.eof) then
do while not rs.eof
%>
<tr bgcolor="#E3E3E3" class="tdbg">
<td width="37" height="22" align="center">
<input type="radio" value=<%=rs("ID")%><%if rs("IsSelected")=true then%> checked<%end if%> name="VoteID"></td>
<td width="37" height="22" align="center"><%=rs("ID")%></td>
<td height="22"> <%=rs("Title")%></td>
<td width="88" height="22" align="center"><a href="Bs_Vote_edit.asp?ID=<%=rs("ID")%>">修改</a>
<a href="Bs_Vote_Del.asp?ID=<%=rs("ID")%>">刪除</a></td>
</tr>
<%
rs.movenext
loop
%>
<tr class="tdbg">
<td colspan=4 align=center><BR> <input name="Action" type="hidden" id="Action" value="Set">
<input type="submit" value="將選定的調查設為最新調查" name="submit">
</td>
</tr>
<% end if%>
</table>
</form>
</td>
</tr>
</table>
<BR>
<%htmlend%>
<%
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -