请教高手,为何一段代码(红色部分)无法将值写进数据库"huiyuan"
<%'$Id: producit_renwu.asp 2009-08-17 $
if request.Cookies("shiwei_username")="" then
%>
<script language="javascript">
top.location.href="../index.asp"
</script>
<%
response.end
end if
%>
<!-- #include file="../conn2.asp" -->
<!-- #include file="../const.asp" -->
<html>
<head>
<title><%=dianming%> - 在录项目批量稽核</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../style/style.css" rel="stylesheet" type="text/css">
<style>
body {
background-color:#FFFFFF;
}
</style>
</HEAD>
<BODY>
<%
if fla13="0" and request.Cookies("shiwei_id")<>"1" then
%>
<br><center>
<img src="../images/note.gif" align="absmiddle"> <font color="#FF0000">你不具备此权限,请与管理员联系!</font></center>
<%
response.end
end if
%>
<%
if request("hid1")="ok" then
nowselldate=request("selldate")
for x=1 to maxproduit
nowguige=request("guige"&x)
nowid_ku=request("id_ku"&x)
nowhuohao=request("huohao"&x)
nowtitle=request("title"&x)
if nowprice="" then
nowprice=0
end if
if nowhuohao<>"单击选择项目" and nowshulian<>"" then
set rs_produit=conn.execute("select * from produit where huohao='"&nowhuohao&"'")
set rs=server.createobject("ADODB.RecordSet")
sql="select * from produit where huohao='"&nowhuohao&"' and id_ku="&nowid_ku
rs.open sql,conn,1,3
if rs.eof then
%>
<script language="javascript">
alert("<%=rs_ku("ku")%> 中没有项目 <%=rs_produit("title")%>!")
window.history.go(-1)
</script>
<%
response.end
exit for
end if
end if
next
for x=1 to maxproduit
nowselldate=request("selldate")
nowdanwei=request("danwei")
nowguige=request("guige"&x)
nowid_ku=request("id_ku"&x)
nowhuohao=request("huohao"&x)
nowtitle=request("title"&x)
if nowhuohao<>"单击选择项目" then
set rs_produit=conn.execute("select * from produit where huohao='"&nowhuohao&"'")
set rs=server.createobject("ADODB.RecordSet")
sql="select * from produit where huohao='"&nowhuohao&"' and id_ku="&nowid_ku
rs.open sql,conn,1,3
rs("id_danwei")=nowdanwei
rs("duihuan")=nowselldate
if nowdanwei=109 then
rs("beizhu")=nowbeizhu
end if
if nowdanwei=110 then
rs("beizhu")="该项目已经完成GIS数据录入,经过系统数据比对,确认无误,请客响确认项目关联号线资料是否移交,如无异议,则请建设部门会同相关部门进行现场验收!"
end if
rs.update
rs.close
set rs=server.createobject("ADODB.RecordSet")
sql="select * from buy where huohao='"&nowhuohao&"' "
rs.open sql,conn,1,3
if nowdanwei=110 then
rs("isok")=true
end if
if nowdanwei=109 then
rs("isok")=false
rs("id_huiyuan")=55
end if
rs.update
rs.close
sql="select * from buy where huohao='"&nowhuohao&"' "
rs.open sql,conn,1,3
do while rs.eof=false
if nowdanwei=110 then
rs("isok")=true
end if
if nowdanwei=109 then
rs("isok")=false
end if
rs.movenext
loop
end if
next
%>
<%
sql="select * from [huiyuan]"
set rs = server.createobject("ADODB.RecordSet")
rs.open sql,conn,1,3
if nowdanwei=110 then
rs.close
set rs = nothing
end if
if nowdanwei=109 then
rs.addnew
if id_ku=140 then
rs("qq")="江苏三维"
end if
if id_ku=143 then
rs("qq")="无锡大同"
end if
if id_ku=142 then
rs("qq")="省建工"
end if
if id_ku=150 then
rs("qq")="江苏网盈"
end if
rs("username") = nowtitle
rs("xinbie") = "项目稽核"
rs("tel") = nowbeizhu
rs("address") = nowguige
rs("card") = nowhuohao
rs("id_zu") = nowid_zu
rs.update
rs.close
set rs = nothing
end if
%>
<script language="javascript">
alert("GIS数据稽核成功,请建设部门及时整改或者组织项目验收!")
</script>
<script language="javascript">
window.location.href="produit_move.asp"
</script>
<%
end if
%>
<script language="javascript">
function isNumberString (InString,RefString)
{
if(InString.length==0) return (false);
for (Count=0; Count < InString.length; Count++) {
TempChar= InString.substring (Count, Count+1);
if (RefString.indexOf (TempChar, 0)==-1)
return (false);
}
return (true);
}
function check1()
{
if (document.form1.huohao1.value=="单击选择项目")
{
alert("还没有选择项目!");
return false;
}
if (document.form1.shulian1.value=="")
{
alert("请输入数量!");
return false;
}
}
</script>
<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#C4D8ED">
<tr>
<td>
<img src="../images/r_1.gif" alt="" /></td>
<td width="100%" background="../images/r_0.gif">
<table cellpadding="0" cellspacing="0" width="100%">
<tr>
<td> 项目批量稽核,请注意选择竣工在录项目,注意系统提示进行下一步操作!</td>
<td align="right"> </td>
</tr>
</table>
</td>
<td>
<img src="../images/r_2.gif" alt="" /></td>
</tr>
<tr>
<td></td>
<td>
<table align="center" cellpadding="4" cellspacing="1" class="toptable grid" border="1">
<form name="form1" method="post">
<tr>
<td width="16%" align="right" height="30">请选择项目:</td>
<td width="81%" class="category">
<table cellpadding="0" cellspacing="0" width="100%" border=0>
<%for x=1 to maxproduit%>
<tr id="cailiaohan<%=x%>"<%if x<>1 then%> style="display:none;"<%end if%>>
<td>
<input name="huohao<%=x%>" readonly onClick="JavaScript:window.open('produit5.asp?form=form1&field=huohao<%=x%>&field2=title<%=x%>&field3=guige<%=x%>&span1=id_ku<%=x%>','','directorys=no,toolbar=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=853,height=470,top=176,left=161');" style="width:80px" value="单击选择项目" size="1">
项目名称:
<input type="text" name="title<%=x%>" style="width:150; height:18" onKeyUp="value=value.replace(/[^\d.]/g,'')" onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d.]/g,''))">
<font color="#FF0000">施工识别码</font>:
<input type="password" name="id_ku<%=x%>" style="width:30; height:18" onKeyUp="value=value.replace(/[^\d.]/g,'')" onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d.]/g,''))" size="50">
施工负责人:
<input name="guige<%=x%>" style="width:40; height:18" onKeyUp="value=value.replace(/[^\d.]/g,'')" onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d.]/g,''))" size="50">
<%if x<>maxproduit then%><span onClick="cailiaohan<%=(x+1)%>.style.display=''" style="cursor:hand;">
<span onClick="cailiaohan<%=(x+1)%>.style.display=''" style="cursor:hand;">添加一个项目</span><%end if%>
<%if x<>1 then%><input type="button" value="清除" onClick="huohao<%=x%>.value='单击选择项目';shulian<%=x%>.value='1';price<%=x%>.value=''" class="button"><%end if%>
<%if x=1 then%><font color="#ff0000">*</font><%end if%>
<div id="showshulian<%=x%>"></div>
</td>
</tr>
<%next%>
</table>
</td>
</tr>
<tr>
<td align="right" height="30">项目稽核状态:</td>
<td class="category">
<select name="danwei" onChange="form3.submit()" size="1">
<option value="110" selected>录入待验</option>
<option value="109">稽核有误</option>
</select> </td>
</tr>
<tr>
<td align="right" height="30">项目稽核时间:</td>
<td class="category">
<input name="selldate" value="<%=date()%>" readonly style="width:150px">
<img src="../images/date.gif" align="absmiddle" style="cursor:pointer;" onClick="JavaScript:window.open('day.asp?form=form1&field=selldate&oldDate='+selldate.value,'','directorys=no,toolbar=no,status=no,menubar=no,scrollbars=no,resizable=no,width=250,height=170,top=200,left=520');">
</td>
</tr>
<tr>
<td width="25%" height="30" align="right">反馈问题类型:</td>
<td width="75%" class="category">
<%
sql="select * from zu_huiyuan order by id"
set rs_zu=conn.execute(sql)
if rs_zu.eof then
%>
<script language="javascript">
alert("请先添加类型!")
window.location.href="zu_add.asp"
</script>
<%
response.end
end if
%>
<font color="#FF0000">
<select name="id_zu" size="1">
<%
do while rs_zu.eof=false
%>
<option value="<%=rs_zu("id")%>"><%=rs_zu("zu")%></option>
<%
rs_zu.movenext
loop
%>
</select></font>
</tr>
<tr>
<td align="right" height="30">项目稽核说明:</td>
<td class="category">
<textarea name="beizhu" cols="100" rows="2"></textarea>
</td>
</tr>
<tr>
<td height="30"> </td>
<td class="category">
<input type="submit" value="确认项目稽核" onClick="return check1()" class="button">
<input type="hidden" name="hid1" value="ok">
<input type="reset" value="重新选择项目" class="button">
</td>
</tr>
</form>
</table>
</td>
<td></td>
</tr>
<tr>
<td>
<img src="../images/r_4.gif" alt="" /></td>
<td></td>
<td>
<img src="../images/r_3.gif" alt="" /></td>
</tr>
</table>
<iframe style="height:1px" src="" frameborder=0 width=1></iframe>
</body>
</html>