<!--#include file="conn.asp"-->
<!--#include file="check2.asp"-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>最新调查</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style>
<!--
td{font-size:9pt}
body {
	margin-top: 5px;
}
.style3 {color: #A84E22; font-weight: bold; }
#tabcss{
	BORDER-COLLAPSE: collapse;
	border-top-width: 1px;
	border-left-width: 1px;
	border-top-style: solid;
	border-left-style: solid;
	border-top-color: #dddddd;
	border-left-color: #dddddd;
}#tabcss td {
	line-height: 24px;
	padding-left: 10px;
	padding-top: 2px;
	padding-bottom: 2px;
	color: #333333;
	border-right-width: 1px;
	border-bottom-width: 1px;
	border-right-style: solid;
	border-bottom-style: solid;
	border-right-color: #dddddd;
	border-bottom-color: #dddddd;
}

-->
</style>
<SCRIPT language=JavaScript>
<!--
function Juge(theForm)
{

  if (theForm.dctitle.value == "")
  {
    alert("请输入题目!");
    theForm.dctitle.focus();
    return (false);
  }

  if (theForm.contect1.value == "")
  {
    alert("请输入选顶1内容!");
    theForm.contect1.focus();
    return (false);
  }
  if (theForm.contect2.value == "")
  {
    alert("请输入选顶2内容!");
    theForm.contect2.focus();
    return (false);
  }

}
-->
</script>
</head>

<body bgcolor="#fcfcfc">
      <%
sql="select top 1 * from e_diaocha1 order by id desc"
set rs=server.CreateObject("adodb.recordset")
rs.open sql,conn,1,1

if rs.bof or rs.eof then
	response.write "还没有调查记录。"
else
	dcid=rs("id")
	dctitle=rs("dctitle")
	adddate=rs("adddate")
%>
       
      <form name="theForm" method="post" action="diaochamodify.asp?dcid=<%=dcid%>" onsubmit="return Juge(this)">
        <table width="97%" border="0" align="center" cellpadding="0" cellspacing="0" id="tabcss">
		  <tr bgcolor="#E1EFFF"> 
			<td height=30 colspan=2>&nbsp;<b><font color="#FF0000">修改最新调查： </font>目前的题目及选项如下：</b></td>
		  </tr>
  
          <tr> 
            <td><font color=FF0000><b>&nbsp;题目：</b></FONT>  </td>
            <td><input name="dctitle" type="text" value="<%=dctitle%>" size="50" maxlength="50"> 开始日期：<%=adddate%></td>
        </tr>

<%
i=1
sql2="select * from e_diaocha2 where dcid="&dcid&" order by id"
set rs2=server.CreateObject("adodb.recordset")
rs2.open sql2,conn,1,1
if rs2.bof or rs2.eof then
else
	do while not rs2.eof
		id=rs2("id")
		contect=rs2("contect")
%>
          <tr> 
            <td > <div align="center">选顶<%=i%></div></td>
            <td ><input type=hidden name="id<%=i%>" value="<%=id%>">
			<input name="contect<%=i%>" type="text" value="<%=contect%>" size="50" maxlength="50"></td>
          </tr>
<%
		rs2.movenext
		i=i+1
	loop
end if
rs2.close
set rs2=nothing
%>
		  
          <tr> 
            <td height="40"> <div align="center"></div></td>
            <td><input type="submit" name="Submit2" value="确定修改" onClick="return confirm('真的要修改“最新调查”?')"></td>
          </tr>
        </table>
<%
end if
%>
</form>
      <table width="97%" align="center" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td height="26"><font color=#000099><strong><font color="#0000CC" style="font-size:14px;"><a href="diaochanew.asp">&nbsp;放弃以上面题目,设置新的“最新调查”&gt;&gt;</a></font></strong></FONT></td>
        </tr>
      </table>
      
  
</body>
</html>
<%
call connclose
%>

