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

<%
 if request.QueryString("action")="save" then
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from fwcz",conn,1,3
rs.addnew
rs("fybt")=trim(request("fybt"))
rs("xiaoqu")=trim(request("xiaoqu"))
rs("xxdz")=trim(request("xxdz"))
rs("jushi")=trim(request("jushi"))
rs("ting")=trim(request("ting"))
rs("hxwei")=trim(request("hxwei"))
rs("FitType")=trim(request("FitType"))
rs("Floor")=trim(request("Floor"))
rs("zonglc")=trim(request("zonglc"))
rs("zujin")=trim(request("zujin"))
rs("yajin")=trim(request("yajin"))
rs("rzsj")=trim(request("rzsj"))
rs("fwType")=trim(request("fwType"))
rs("Toward")=trim(request("Toward"))
rs("area")=trim(request("area"))
rs("HouseAllocation")=trim(request("HouseAllocation"))
rs("tupian")=trim(request("a"))
rs("jieshao")=trim(request.Form("content"))
rs("shouji")=trim(request("shouji"))
rs("contact")=trim(request("contact"))
rs("fabuzhe")=request.cookies("thdc")("username")
rs.update
rs.close
set rs=nothing
response.write "<script language=javascript>alert('添加成功！');window.location.href='adminRental.asp';</script>"
response.End

else




sql="select * from fwcz where id="&request.QueryString("id")
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3



rs("fybt")=trim(request.Form("fybt"))
rs("localArea")=trim(request.Form("localArea"))
rs("xiaoqu")=trim(request.Form("xiaoqu"))
rs("xxdz")=trim(request.Form("xxdz"))
rs("jushi")=trim(request.Form("jushi"))
rs("ting")=trim(request.Form("ting"))
rs("hxwei")=trim(request.Form("hxwei"))
rs("FitType")=trim(request.Form("FitType"))
rs("Floor")=trim(request.Form("Floor"))
rs("zonglc")=trim(request.Form("zonglc"))
rs("zujin")=trim(request.Form("zujin"))
rs("yajin")=trim(request.Form("yajin"))
rs("rzsj")=trim(request.Form("rzsj"))
rs("fwType")=trim(request.Form("fwType"))
rs("Toward")=trim(request.Form("Toward"))
rs("area")=trim(request.Form("area"))
rs("HouseAllocation")=trim(request.Form("HouseAllocation"))
if request.Form("a")="" then
rs("tupian")=trim(request.Form("tupian1"))
else
rs("tupian")=trim(request.Form("a"))
end if
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.write "<script language=javascript>alert('修改成功！');window.location.href='adminRental.asp';</script>"
response.End





end if
%>