<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%
Server.ScriptTimeOut=5000
'On Error Resume Next
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
request2.Open()
'判断 用户是否开通功能
H_Costs=Replace(Replace(Left(request2.Form("H_Costs"),50),"<","["),">","]")
H_Address=Replace(Replace(Left(request2.Form("H_Address"),100),"<","["),">","]")
H_title=Replace(Replace(Left(request2.Form("H_title"),100),"<","["),">","]")
H_sort=Replace(Replace(Left(request2.Form("H_sort"),3),"<","["),">","]")
H_Shape=Replace(Replace(Left(request2.Form("H_Shape"),3),"<","["),">","]")
H_Floor=Replace(Replace(Left(request2.Form("H_Floor"),3),"<","["),">","]")
H_Area=Replace(Replace(Left(request2.Form("H_Area"),3),"<","["),">","]")
H_Content=Left(request2.Form("H_neirong"),3000)
H_Content=replace(H_Content,"table","表格")
H_Content=replace(H_Content,"TABLE","表格")
H_Content=replace(H_Content,"<tr","表格")
H_Content=replace(H_Content,"<td","表格")
H_Content=replace(H_Content,"</tr","表格")
H_Content=replace(H_Content,"</td","表格")
if H_sort="" or IsNumeric(H_sort)<>true then
response.Write "<script >alert('提示：\n\n对不起，请填写分类！...');history.back(-1);</script>"
response.End()
end if
if H_Shape="" or IsNumeric(H_Shape)<>true then
response.Write "<script >alert('提示：\n\n对不起，请选择户型！...');history.back(-1);</script>"
response.End()
end if
if H_Floor<>"" then
if IsNumeric(H_Floor)<>true then
response.Write "<script >alert('提示：\n\n对不起，请填写所在楼层,并只能是填写数字！...');history.back(-1);</script>"
response.End()
end if
else
H_Floor=0
end if 
if H_Area<>"" then
if IsNumeric(H_Area)<>true then
response.Write "<script >alert('提示：\n\n对不起，请填写建筑面积,并只能是填写数字！...');history.back(-1);</script>"
response.End()
end if
else
H_Area=0
end if
if H_title="" then
response.Write "<script >alert('提示：\n\n对不起，请填写标题！...');history.back(-1);</script>"
response.End()
end if
request2.FileType="gif/jpg"
request2.MaxSize=15360000
request2.SavePath="../UpLoadUC/"
if request2.Save("H_PIC",0) then
	H_PIC=request2.Form("H_PIC")
end if
''开始写入数据
set rs=Server.CreateObject("Adodb.Recordset")
	sql="select * from H_house"
	rs.open sql,conn,1,3
	rs.addnew
	rs("uid")=uid
	rs("H_Costs")=H_Costs
	rs("H_Address")=H_Address
	rs("H_title")=H_title
	rs("H_PIC")=H_PIC
	rs("H_Content")=H_Content
	rs("H_sort")=H_sort
	rs("H_Shape")=H_Shape
	rs("H_Floor")=H_Floor
	rs("H_Area")=H_Area
	rs("Rdate")=now()
	rs.update
	rs.close
	set rs=nothing	
	response.Write "<script >alert('提示：\n\n发布成功,立即返回...');location.href='house_master.asp';</script>"
	response.End()
%>