<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%
Server.ScriptTimeOut=5000
dbs="../"
%>
<!--#include file="../inc/config.asp"-->
<!--#include file="uccook.asp"-->
<!--#include file="uc.asp"-->
<!--#include FILE="../inc/UpLoadClass.asp"-->
<!--#include file="../inc/Code2Info.en.asp"-->
<%
dim request2 
'建立上传对象
set request2=New UpLoadClass
'设置为手动保存模式
request2.AutoSave=2
'打开对象，默认为 gb2312 字符集，故没有显示设置
request2.Open()
'对象打开结束
H_name=Replace(Replace(Left(request2.Form("H_name"),100),"<","["),">","]")
H_Address=Replace(Replace(Left(request2.Form("H_Address"),100),"<","["),">","]")
H_tel=Replace(Replace(Left(request2.Form("H_tel"),50),"<","["),">","]")
H_region=Replace(Replace(Left(request2.Form("H_region"),100),"<","["),">","]")
H_Deve=Replace(Replace(Left(request2.Form("H_Deve"),50),"<","["),">","]")
H_Property=Replace(Replace(Left(request2.Form("H_Property"),50),"<","["),">","]")
H_Costs=Replace(Replace(Left(request2.Form("H_Costs"),50),"<","["),">","]")
H_Environment=Replace(Replace(Left(request2.Form("H_Environment"),1000),"<","["),">","]")
H_Traffic=Replace(Replace(Left(request2.Form("H_Traffic"),200),"<","["),">","]")
H_Decoration=Replace(Replace(Left(request2.Form("H_Decoration"),100),"<","["),">","]")
H_Open=Replace(Replace(Left(request2.Form("H_Open"),100),"<","["),">","]")
H_txt=Left(request2.Form("H_txt"),20000)
H_txt=replace(H_txt,"table","表格")
H_txt=replace(H_txt,"TABLE","表格")
H_txt=replace(H_txt,"<tr","表格")
H_txt=replace(H_txt,"<td","表格")
H_txt=replace(H_txt,"</tr","表格")
H_txt=replace(H_txt,"</td","表格")
H_txt=replace(H_txt,"</DIV","表格")
if H_name="" then
response.Write "<script >alert('提示：\n\n对不起，请填写知名企业名称！...');history.back(-1);</script>"
response.End()
end if
if H_Address="" then
response.Write "<script >alert('提示：\n\n对不起，请填写开发商地址！...');history.back(-1);</script>"
response.End()
end if
if H_Open="" or isdate(H_Open)<>true then
response.Write "<script >alert('提示：\n\n对不起，开盘时间！ 如 "&date()&"...');history.back(-1);</script>"
response.End()
end if
'图片上传写入
request2.FileType="gif/jpg"
request2.MaxSize=153600000
request2.SavePath="../UpLoadUC/"
if request2.Save("H_pic",0) then
	H_pic=request2.Form("H_pic")
end if
if H_pic<>"" then
old_H_pic=conn.execute("select H_PIC from H_houseshop where UID="&UID&"")("H_PIC")

						'''开始删除文件
								Dim objFSO         '声明一个名称为   objFSO   的变量以存放对象实例   
								Set objFSO   =   Server.CreateObject("Scripting.FileSystemObject")   
									objFSO.DeleteFile   Server.MapPath("../UpLoadUC/"&old_H_pic&""),True   
								Set objFSO   =   Nothing             '释放   FileSystemObject   对象实例内存空间  
						''删除文件结束
end if
''开始写入数据
set rs=Server.CreateObject("Adodb.Recordset")
	sql="select * from H_houseshop where UID="&UID&""
	rs.open sql,conn,1,3
	rs("H_name")=H_name
	rs("H_Address")=H_Address
	rs("H_TXT")=H_TXTs
	rs("H_tel")=H_tel
	rs("H_region")=H_region
	rs("H_Deve")=H_Deve
	rs("H_Property")=H_Property
	rs("H_Costs")=H_Costs
	rs("H_Environment")=H_Environment
	rs("H_Traffic")=H_Traffic
	rs("H_Decoration")=H_Decoration
	rs("H_Open")=H_Open
	if H_pic<>"" then
	rs("H_PIC")=H_PIC
	end if
	rs("RDate")=now()
	rs.update
	rs.close
	set rs=nothing	
	response.Write "<script >alert('提示：\n\n修改成功,立即返回...');location.href='houseshop_EDIT.asp';</script>"
	response.End()
	'释放上传对象
	set request2=nothing
%>