<!--#include file="conn.asp"-->
<!--#include file="check.asp"-->
<%
	useflag=1
%>
<!--#include file="flag.asp"-->
<!--#include file="../inc/setup.asp"-->
<!--#include file="../inc/sql.asp"-->
<%
	end if
	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=0 where IsSelected=1"
		conn.execute "Update Vote set IsSelected=1 Where ID=" & ID
		response.write"<script language=JavaScript>alert('设置成功！');"    
		response.write"this.location.href='Vote.asp';</script>"
		response.end
	end if
	sql="select * from Vote order by id desc"
	set rs=server.createobject("adodb.recordset")
	rs.open sql,conn,1,1
%>
<html>
<head>
<title>网愿科技</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="Include/ManageMent.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--

.a1{BACKGROUND-IMAGE:url('images/titlebg.gif');COLOR:000000;}
.a2{BACKGROUND-COLOR: A4B6D7;}
.a3{BACKGROUND-COLOR: F2F8FF;}
.a4{BACKGROUND-COLOR: ECF5FF;}

.t1 {font:12px 宋体;color:#000000} 
.t2 {font:12px 宋体;color:#ffffff} 
.t3 {font:12px 宋体;color:#ffff00} 
.t4 {font:12px 宋体;color:#800000} 
.t5 {font:12px 宋体;color:#191970} 

.aaa:hover{
	Font-unline:yes;
	font-family: "宋体";
	color: #FFFFFF;
	text-decoration: underline;
	background-color: #CCCCCC;
}

-->
</style>
</head>
<body>
<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="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">&nbsp;<%=rs("Title")%></td>
            <td width="88" height="22" align="center"><a href="Vote_edit.asp?ID=<%=rs("ID")%>">修改</a> 
              <a href="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>
<%
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
