<!--#include file="conn1.asp"-->
<!--#include file="cookies.asp"-->

<%
 if request.QueryString("action")="save" then
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from xzlneedbuy",conn,1,3
rs.addnew
rs("fybt")=trim(request.Form("fybt"))
rs("diduan")=trim(request.Form("diduan"))
rs("ObjectType")=trim(request.Form("ObjectType"))
rs("mianyi")=trim(request.Form("mianyi"))
rs("area")=trim(request.Form("area"))
rs("area1")=trim(request.Form("area1"))
rs("jiage")=trim(request.Form("jiage"))
rs("jiage1")=trim(request.Form("jiage1"))
rs("jieshao")=trim(request.Form("content"))
rs("shouji")=trim(request.Form("shouji"))
rs("contact")=trim(request.Form("contact"))
rs("qicq")=trim(request.Form("qicq"))
rs("fabuzhe")=request.cookies("thdc")("username")
rs.update
rs.close
set rs=nothing
response.Redirect"adminxzlneedbuy.asp"
response.write "<script language=javascript>alert('添加成功！');window.location.href='adminxzlneedbuy.asp';</script>"
response.End

else
sql="select * from  xzlneedbuy where id="&request.QueryString("id")
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3
rs("fybt")=trim(request.Form("fybt"))
rs("diduan")=trim(request.Form("diduan"))
rs("ObjectType")=trim(request.Form("ObjectType"))

rs("mianyi")=trim(request.Form("mianyi"))
rs("area")=trim(request.Form("area"))
rs("area1")=trim(request.Form("area1"))
rs("jiage")=trim(request.Form("jiage"))
rs("jiage1")=trim(request.Form("jiage1"))
rs("jieshao")=trim(request.Form("content"))
rs("shouji")=trim(request.Form("shouji"))
rs("contact")=trim(request.Form("contact"))
rs("qicq")=trim(request.Form("qicq"))
rs("fabuzhe")=request.cookies("thdc")("username")
rs.update
rs.close
set rs=nothing
response.Redirect"adminxzlneedbuy.asp"
response.write "<script language=javascript>alert('修改成功！');window.location.href='adminxzlneedbuy.asp';</script>"
response.End

end if
%>