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

<%
 if request.QueryString("action")="save" then
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from shopsBuyhouse",conn,1,3
rs.addnew
rs("fybt")=trim(request.Form("fybt"))
rs("diduan")=trim(request.Form("diduan"))
rs("ObjectType")=trim(request.Form("ObjectType"))


rs("jingying")=trim(request.Form("jingying"))
rs("mianyi")=trim(request.Form("mianyi"))
rs("qwjg")=trim(request.Form("qwjg"))
rs("qwjg2")=trim(request.Form("qwjg2"))
rs("qwmj")=trim(request.Form("qwmj"))
rs("qwmj2")=trim(request.Form("qwmj2"))
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"adminshopsBuyhouse.asp"
response.End

else
sql="select * from shopsBuyhouse 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("jingying")=trim(request.Form("jingying"))

rs("qwjg")=trim(request.Form("qwjg"))
rs("qwjg2")=trim(request.Form("qwjg2"))
rs("qwmj")=trim(request.Form("qwmj"))
rs("qwmj2")=trim(request.Form("qwmj2"))
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"adminshopsBuyhouse.asp"
response.End
end if
%>