<!--#include file="CommonCode.asp"-->
<!--#include file="../Include/PowerEasy.ConsumeLog.asp"-->
<%
'**************************************************************
' Software name: PowerEasy SiteWeaver
' Web: http://www.powereasy.net
' Copyright (C) 2005－2008 佛山市动易网络科技有限公司 版权所有
'**************************************************************

Dim HouseID, OnTop, IsElite, IsHot, rsHouseList
Dim InfoType, HouseTableName
Dim ClassID, SpecialID, Status
Dim ManageType
Dim PurviewChecked
Dim DeductionPoint, IsDeduction

Dim tClass, ClassName, ClassDir, ReleaseDeductPoint, CommendClassPoint, UpgradePoint

Sub Execute()

    ChannelID = PE_CLng(Trim(Request("ChannelID")))
    If ChannelID > 0 Then
        Call GetChannel(ChannelID)
    Else
        FoundErr = True
        ErrMsg = ErrMsg & "<li>请指定要查看的频道ID！</li>"
    End If
    If FoundErr = True Then
        Response.Write ErrMsg
        Exit Sub
    End If

    If XmlDoc.Load(Server.MapPath(InstallDir & "Language/Gb2312_Channel_" & ChannelID & ".xml")) = False Then XmlDoc.Load (Server.MapPath(InstallDir & "Language/Gb2312.xml"))
    
    HouseID = PE_CLng(Trim(Request("HouseID")))
    ClassID = PE_CLng(Trim(Request("ClassID")))
    Status = PE_CLng(Trim(Request("Status")))
    InfoType = ReplaceBadChar(Trim(Request("InfoType")))
    ManageType = Trim(Request("ManageType"))

    If ClassID < 1 Or ClassID > 5 Then
        ClassID = 1
    End If
    If Status = 0 Then
        Status = 9
    End If

    '******用于对搜索表单信息类型的判断***
    Select Case ClassID
    Case 1
        InfoType = "ChuShou"
        HouseTableName = "PE_HouseCS"
    Case 2
        InfoType = "ChuZhu"
        HouseTableName = "PE_HouseCZ"
    Case 3
        InfoType = "QiuGou"
        HouseTableName = "PE_HouseQG"
    Case 4
        InfoType = "QiuZhu"
        HouseTableName = "PE_HouseQZ"
    Case 5
        InfoType = "HeZhu"
        HouseTableName = "PE_HouseHZ"
    End Select
    '*** End ***

    Set tClass = Conn.Execute("select * from PE_HouseConfig where ClassID=" & ClassID)
    If tClass.BOF And tClass.EOF Then
        FoundErr = True
        ErrMsg = ErrMsg & "<li>找不到指定的栏目</li>"
        Call WriteErrMsg(ErrMsg, ComeUrl)
        Exit Sub
    Else
        ClassName = tClass("ClassName")
        ClassDir = tClass("ClassDir")
        ReleaseDeductPoint = tClass("ReleaseDeductPoint")
        CommendClassPoint = tClass("CommendClassPoint")
        UpgradePoint = tClass("UpgradePoint")
    End If
    tClass.Close
    Set tClass = Nothing

    If Action = "" Then Action = "Manage"
    FileName = "User_House.asp?ChannelID=" & ChannelID & "&Action=" & Action & "&ManageType=" & ManageType
    strFileName = FileName & "&ClassID=" & ClassID & "&Field=" & strField & "&keyword=" & Keyword
    Response.Write "<table align='center'><tr align='center' valign='top'>"
    Response.Write "<td width='120'><a href='User_House.asp?ChannelID=" & ChannelID & "&ClassID=" & ClassID & "&Action=Add'><img src='images/Article_add.gif' border='0' align='absmiddle'><br>添加" & ClassName & "信息</a></td>"
    Response.Write "<td width='120'><a href='User_House.asp?ChannelID=" & ChannelID & "&ClassID=" & ClassID & "&Status=9'><img src='images/Article_all.gif' border='0' align='absmiddle'><br>所有" & ClassName & "信息</a></td>"
    Response.Write "<td width='120'><a href='User_House.asp?ChannelID=" & ChannelID & "&ClassID=" & ClassID & "&Status=0'><img src='images/Article_unpassed.gif' border='0' align='absmiddle'><br>待审核的" & ClassName & "信息</a></td>"
    Response.Write "<td width='120'><a href='User_House.asp?ChannelID=" & ChannelID & "&ClassID=" & ClassID & "&Status=3'><img src='images/Article_passed.gif' border='0' align='absmiddle'><br>已审核的" & ClassName & "信息</a></td>"
    Response.Write "</tr></table>" & vbCrLf

    Select Case Action
    Case "Add"
        Call Add
    Case "Modify"
        Call Modify
    Case "SaveAdd", "SaveModify"
        Select Case ClassID
        Case 1
            Call SaveAddChuShou
        Case 2
            Call SaveAddChuZhu
        Case 4
            Call SaveAddQiuZhu
        Case 3
            Call SaveAddQiuGou
        Case 5
            Call SaveAddHeZhu
        Case Else
            Call SaveAddChuShou
        End Select
    Case "Show"
        Call Show
    Case "Del"
        Call Del
    Case "SetNew"
        Call SetProperty
    Case "Manage"
        Call main
    End Select
    If FoundErr = True Then
        Call WriteErrMsg(ErrMsg, ComeUrl)
    End If
    Call CloseConn
End Sub


Sub main()
    Dim rsHouse, sql, Querysql

    If PE_CLng(Request("page")) = 0 Then
        CurrentPage = 1
    Else
        CurrentPage = PE_CLng(Request("page"))
    End If

    Call ShowJS_Main(ChannelShortName)
    Response.Write "<br><table width='100%' border='0' align='center' cellpadding='0' cellspacing='0'>"
    Response.Write "  <tr>"
    Response.Write "    <td height='22'>"
    Call ShowPath(ChannelShortName & "管理")
    Response.Write "    </td><td height='22' align='right'>"
    Response.Write "      <select name='JumpClass' id='JumpClass' onchange=""if(this.options[this.selectedIndex].value!=''){location='" & FileName & "&ClassID=" & "'+this.options[this.selectedIndex].value;}"">"
    Response.Write "        <option value='' selected>跳转栏目至…</option>"
    Response.Write "      <option value=1 style='background-color:green'>出售房源</option>"
    Response.Write "      <option value=2 style='background-color:green'>出租房源</option>"
    Response.Write "      <option value=3 style='background-color:green'>求购信息</option>"
    Response.Write "      <option value=4 style='background-color:green'>求租信息</option>"
    Response.Write "      <option value=5 style='background-color:green'>合租信息</option>"
    Response.Write "      </select>"
    Response.Write "    </td>"
    Response.Write "  </tr>"
    Response.Write "</table>"
    Response.Write "<table width='100%' border='0' cellpadding='0' cellspacing='0'><tr>"
    Response.Write "    <form name='myform' method='Post' action='User_House.asp' onsubmit='return ConfirmDel();'>"
    Response.Write "     <td><table class='border' border='0' cellspacing='1' width='100%' cellpadding='0'>"
    Response.Write "          <tr class='title' height='22'> "
    Response.Write "            <td height='22' width='30' align='center'><strong>选中</strong></td>"
    Response.Write "            <td width='25' align='center'><strong>ID</strong></td>"
    
    Select Case ClassID
    Case 1
        Response.Write "<td align='center' width=25% ><strong>房产地址</strong></td>"
        Response.Write "<td align='center'><strong>户型</strong></td>"
        Response.Write "<td align='center'><strong>售价</strong></td>"
    Case 2
        Response.Write "<td align='center' width=25% ><strong>房产地址</strong></td>"
        Response.Write "<td align='center'><strong>户型</strong></td>"
        Response.Write "<td align='center'><strong>租金</strong></td>"
    Case 3
        Response.Write "<td align='center' width=25% ><strong>欲购地段</strong></td>"
        Response.Write "<td align='center'><strong>欲购户型</strong></td>"
        Response.Write "<td align='center'><strong>期望价格</strong></td>"
    Case 4
        Response.Write "<td align='center' width=25% ><strong>欲租地址</strong></td>"
        Response.Write "<td align='center'><strong>欲租户型</strong></td>"
        Response.Write "<td align='center'><strong>租金范围</strong></td>"
    Case 5
        Response.Write "<td align='center'><strong>合租类型</strong></td>"
        Response.Write "<td align='center' width=25% ><strong>欲租地址</strong></td>"
        Response.Write "<td align='center'><strong>欲租户型</strong></td>"
        Response.Write "<td align='center'><strong>租金</strong></td>"
    End Select
    Response.Write "<td align='center'><strong>属性</strong></td>"
    Response.Write "<td align='center'><strong>更新时间</strong></td>"
    Response.Write "<td align='center'><strong>有效期</strong></td>"
    Response.Write "<td align='center' width=4% ><strong>审核</strong></td>"
    Response.Write "<td align='center' width=15% ><strong>操作</strong></td>"
    Response.Write "          </tr>"
    
    Select Case ClassID
    Case 1
        sql = "select top " & MaxPerPage & "  F.HouseID,F.ClassID,C.ClassName,C.ClassDir,C.UpgradePoint,C.CommendClassPoint,F.HouseDiZhi,F.HouseHuXing,F.HouseLeiXing,F.TotalPrice,F.OtherPrice,F.HousePriceType,F.ShuiFei,F.ContactName, F.ContactPhone,"
        sql = sql & " F.Keyword,F.YouXiaoQi,F.Editor,F.UpdateTime,F.Hits,F.Elite,F.ViewAll,F.Hot,F.OnTop,F.Passed,F.Deleted from PE_HouseCS F"
        sql = sql & " left join PE_HouseConfig C on F.ClassID=C.ClassID "
    Case 2
         sql = "select top " & MaxPerPage & " F.HouseID,F.ClassID,C.ClassName,C.ClassDir,C.UpgradePoint,C.CommendClassPoint,F.HouseDiZhi,F.HouseHuXing,F.HouseZuJin,F.HouseZuJinType,F.ContactName,F.ContactPhone,F.Keyword,"
         sql = sql & " F.YouXiaoQi,F.Editor,F.UpdateTime,F.ViewAll,F.Hits,F.Hot,F.OnTop,F.Elite,F.Passed,F.Deleted from PE_HouseCZ F"
        sql = sql & " left join PE_HouseConfig C on F.ClassID=C.ClassID "
    Case 3
         sql = "select top " & MaxPerPage & " F.HouseID,F.ClassID,C.ClassName,C.ClassDir,C.UpgradePoint,C.CommendClassPoint,F.HouseDiZhi,F.HouseHuXing,F.HousePrice1,F.HousePrice2,F.HousePriceType,F.ContactName,F.ContactPhone,F.Keyword,"
         sql = sql & " F.YouXiaoQi,F.Editor,F.UpdateTime,F.ViewAll,F.Hits,F.Hot,F.OnTop,F.Elite,F.Passed,F.Deleted from PE_HouseQG F"
        sql = sql & " left join PE_HouseConfig C on F.ClassID=C.ClassID "
    Case 4
         sql = "select top " & MaxPerPage & " F.HouseID,F.ClassID,C.ClassName,C.ClassDir,C.UpgradePoint,C.CommendClassPoint,F.HouseDiZhi,F.HouseHuXing,F.HouseZuJin1,F.HouseZuJin2,F.HouseZuJinType,F.ContactName,F.ContactPhone,F.Keyword,"
         sql = sql & " F.YouXiaoQi,F.Editor,F.UpdateTime,F.ViewAll,F.Hits,F.Hot,F.OnTop,F.Elite,F.Passed,F.Deleted from PE_HouseQZ F"
        sql = sql & " left join PE_HouseConfig C on F.ClassID=C.ClassID "
    Case 5
         sql = "select top " & MaxPerPage & " F.HouseID,F.ClassID,C.ClassName,C.ClassDir,C.UpgradePoint,C.CommendClassPoint,F.HouseDiZhi,F.HeZhuType,F.HouseHuXing,F.HouseZuJin,F.HouseZuJinType,F.Hits,F.ContactName,F.ContactPhone,F.Keyword,"
         sql = sql & " F.YouXiaoQi,F.Editor,F.UpdateTime,F.ViewAll,F.Hits,F.Hot,F.OnTop,F.Elite,F.Passed,F.Deleted from PE_HouseHZ F"
        sql = sql & " left join PE_HouseConfig C on F.ClassID=C.ClassID "
    Case Else
        FoundErr = True
        ErrMsg = ErrMsg & "<li>参数错误！</li>"
        Exit Sub
    End Select
    Querysql = Querysql & " where F.ChannelID=" & ChannelID & " and F.Editor='" & UserName & "'"
    If ManageType = "Recyclebin" Then
        Querysql = Querysql & " and F.Deleted=" & PE_True & ""
    Else
        Querysql = Querysql & " and F.Deleted=" & PE_False & ""
    End If
    If Status = 3 Then
        Querysql = Querysql & " and F.Passed=" & PE_True & ""
    ElseIf Status = 0 Then
        Querysql = Querysql & " and F.Passed=" & PE_False & ""
    End If
    If OnTop = "True" Then
        Querysql = Querysql & " and F.OnTop=" & PE_True & ""
    End If
    If IsElite = "True" Then
        Querysql = Querysql & " and F.Elite=" & PE_True & ""
    End If
    If IsHot = "True" Then
        Querysql = Querysql & " and F.Hits>=" & HitsOfHot & ""
    End If
    
    If Keyword <> "" Then
        Select Case strField
        Case "HouseDiZhi"
            Querysql = Querysql & " and F.HouseDiZhi like '%" & Keyword & "%' "
        Case "HouseQuYu"
            Querysql = Querysql & " and F.HouseQuYu like '%" & Keyword & "%' "
        Case "HouseHuXing"
            Querysql = Querysql & " and F.HouseHuXing like '%" & Keyword & "%' "
        Case "Editor"
            Querysql = Querysql & " and F.Editor='" & Keyword & "' "
        Case "ContactName"
            Querysql = Querysql & " and F.ContactName='" & Keyword & "'"
        Case Else
            Querysql = Querysql & " and F.HouseDiZhi like '%" & Keyword & "%' "
        End Select
    End If
    totalPut = PE_CLng(Conn.Execute("select Count(*) from " & HouseTableName & " F " & Querysql)(0))
    If CurrentPage < 1 Then
        CurrentPage = 1
    End If
    If (CurrentPage - 1) * MaxPerPage > totalPut Then
        If (totalPut Mod MaxPerPage) = 0 Then
            CurrentPage = totalPut \ MaxPerPage
        Else
            CurrentPage = totalPut \ MaxPerPage + 1
        End If
    End If
    If CurrentPage > 1 Then
        Querysql = Querysql & " and F.HouseID < (select min(HouseID) from (select top " & ((CurrentPage - 1) * MaxPerPage) & " F.HouseID from " & HouseTableName & " F " & Querysql & " order by F.HouseID desc) as QueryHouse) "
    End If
    sql = sql & Querysql & " order by F.HouseID desc"

    Set rsHouse = Server.CreateObject("ADODB.Recordset")
    rsHouse.Open sql, Conn, 1, 1
    If rsHouse.BOF And rsHouse.EOF Then
        totalPut = 0
        If Status = 3 Then
            Response.Write "<tr class='tdbg'><td colspan='20' align='center'><br>没有任何<font color=green>已审核</font>的" & ChannelShortName & "！<br><br></td></tr>"
        ElseIf Status = 0 Then
            Response.Write "<tr class='tdbg'><td colspan='20' align='center'><br>没有任何<font color=blue>待审核</font>的" & ChannelShortName & "！<br><br></td></tr>"
        Else
            Response.Write "<tr class='tdbg'><td colspan='20' align='center'><br>没有任何" & ChannelShortName & "！<br><br></td></tr>"
        End If
    Else
        Dim HouseNum, HousePath
        HouseNum = 0
        Do While Not rsHouse.EOF
            Response.Write "      <tr class='tdbg' onmouseout=""this.style.backgroundColor=''"" onmouseover=""this.style.backgroundColor='#BFDFFF'"">"
            Response.Write "        <td width='30' align='center'><input name='HouseID' type='checkbox' onclick='unselectall()' id='HouseID' value='" & rsHouse("HouseID") & "'></td>"
            Response.Write "        <td align='center'>" & rsHouse("HouseID") & "</td>"
            If InfoType = "HeZhu" Then
                Response.Write "        <td align='center'>" & rsHouse("HeZhuType") & "</td>"
            End If
            Response.Write "        <td align='center'>"
            Response.Write "<a href='User_House.asp?ChannelID=" & ChannelID & "&Action=Show&ClassID=" & ClassID & "&HouseID=" & rsHouse("HouseID") & "'"
            Response.Write "'>" & rsHouse("HouseDiZhi")
            Response.Write "</a>"
            Response.Write "</td>"
            Response.Write "        <td align='center'>"
            Response.Write "<a href='User_House.asp?ChannelID=" & ChannelID & "&Action=Show&ClassID=" & ClassID & "&HouseID=" & rsHouse("HouseID") & "'"
            Response.Write "'>" & rsHouse("HouseHuXing")
            Response.Write "</a>"
            Response.Write "</td>"
            Select Case ClassID
            Case 1
                Response.Write "<td align='center'>" & rsHouse("TotalPrice") & " " & rsHouse("HousePriceType") & "</td>"
            Case 2, 5
                Response.Write "<td align='center'>" & rsHouse("HouseZuJin") & " " & rsHouse("HouseZuJinType") & "</td>"
            Case 3
                Response.Write "<td align='center'>" & rsHouse("HousePrice1") & "-" & rsHouse("HousePrice2") & " " & rsHouse("HousePriceType") & "</td>"
            Case 4
                Response.Write "<td align='center'>" & rsHouse("HouseZuJin1") & "-" & rsHouse("HouseZuJin2") & " " & rsHouse("HouseZuJinType") & "</td>"
            End Select
            Response.Write "      <td align='center'>"
            If rsHouse("OnTop") = True Then
                Response.Write "<font color=blue>顶</font> "
            Else
                Response.Write "&nbsp;"
            End If
            If rsHouse("Hits") >= HitsOfHot Then
                Response.Write "<font color=red>热</font> "
            Else
                Response.Write "&nbsp;"
            End If
            If rsHouse("Elite") = True Then
                Response.Write "<font color=green>荐</font> "
            Else
                Response.Write "&nbsp;"
            End If
            Response.Write "    </td>"
            Response.Write "      <td align='center'>" & FormatDateTime(rsHouse("UpdateTime"), 2) & "</td>"
            Response.Write "      <td align='center'>" & rsHouse("YouXiaoQi") & "</td>"
            Response.Write "    <td align='center'>"
            If rsHouse("Passed") = "True" Then
                Response.Write "<b>√</b>"
            Else
                Response.Write "<font color=red><b>×</b></font>"
            End If
            Response.Write "    </td>"
            Response.Write "    <td align='left'>&nbsp;"
            Response.Write "<a href='User_House.asp?ChannelID=" & ChannelID & "&Action=Modify&ClassID=" & ClassID & "&HouseID=" & rsHouse("HouseID") & "'>修改</a>&nbsp;"
            If rsHouse("Passed") = True Then
                Response.Write "<a href='User_House.asp?ChannelID=" & ChannelID & "&Action=SetNew&ClassID=" & ClassID & "&HouseID=" & rsHouse("HouseID") & "' onclick=""return confirm('此信息将被提升" & DateDiff("D", rsHouse("UpdateTime"), Now()) & "天，每提升一天将扣除您" & rsHouse("UpgradePoint") & "点,您确定要提升吗？')"">提升</a>&nbsp;"
            End If
            Response.Write "<a href='User_House.asp?ChannelID=" & ChannelID & "&Action=Del&ClassID=" & ClassID & "&HouseID=" & rsHouse("HouseID") & "' onclick=""return confirm('确定要彻底删除此" & ChannelShortName & "信息吗？彻底删除后将无法还原！');"">删除</a> "
            Response.Write "</td>"
            Response.Write "</tr>"

            HouseNum = HouseNum + 1
            If HouseNum >= MaxPerPage Then Exit Do
            rsHouse.MoveNext
        Loop
    End If
    rsHouse.Close
    Set rsHouse = Nothing
    Response.Write "</table>"

    Response.Write "<table width='100%' border='0' cellpadding='0' cellspacing='0'>"
    Response.Write "  <tr>"
    Response.Write "    <td width='200' height='30'><input name='chkAll' type='checkbox' id='chkAll' onclick='CheckAll(this.form)' value='checkbox'>选中本页显示的所有" & ChannelShortName & "</td><td>"
    Response.Write "<input name='ClassID' type='hidden' id='ClassID' value=" & ClassID & ">"
    Response.Write "<input name='submit1' type='submit' id='submit1' onClick=""document.myform.Action.value='Del';"" value='彻底删除选定的" & ChannelShortName & "'>"
    Response.Write "<input name='Action' type='hidden' id='Action' value=''>"
    Response.Write "<input name='ChannelID' type='hidden' id='ChannelID' value='" & ChannelID & "'>"
    Response.Write "  </td></tr>"
    Response.Write "</table>"
    Response.Write "</td>"
    Response.Write "</form></tr></table>"
    If totalPut > 0 Then
        Response.Write ShowPage(strFileName, totalPut, MaxPerPage, CurrentPage, True, True, ChannelItemUnit & ChannelShortName & "", True)
    End If

    Response.Write "<br>"
    Response.Write "<form method='Get' name='SearchForm' action='" & FileName & "'>"
    Response.Write "<table width='100%' border='0' cellpadding='0' cellspacing='0' class='border'>"
    Response.Write "  <tr class='tdbg'>"
    Response.Write "   <td width='80' align='right'><strong>" & ChannelShortName & "搜索：</strong></td>"
    Response.Write "   <td>"
    Response.Write "<select name='ClassID'>"
    Response.Write "<option value=''>选择类别</option>"
    Response.Write "<option value='1'>出售房源</option>"
    Response.Write "<option value='2'>出租房源</option>"
    Response.Write "<option value='3'>求购信息</option>"
    Response.Write "<option value='4'>求租信息</option>"
    Response.Write "<option value='5'>合租信息</option>"
    Response.Write "</select>"
    Response.Write "<select name='Field' size='1'>"
    Response.Write "<option value='HouseDiZhi'>房产地址</option>"
    Response.Write "<option value='HouseQuYu'>所在区域</option>"
    Response.Write "<option value='HouseHuXing'>房产户型</option>"
    Response.Write "<option value='ContactName'>联系人</option>"
    Response.Write "<option value='Editor' selected>发布人</option>"
    Response.Write "</select>"
    Response.Write "<input type='text' name='keyword'  size='20' value='关键字' maxlength='50' onFocus='this.select();'>"
    Response.Write "<input type='submit' name='Submit'  value='搜索'>"
    Response.Write "<input name='ManageType' type='hidden' id='ManageType' value='" & ManageType & "'>"
    Response.Write "<input name='ChannelID' type='hidden' id='ChannelID' value='" & ChannelID & "'>"
    Response.Write "</td></tr></table></form>"
    Response.Write "<br><b>说明：</b><br>&nbsp;&nbsp;&nbsp;&nbsp;" & ChannelShortName & "属性中的各项含义：<font color=blue>顶</font>----固顶" & ChannelShortName & "，<font color=red>热</font>----热门" & ChannelShortName & "，<font color=green>荐</font>----推荐" & ChannelShortName & "，<font color=blue>图</font>----有" & ChannelShortName & "图片，<font color=red>错</font>----" & ChannelShortName & "地址中有错误链接<br><br>"
End Sub

Sub Add()
    Dim i, ViewAllPurview, rsClass, rsHouseArea
    Set rsHouseArea = Conn.Execute("Select * from PE_HouseArea")
    If rsHouseArea.EOF Then
        FoundErr = True
        ErrMsg = ErrMsg & "<li>管理员还没有添加任何房产区域!</li>"
        Exit Sub
    End If
    rsHouseArea.Close
    Set rsHouseArea = Nothing
    Call ShowJS_House
    Response.Write "<br><table width='100%'><tr><td align='left'>您现在的位置：<a href='User_House.asp?ChannelID=" & ChannelID & "'>" & ChannelName & "管理</a>&nbsp;&gt;&gt;&nbsp;添加<font color=red>" & ClassName & "</font>信息</td></tr></table>"
    Response.Write "<form method='POST' name='myform' onSubmit='return CheckForm" & ClassDir & "();' action='User_House.asp?ChannelID=" & ChannelID & "&ClassID=" & ClassID & "' target='_self'>"
    
    Response.Write "<table id='Tabs_Bottom' width='100%'  border='0' align='center' cellpadding='0' cellspacing='0'>" & vbCrLf
    Response.Write "  <tr align='center'>" & vbCrLf
    Response.Write "    <td id='TabTitle' class='title6' onclick='ShowTabs(0)' style='cursor:hand;' >基本信息</td>" & vbCrLf
    Response.Write "    <td id='TabTitle' class='title5' onclick='ShowTabs(1)' style='cursor:hand;' >联系方式</td>" & vbCrLf
    Response.Write "    <td id='TabTitle' class='title5' onclick='ShowTabs(2)' style='cursor:hand;' >其它信息</td>" & vbCrLf
    Response.Write "    <td>&nbsp;</td>" & vbCrLf
    Response.Write "  </tr>" & vbCrLf
    Response.Write "</table>" & vbCrLf
    
    Response.Write "<table width=100% border='0' cellpadding='0' cellspacing='5' align=center class='border'>"
    Response.Write "  <tr align='center'>"
    Response.Write "    <td class='tdbg' height='200' valign='top'>"
    Response.Write "<table style='BORDER-COLLAPSE: collapse' borderColor=#ffffff width=100% border='1' cellspacing='0' cellpadding='3'>"
    Response.Write " <tbody id='Tabs' style='display:'>" & vbCrLf
    Response.Write "<tr class='tdbg'><td width=120 align=right><strong>房产来源：</strong></td><td colspan=2>"
    Response.Write "<select name='HouseSource'>"
    Response.Write "<option value='个人'>个人</option>"
    Response.Write "<option value='中介'>中介</option>"
    Response.Write "</select><font color='#FF0000'>*</font></td>"
    If ClassID = 5 Then
        Response.Write "<tr class='tdbg'>"
        Response.Write "<td width='120' align='right'><strong>合租类别：</strong></td>"
        Response.Write "<td colspan='2'>"
        Response.Write "<select name='HeZhuType'>"
        Response.Write "<option value=''>请选择</option>"
        Response.Write "<option value='有房招租'>有房招租</option>"
        Response.Write "<option value='无房求租'>无房求租</option>"
        Response.Write "</select>合租<font color='#FF0000'>*</font>"
        Response.Write "</td>"
        Response.Write "</tr>"
    End If
    Response.Write "<tr class='tdbg'><td width=120 align=right><strong>设为推荐：</strong></td><td colspan=2>"
    Response.Write "<input type='checkbox' name='isElite' id='isElite' value='yes'>推荐&nbsp;&nbsp;&nbsp;&nbsp;"
    Response.Write "<input type='text' name='CommendClassDays' id='CommendClassDays' size='4'>天"
    Response.Write "&nbsp;&nbsp;&nbsp;&nbsp;（<font color=red>每推荐一天将扣除" & CommendClassPoint & "点，一旦设置，审核通过后将不能更改，请慎用</font>）</td></tr>"
    Response.Write "<tr class='tdbg'>"
    Response.Write "<td width='120' align='right'><strong>房产地址：</strong></td>"
    Response.Write "<td colspan='2' >区（市）:"
    Response.Write "<select name='HouseQuYu'>" & GetAreaList_Option() & "</select>"
    Response.Write "<input name='HouseDiZhi' type='text' size='20' maxlength='15'>"
    Response.Write "<font color='#FF0000'>*</font> <font color='#000000'>此处填写路名地址和小区（或楼盘）名称</font></td>"
    Response.Write "</tr>"
    If ClassID = 1 Or ClassID = 2 Or ClassID = 5 Then
        Response.Write "<tr class='tdbg'>"
        Response.Write "<td width='120' align='right'><strong>详细门牌：</strong></td>"
        Response.Write "<td colspan='2' >"
        Response.Write "<input name='HouseXiangXiDiZhi' type='text' size='31' maxlength='20'>"
        Response.Write "<font color='#000000'>此处填写 ×幢（号楼） ×单元（座） ×室</font></td>"
        Response.Write "</tr>"
    End If
    Select Case ClassID
        Case 1
            Call ExportHouseHuXingStr("HouseHuXing")
            Response.Write "<td width='348'><strong>房产面积：</strong> "
            Response.Write "<input name='HouseMianJi' type='text' size='10' maxlength='8'>"
            Response.Write "㎡ <font color='#FF0000'>*</font></td>"
            Response.Write "</tr>"
            Response.Write "<tr class='tdbg'>"
            Response.Write "<td width='120' align='right'><strong>产权性质：</strong></td>"
            Response.Write "<td >"
            Response.Write "<select name='HouseChanQuan'>"
            Response.Write "<option value=''></option>"
            Response.Write "<option value='已购商品房'>已购商品房</option>"
            Response.Write "<option value='已购房改房'>已购房改房</option>"
            Response.Write "<option value='已购准现房'>已购准现房</option>"
            Response.Write "<option value='经济适用房'>经济适用房</option>"
            Response.Write "<option value='集资合建房'>集资合建房</option>"
            Response.Write "<option value='已购公房'>已购公房</option>"
            Response.Write "<option value='经济解困房'>经济解困房</option>"
            Response.Write "<option value='私房'>私房</option>"
            Response.Write "<option value='司法抵债房'>司法抵债房</option>"
            Response.Write "<option value='集体土地房'>集体土地房</option>"
            Response.Write "</select>"
            Response.Write "</td>"
            Response.Write "<td width='348'><strong>建成年份：</strong>"
            Response.Write "<select name='HouseJianCheng'>"
            Response.Write "<option value=''></option>"
            Response.Write "<option value='1988年以前'>1988年以前</option>"
            For i = 1988 To 2014
                Response.Write "<option value=" & i & "年>" & i & "年</option>"
            Next
            Response.Write "</select>"
            Response.Write "</td>"
            Response.Write "</tr>"
            Call ExportHouseLouCengStr
            Call ExportHouseLeiXingStr
            Response.Write "<tr class='tdbg'>"
            Response.Write "<td width='120' align='right'><strong>采光朝向：</strong></td>"
            Response.Write "<td colspan='2' >"
            Response.Write "客厅"
            Call ExportHouseChaoXiangStr("HouseChaoXiang1")
            Response.Write "主卧"
            Call ExportHouseChaoXiangStr("HouseChaoXiang2")
            Response.Write "次卧"
            Call ExportHouseChaoXiangStr("HouseChaoXiang3")
            Response.Write "<input name='HouseChaoXiang4' type='checkbox' value='明卫'>明卫，"
            Response.Write "<input name='HouseChaoXiang4' type='checkbox' value='暗卫'>暗卫，"
            Response.Write "<input name='HouseChaoXiang4' type='checkbox' value='明厨'>明厨，"
            Response.Write "<input name='HouseChaoXiang4' type='checkbox' value='暗厨'>暗厨，"
            Response.Write "<input name='HouseChaoXiang4' type='checkbox' value='双明卫'>双明卫"
            Response.Write "</td>"
            Response.Write "</tr>"
            Call ExportHouseJiChuStr
            Call ExportHouseZhuangXiuStr("HouseZhuangXiu")
            Response.Write "<tr class='tdbg'>"
            Response.Write "<td width='120' align='right'><strong>水电管线：</strong></td>"
            Response.Write "<td colspan='2' >"
            Response.Write "<input name='HouseShuiDian' type='checkbox' value='电器线路已铺设'>电器线路已铺设，"
            Response.Write "<input name='HouseShuiDian' type='checkbox' value='冷热水管已预埋'>冷热水管已预埋"
            Response.Write "</td>"
            Response.Write "</tr>"
            Call ExportHouseDianQiStr
            Call ExportHouseJiaJuStr
            Response.Write "<tr class='tdbg'> "
            Response.Write "<td width='120' align='right'><strong>附近公交：</strong></td>"
            Response.Write "<td colspan='2' > "
            Response.Write "<input type='text' name='HouseGongJiaoLu' maxlength='80' size='15'> 路"
            Response.Write "<input type='text' name='HouseGongJiaoZhan' maxlength='40' size='15'> 站"
            Response.Write "</td>"
            Response.Write "</tr>"
            Call ExportHouseShiZhengStr
            Call ExportTimeLimitStr("JiaoFangStart")
            Response.Write "<tr class='tdbg'> "
            Response.Write "<td width='120' align='right'><strong>出售价格：</strong></td>"
            Response.Write "<td colspan='2' >"
            Response.Write " &yen;:<input type='text' name='TotalPrice' size='6'  maxlength='8'>"
            Response.Write "<select name='HousePriceType'>"
            Response.Write "<option value='元/㎡'>元/㎡</option>"
            Response.Write "<option value='万元'>万元</option>"
            Response.Write "</select><font color='#FF0000'>*</font>"
            Response.Write "（其中家电装修折价<input type='text' name='OtherPrice' size='6'  maxlength='8'>万元），"
            Response.Write "卖方交易税费由<select name='ShuiFei'>"
            Response.Write "<option value=''> </option>"
            Response.Write "<option value='卖方缴纳'>卖方缴纳</option>"
            Response.Write "<option value='买方缴纳'>买方缴纳</option>"
            Response.Write "<option value='双方承担'>双方承担</option>"
            Response.Write "</select>"
            Response.Write "</td>"
            Response.Write "</tr>"
            Response.Write "<tr class='tdbg'>"
            Response.Write "<td width='120' align='right'><strong>付款方式：</strong></td>"
            Response.Write "<td colspan='2' >"
            Response.Write "<select name='HouseZhiFu'>"
            Response.Write "<option value='分期'>分期</option>"
            Response.Write "<option value='银行按揭'>银行按揭</option>"
            Response.Write "<option value='公积金贷款'>公积金贷款</option>"
            Response.Write "<option value='一次性'>一次性</option>"
            Response.Write "</select>"
            Response.Write "</td>"
            Response.Write "</tr>"
        Case 3
            Response.Write "<tr class='tdbg'>"
            Response.Write "<td width='120' align='right'><strong>欲购类型：</strong></td>"
            Response.Write "<td width=330>"
            Response.Write "建成于<select name='HouseJianCheng1'>"
            Response.Write "<option value=''></option>"
            Response.Write "<option value='1988年以前'>1988年以前</option>"
            For i = 1988 To 2014
                Response.Write "<option value=" & i & "年>" & i & "年</option>"
            Next
            Response.Write "</select>至"
            Response.Write "<select name='HouseJianCheng2'>"
            Response.Write "<option value=''></option>"
            For i = 1988 To 2014
                Response.Write "<option value=" & i & "年>" & i & "年</option>"
            Next
            Response.Write "</select>间的"
            Call ExportHouseLeiXingStr
            Response.Write "</td>"
            Response.Write "<td ><strong>房屋性质：</strong>"
            Response.Write "<select name='HouseXingZhi'>"
            Response.Write "<option value='二手房'>二手房</option>"
            Response.Write "<option value='期房'>期房</option>"
            Response.Write "<option value='新楼盘'>新楼盘</option>"
            Response.Write "<option value='准现房'>准现房</option>"
            Response.Write "</select>"
            Response.Write "</td>"
            Response.Write "</tr>"
            Call ExportHouseHuXingStr("HouseHuXing")
            Response.Write "<td ><strong>房产面积：</strong>"
            Response.Write "<input name='HouseMianJi1' type='text' size='8' maxlength='8'> －"
            Response.Write "<input name='HouseMianJi2' type='text' size='8' maxlength='8'>"
            Response.Write "㎡之间<font color='#FF0000'>*</font></td>"
            Response.Write "</tr>"
            Call ExportHouseLouCengStr
            Response.Write "</tr>"
            Response.Write "<tr class='tdbg'>"
            Response.Write "<td width='120' align='right'><strong>期望价格：</strong></td>"
            Response.Write "<td colspan='2' >"
            Response.Write "<input type='text' name='HousePrice1' size='8'  maxlength='8'> －"
            Response.Write "<input type='text' name='HousePrice2' size='8'  maxlength='8'>"
            Response.Write "<select name='HousePriceType'>"
            Response.Write "<option value='元/㎡'>元/㎡</option>"
            Response.Write "<option value='万元'>万元</option>"
            Response.Write "</select><font color='#FF0000'>*</font>，"
            Response.Write "支付方式：<select name='HouseZhiFu'>"
            Response.Write "<option value='分期'>分期</option>"
            Response.Write "<option value='银行按揭'>银行按揭</option>"
            Response.Write "<option value='公积金贷款'>公积金贷款</option>"
            Response.Write "<option value='一次性'>一次性</option>"
            Response.Write "</select>"
            Response.Write "</td>"
            Response.Write "</tr>"
            Call ExportHouseJiChuStr
            Call ExportHouseZhuangXiuStr("HouseZhuangXiu")
            Call ExportHouseShiZhengStr
            Call ExportTimeLimitStr("JiaoFangStart")
        Case 2
            Call ExportHouseHuXingStr("HouseHuXing")
            Response.Write "<td width='348'><strong>房产面积：</strong> "
            Response.Write "<input name='HouseMianJi' type='text' size='10' maxlength='8'>"
            Response.Write "㎡ <font color='#FF0000'>*</font></td>"
            Response.Write "</tr>"
            Call ExportHouseLouCengStr
            Call ExportHouseLeiXingStr
            Call ExportHouseJiChuStr
            Call ExportHouseJiaJuStr
            Call ExportHouseZhuangXiuStr("HouseZhuangXiu")
            Call ExportHouseWeiShengStr
            Call ExportHouseDianQiStr
            Response.Write "<tr class='tdbg'>"
            Response.Write "<td width='120' align='right'><strong>信息设施：</strong></td>"
            Response.Write "<td colspan='2' >"
            Response.Write "<input name='HouseXinXi' type='checkbox' value='有线电视'>有线电视，"
            Response.Write "<input name='HouseXinXi' type='checkbox' value='LAN宽带'>LAN宽带，"
            Response.Write "<input name='HouseXinXi' type='checkbox' value='ADSL宽带'>ADSL宽带，"
            Response.Write "<input name='HouseXinXi' type='checkbox' value='附近能使用小灵通'>附近能使用小灵通"
            Response.Write "</td>"
            Response.Write "</tr>"
            Response.Write "<tr class='tdbg'>"
            Response.Write "<td width='120' align='right'><strong>附近公交：</strong></td>"
            Response.Write "<td colspan='2' > "
            Response.Write "<input type='text' name='HouseGongJiaoLu' maxlength='80' size='15'> 路 "
            Response.Write "<input type='text' name='HouseGongJiaoZhan' maxlength='40' size='15'> 站"
            Response.Write "</td>"
            Response.Write "</tr>"
            Call ExportHouseShiZhengStr
            Response.Write "<tr class='tdbg'>"
            Response.Write "<td width='120' align='right'><strong>租赁时间：</strong></td>"
            Response.Write "<td colspan='2' > "
            Call ExportTimeLimitStr("ZuLinStart")
            Response.Write "至"
            Call ExportTimeLimitStr("ZuLinEnd")
            Response.Write "</td>"
            Response.Write "</tr>"
            Call ExportHouseZuJinStr("HouseZuJin")
        Case 4
            Call ExportHouseHuXingStr("HouseHuXing")
            Response.Write "<td width='402'><strong>欲租面积：</strong>"
            Response.Write "<input name='HouseMianJi1' type='text' size='8' maxlength='8'> －"
            Response.Write "<input name='HouseMianJi2' type='text' size='8' maxlength='8'>"
            Response.Write "㎡<font color='#FF0000'>*</font></td>"
            Response.Write "</tr>"
            Call ExportHouseZuJinStr("HouseZuJin")
            Call ExportHouseLouCengStr
            Call ExportHouseLeiXingStr
            Call ExportHouseJiChuStr
            Call ExportHouseJiaJuStr
            Call ExportHouseZhuangXiuStr("HouseZhuangXiu")
            Call ExportHouseWeiShengStr
            Call ExportHouseDianQiStr
            Response.Write "<tr class='tdbg'>"
            Response.Write "<td width='120' align='right'><strong>期望管线：</strong></td>"
            Response.Write "<td colspan='2' >"
            Response.Write "<input name='HouseXinXi' type='checkbox' value='有线电视'>有线电视，<input name='HouseXinXi' type='checkbox' value='网通宽带'>网通宽带，"
            Response.Write "<input name='HouseXinXi' type='checkbox' value='ADSL'>ADSL，"
            Response.Write "<input name='HouseXinXi' type='checkbox' value='附近能使用小灵通'>附近能使用小灵通"
            Response.Write "</td>"
            Response.Write "</tr>"
            Call ExportHouseShiZhengStr
            Response.Write "<tr class='tdbg'>"
            Response.Write "<td width='120' align='right'><strong>租赁时间：</strong></td>"
            Response.Write "<td colspan='2' > "
            Call ExportTimeLimitStr("ZuLinStart")
            Response.Write " 至"
            Call ExportTimeLimitStr("ZuLinEnd")
            Response.Write "</td>"
            Response.Write "</tr>"
        Case 5
            Call ExportHouseHuXingStr("HouseHuXing")
            Response.Write "<td width='348'><strong>整体面积：</strong>"
            Response.Write "<input name='HouseMianJi' type='text' size='10' maxlength='8'>"
            Response.Write "㎡ <font color='#FF0000'>*</font></td>"
            Response.Write "</tr>"
            Call ExportHouseHuXingStr("HouseHuXing1")
            Response.Write "<td><strong>分租面积：</strong>"
            Response.Write "<input name='HouseMianJi1' type='text' size='10' maxlength='8'>"
            Response.Write "㎡ </td>"
            Response.Write "</tr>"
            Call ExportHouseHuXingStr("HouseHuXing2")
            Response.Write "<td><strong>共用面积：</strong><input name='HouseMianJi2' type='text' size='10' maxlength='8'>㎡</td>"
            Response.Write "</tr>"
            Call ExportHouseLouCengStr
            Call ExportHouseLeiXingStr
            Call ExportJianJieStr("HouseJianJie")
            Call ExportJianJieStr("HouseShiYou")
            Call ExportHouseJiChuStr
            Call ExportHouseJiaJuStr
            Call ExportHouseZhuangXiuStr("HouseZhuangXiu")
            Call ExportHouseWeiShengStr
            Call ExportHouseDianQiStr
            Response.Write "<tr class='tdbg'>"
            Response.Write "<td width='120' align='right'><strong>信息设施：</strong></td>"
            Response.Write "<td colspan='2' width='644'>"
            Response.Write "<input name='HouseXinXi' type='checkbox' value='有线电视'>有线电视，"
            Response.Write "<input name='HouseXinXi' type='checkbox' value='LAN宽带'>LAN宽带，"
            Response.Write "<input name='HouseXinXi' type='checkbox' value='ADSL宽带'>ADSL宽带，"
            Response.Write "<input name='HouseXinXi' type='checkbox' value='附近能使用小灵通'>附近能使用小灵通"
            Response.Write "</td>"
            Response.Write "</tr>"
            Response.Write "<tr class='tdbg'>"
            Response.Write "<td width='120' align='right'><strong>附近公交：</strong></td>"
            Response.Write "<td colspan='2' width='644'>"
            Response.Write "<input type='text' name='HouseGongJiaoLu' maxlength='80' size='15'> 路"
            Response.Write "<input type='text' name='HouseGongJiaoZhan' maxlength='40' size='15'> 站"
            Response.Write "</td>"
            Response.Write "</tr>"
            Call ExportHouseShiZhengStr
            Response.Write "<tr class='tdbg'>"
            Response.Write "<td width='120' align='right'><strong>租赁时间：</strong></td>"
            Response.Write "<td colspan='2' width='644'>"
            Call ExportTimeLimitStr("ZuLinStart")
            Response.Write "  至"
            Call ExportTimeLimitStr("ZuLinEnd")
            Response.Write "</td>"
            Response.Write "</tr>"
            Call ExportHouseZuJinStr("HouseZuJin")
        End Select
        Response.Write "<tr class='tdbg'>"
        Response.Write "<td width='120' align='right'><strong>关 键 字：</strong></td>"
        Response.Write "<td > "
        Response.Write "<input name='Keyword' type='text' size='30' maxlength='100' value='0室0厅'  title='用来查找相关房产，可输入多个关键字，中间用“|”隔开。不能出现'*?,.()等字符。'>"
        Response.Write "<font color='#FF0000'>*</font>"
        Response.Write "</td>"
        Response.Write "<td width='348'><strong>本信息有效期：</strong> "
        Response.Write "<select name='YouXiaoQi'>"
        Response.Write "<option value='一周' selected>一周</option>"
        Response.Write "<option value='半个月'>半个月</option>"
        Response.Write "<option value='一个月'>一个月</option>"
        Response.Write "<option value='两个月'>两个月</option>"
        Response.Write "<option value='半年'>半年</option>"
        Response.Write "<option value='一年'>一年</option>"
        Response.Write "</select>"
        Response.Write "</td>"
        Response.Write "</tr>"
        Response.Write "</tbody>"

        Response.Write "        <tbody id='Tabs' style='display:none'>" & vbCrLf
        Response.Write "<tr class='tdbg'> "
        Response.Write "<td width='120' align='right'><strong>联系电话：</strong></td>"
        Response.Write "<td > "
        Response.Write "<input name='ContactPhone' type='text' size='30' maxlength='50'>"
        Response.Write "<font color='#FF0000'>*</font>"
        Response.Write "</td>"
        Response.Write "<td width='348'><strong>联系人：</strong>"
        Response.Write "<input name='ContactName' type='text' size='20' maxlength='20'>"
        Response.Write "<font color='#FF0000'>*</font>"
        Response.Write "</td>"
        Response.Write "</tr>"
        Response.Write "<tr class='tdbg'>"
        Response.Write "<td width='120' align='right'><strong>电子邮件：</strong></td>"
        Response.Write "<td > "
        Response.Write "<input name='ContactEmail' type='text' size='30' maxlength='100'>"
        Response.Write "</td>"
        Response.Write "<td width='348'><strong>OICQ号：</strong> "
        Response.Write "<input name='ContactQQ' type='text' size='20' maxlength='20'>"
        Response.Write "</td>"
        Response.Write "</tr>"
        Response.Write "</tbody>"

        Response.Write "        <tbody id='Tabs' style='display:none'>" & vbCrLf
        Response.Write "<tr class='tdbg'>"
        Response.Write "<td width='120' align='right'><strong>其它说明：</strong></td>"
        Response.Write "            <td colspan='2' ><textarea name='HouseQiTa' cols='80' rows='10' id='HouseQiTa' style='display:none'></textarea>"
        Response.Write "                <iframe ID='editor' src='../editor.asp?ChannelID=" & ChannelID & "&ShowType=5&tContentid=HouseQiTa' frameborder='1' scrolling='no' width='520' height='260' ></iframe>"
        Response.Write "            </td>"
        Response.Write "</tr>"
        Response.Write "</tbody>"
        Response.Write "</table>"
        Response.Write "</td>"
        Response.Write "</tr>"
        Response.Write "</table>"
        Response.Write "<div align='center'>"
        Response.Write "<p> "
        Response.Write " <input name='Action' type='hidden' id='Action' value='SaveAdd'>"
        Response.Write " <input name='Add' type='submit'  id='Add' value=' 发布 ' style='cursor:hand;'>"
        Response.Write " &nbsp; "
        Response.Write " <input name='Cancel' type='button' id='Cancel' value=' 取 消 ' onClick=""window.location.href='User_House.asp?ChannelID=" & ChannelID & "&ClassID=" & ClassID & "&Action=Manage';"" style='cursor:hand;'>"
        Response.Write "</p>"
        Response.Write "</div>"
        Response.Write "</form>"
End Sub
  
Sub Modify()
    Dim sql, i
    Call ShowJS_House
    If HouseID = 0 Then
        FoundErr = True
        ErrMsg = ErrMsg & "<br><li>请指定要修改的房产信息ID</li>"
        Exit Sub
    End If
    Response.Write "<table width='100%'><tr><td align='left'>您现在的位置：<a href='User_House.asp?ChannelID=" & ChannelID & "'>" & ChannelName & "管理</a>&nbsp;&gt;&gt;&nbsp;修改<font color=red>" & ClassName & "</font>信息</td></tr></table>"
    Response.Write "<form method='POST' name='myform' onSubmit='return CheckForm" & ClassDir & "();' action=User_House.asp?ChannelID=" & ChannelID & "&HouseID=" & HouseID & "&ClassID=" & ClassID & "  target='_self'>"
    Response.Write "<table id='Tabs_Bottom' width='100%'  border='0' align='center' cellpadding='0' cellspacing='0'>" & vbCrLf
    Response.Write "  <tr align='center'>" & vbCrLf
    Response.Write "    <td id='TabTitle' class='title6' onclick='ShowTabs(0)' style='cursor:hand;' >基本信息</td>" & vbCrLf
    Response.Write "    <td id='TabTitle' class='title5' onclick='ShowTabs(1)' style='cursor:hand;' >联系方式</td>" & vbCrLf
    Response.Write "    <td id='TabTitle' class='title5' onclick='ShowTabs(2)' style='cursor:hand;' >其它信息</td>" & vbCrLf
    Response.Write "    <td>&nbsp;</td>" & vbCrLf
    Response.Write "  </tr>" & vbCrLf
    Response.Write "</table>" & vbCrLf
    Response.Write "<table width=100% border='0' cellpadding='0' cellspacing='5' align=center class='border'>"
    Response.Write "  <tr align='center'>"
    Response.Write "    <td class='tdbg' height='200' valign='top'>"
    Response.Write "<table style='BORDER-COLLAPSE: collapse' borderColor=#ffffff width=100% border='1' cellspacing='0' cellpadding='3'>"
    Response.Write " <tbody id='Tabs' style='display:'>" & vbCrLf
    sql = "select * from " & HouseTableName & " where HouseID=" & HouseID & ""
    Set rsHouseList = Server.CreateObject("ADODB.Recordset")
    rsHouseList.Open sql, Conn, 1, 1
    If rsHouseList.BOF And rsHouseList.EOF Then
        FoundErr = True
        ErrMsg = ErrMsg & "<br><li>找不到房产信息</li>"
        Set rsHouseList = Nothing
        Exit Sub
    Else
        Response.Write "<tr class='tdbg'><td width=120 align=right><strong>房产来源：</strong></td><td colspan=2>"
        Response.Write "<select name='HouseSource' onChange='change_it()'>"
        Response.Write "<option value='个人'"
        If rsHouseList("HouseSource") = "个人" Then Response.Write " Selected"
        Response.Write ">个人</option>"
        Response.Write "<option value='中介'"
        If rsHouseList("HouseSource") = "中介" Then Response.Write " Selected"
        Response.Write ">中介</option>"
        Response.Write "</select><font color='#FF0000'>*</font></td></tr>"
        If ClassID = 5 Then
            Response.Write "<tr class='tdbg'>"
            Response.Write "<td width='120' align='right'><strong>合租类别：</strong></td>"
            Response.Write "<td colspan='2'>"
            Response.Write "<select name='HeZhuType'>"
            Response.Write "<option value=''>请选择</option>"
            Response.Write "<option value='有房招租'"
            If rsHouseList("HeZhuType") = "有房招租" Then Response.Write " selected"
            Response.Write ">有房招租</option>"
            Response.Write "<option value='无房求租'"
            If rsHouseList("HeZhuType") = "无房求租" Then Response.Write " selected"
            Response.Write ">无房求租</option>"
            Response.Write "</select>合租<font color='#FF0000'>*</font>"
            Response.Write "</td>"
            Response.Write "</tr>"
        End If
        Response.Write "<tr class='tdbg'>"
        Response.Write "<td width='120' align='right'><strong>设为推荐：</strong></td>"
        Response.Write "<td colspan='2'>"
        Response.Write "<input type='checkbox' name='isElite' id='isElite' value='yes'"
        If rsHouseList("Elite") = True Then Response.Write " Checked"
        If rsHouseList("Passed") = True And rsHouseList("Elite") = True And rsHouseList("CommendClassDays") <> 0 Then Response.Write " Disabled"
        Response.Write ">推荐&nbsp;&nbsp;&nbsp;&nbsp;"
        Response.Write "<input type='text' name='CommendClassDays' id='CommendClassDays' size='4' value=" & rsHouseList("CommendClassDays") & ""
        If rsHouseList("Elite") = True And rsHouseList("Passed") = True Then Response.Write " readonly"
        Response.Write ">天"
        Response.Write "&nbsp;&nbsp;&nbsp;&nbsp;（<font color=red>每推荐一天将扣除" & CommendClassPoint & "点，一旦设置，审核通过后将不能更改，请慎用</font>）</td></tr>"
        Response.Write "<tr class='tdbg'>"
        Response.Write "<td width='120' align='right'><strong>房产地址：</strong></td>"
        Response.Write "<td colspan='3'>区（市）:"
        Response.Write "<select name='HouseQuYu'>" & GetAreaList_Option1(rsHouseList("HouseQuYu")) & "</select>"
        Response.Write "<input name='HouseDiZhi' type='text' size='35' maxlength='35' value='" & rsHouseList("HouseDiZhi") & "'>"
        Response.Write "<font color='#FF0000'>*</font><font color='#C0C0C0'>此处填写路名地址和小区（或楼盘）名称</font></td>"
        Response.Write "</tr>"
        If ClassID = 1 Or ClassID = 2 Or ClassID = 5 Then
            Response.Write "<tr class='tdbg'>"
            Response.Write "<td width='120' align='right'>"
            Response.Write "<strong>详细门牌：</strong></td>"
            Response.Write "<td colspan='3'>"
            Response.Write "<input name='HouseXiangXiDiZhi' type='text' size='30' maxlength='100' value='" & rsHouseList("HouseXiangXiDiZhi") & "'>"
            Response.Write "</td>"
            Response.Write "</tr>"
        End If
        Select Case ClassID
        Case 1
            Call ExportHuXingStr_Modify("HouseHuXing")
            Response.Write "<td><strong>房产面积：</strong>&nbsp;<input name='HouseMianJi' type='text' size='10' maxlength='8' value='" & rsHouseList("HouseMianJi") & "'>"
            Response.Write "㎡ <font color='#FF0000'>*</font></td>"
            Response.Write "</tr>"
            Response.Write "<tr class='tdbg'>"
            Response.Write "<td width='120' align='right'>"
            Response.Write "<strong>产权性质：</strong></td>"
            Response.Write "<td >"
            Response.Write "<select name='HouseChanQuan'>"
            Response.Write "<option value=''></option>"
            Response.Write "<option value='已购商品房'"
            If rsHouseList("HouseChanQuan") = "已购商品房" Then Response.Write " selected"
            Response.Write ">已购商品房</option>"
            Response.Write "<option value='已购房改房'"
            If rsHouseList("HouseChanQuan") = "已购房改房" Then Response.Write " selected"
            Response.Write ">已购房改房</option>"
            Response.Write "<option value='已购准现房'"
            If rsHouseList("HouseChanQuan") = "已购准现房" Then Response.Write " selected"
            Response.Write ">已购准现房</option>"
            Response.Write "<option value='经济适用房'"
            If rsHouseList("HouseChanQuan") = "经济适用房" Then Response.Write " selected"
            Response.Write ">经济适用房</option>"
            Response.Write "<option value='集资合建房'"
            If rsHouseList("HouseChanQuan") = "集资合建房" Then Response.Write " selected"
            Response.Write ">集资合建房</option>"
            Response.Write "<option value='已购公房'"
            If rsHouseList("HouseChanQuan") = "已购公房" Then Response.Write " selected"
            Response.Write ">已购公房</option>"
            Response.Write "<option value='经济解困房'"
            If rsHouseList("HouseChanQuan") = "经济解困房" Then Response.Write " selected"
            Response.Write ">经济解困房</option>"
            Response.Write "<option value='私房'"
            If rsHouseList("HouseChanQuan") = "私房" Then Response.Write " selected"
            Response.Write ">私房</option>"
            Response.Write "<option value='司法抵债房'"
            If rsHouseList("HouseChanQuan") = "司法抵债房" Then Response.Write " selected"
            Response.Write ">司法抵债房</option>"
            Response.Write "<option value='集体土地房'"
            If rsHouseList("HouseChanQuan") = "集体土地房" Then Response.Write " selected"
            Response.Write ">集体土地房</option>"
            Response.Write "</select>"
            Response.Write "</td>"
            Response.Write "<td>"
            Response.Write "<strong>建成年份：</strong>"
            Response.Write "&nbsp;<select name='HouseJianCheng'>"
            Response.Write "<option value=''></option>"
            Response.Write "<option value='1988年以前'"
            If rsHouseList("HouseJianCheng") = "1988年以前" Then Response.Write "selected>1988年以前</option>"
            For i = 1988 To 2014
                Response.Write "<option value='" & i & "年' "
                If rsHouseList("HouseJianCheng") = "" & i & "年" Then Response.Write " selected"
                Response.Write ">" & i & "年</option>"
            Next
            Response.Write "</select>"
            Response.Write "</td>"
            Response.Write "</tr>"
            Call ExportHouseLouCengStr_Modify
            Call ExportHouseLeiXingStr_Modify
            Response.Write "<tr class='tdbg'>"
            Response.Write "<td width='120' align='right'><strong>采光朝向：</strong></td>"
            Response.Write "<td colspan='3'>客厅"
            Call ExportHouseChaoXiangStr_Modify("HouseChaoXiang1", "客厅")
            Response.Write "主卧"
            Call ExportHouseChaoXiangStr_Modify("HouseChaoXiang2", "主卧")
            Response.Write "次卧"
            Call ExportHouseChaoXiangStr_Modify("HouseChaoXiang3", "次卧")
            Response.Write "<input name='HouseChaoXiang4' type='checkbox' value='明卫'"
            If chk_midstr(rsHouseList("HouseChaoXiang"), "明卫") = True Then Response.Write "  checked"
            Response.Write "> 明卫，"
            Response.Write "<input name='HouseChaoXiang4' type='checkbox' value='暗卫'"
            If chk_midstr(rsHouseList("HouseChaoXiang"), "暗卫") = True Then Response.Write "  checked"
            Response.Write "> 暗卫，"
            Response.Write "<input name='HouseChaoXiang4' type='checkbox' value='明厨'"
            If chk_midstr(rsHouseList("HouseChaoXiang"), "明厨") = True Then Response.Write "  checked"
            Response.Write "> 明厨，"
            Response.Write "<input name='HouseChaoXiang4' type='checkbox' value='暗厨'"
            If chk_midstr(rsHouseList("HouseChaoXiang"), "暗厨") = True Then Response.Write "  checked"
            Response.Write "> 暗厨，"
            Response.Write "<input name='HouseChaoXiang4' type='checkbox' value='双明卫'"
            If chk_midstr(rsHouseList("HouseChaoXiang"), "双明卫") = True Then Response.Write "  checked"
            Response.Write "> 双明卫"
            Response.Write "</td>"
            Response.Write "</tr>"
            Call ExportHouseJiChuStr_Modify
            Call ExportHouseZhuangXiuStr_Modify("HouseZhuangXiu")
            Response.Write "<tr class='tdbg'>"
            Response.Write "<td width='120' align='right'><strong>水电管线：</strong></td>"
            Response.Write "<td colspan='3'>"
            Response.Write "<input name='HouseShuiDian' type='checkbox' value='电器线路已铺设'"
            If chk_midstr(rsHouseList("HouseShuiDian"), "电器线路已铺设") = True Then Response.Write " checked"
            Response.Write "> 电器线路已铺设"
            Response.Write "<input name='HouseShuiDian' type='checkbox' value='冷热水管已预埋'"
            If chk_midstr(rsHouseList("HouseShuiDian"), "冷热水管已预埋") = True Then Response.Write " checked"
            Response.Write "> 冷热水管已预埋，"
            Response.Write "</td>"
            Response.Write "</tr>"
            Call ExportHouseDianQiStr_Modify
            Call ExportHouseJiaJuStr_Modify
            Response.Write "<tr class='tdbg'>"
            Response.Write "<td width='120' align='right'><strong>附近公交：</strong></td>"
            Response.Write "<td colspan='3'>"
            Response.Write "<input type='text' name='HouseGongJiaoLu' maxlength='15' size='15' value='" & rsHouseList("HouseGongJiaoLu") & "'> 路"
            Response.Write "<input type='text' name='HouseGongJiaoZhan' maxlength='8' size='15' value='" & rsHouseList("HouseGongJiaoZhan") & "'> 站"
            Response.Write "</td>"
            Response.Write "</tr>"
            Call ExportHouseShiZhengStr_Modify
            Call ExportTimeLimitStr_Modify("JiaoFangStart")
            Response.Write "<tr class='tdbg'>"
            Response.Write "<td width='120' align='right'><strong>出售价格：</strong></td>"
            Response.Write "<td colspan='3'>&yen;"
            Response.Write ":<input type='text' name='TotalPrice' size='6'  maxlength='8'  value='" & rsHouseList("TotalPrice") & "'>"
            Response.Write "<select name='HousePriceType'>"
            Response.Write "<option value='元/㎡'"
            If rsHouseList("HousePriceType") = "元/㎡" Then Response.Write " selected"
            Response.Write ">元/㎡</option>"
            Response.Write "<option value='万元'"
            If rsHouseList("HousePriceType") = "万元" Then Response.Write " selected"
            Response.Write ">万元</option></select><font color='#FF0000'>*</font>"
            Response.Write "（其中家电装修折价<input type='text' name='OtherPrice' size='6'  maxlength='8'"
            If rsHouseList("OtherPrice") <> 0 Then Response.Write "  value=" & rsHouseList("OtherPrice")
            Response.Write ">万元），"
            Response.Write "交易税费<select name='ShuiFei'>"
            Response.Write "<option value=''> </option>"
            Response.Write "<option value='各自缴纳'"
            If rsHouseList("ShuiFei") = "各自缴纳" Then Response.Write " selected"
            Response.Write ">各自缴纳</option>"
            Response.Write "<option value='买方统缴'"
            If rsHouseList("ShuiFei") = "买方统缴" Then Response.Write " selected"
            Response.Write ">买方统缴</option>"
            Response.Write "<option value='双方协商'"
            If rsHouseList("ShuiFei") = "双方协商" Then Response.Write " selected"
            Response.Write ">双方协商</option>"
            Response.Write "</select>"
            Response.Write "</td>"
            Response.Write "</tr>"
            Response.Write "<tr class='tdbg'>"
            Response.Write "<td width='120' align='right'><strong>支付方式：</strong></td>"
            Response.Write "<td colspan='3'>"
            Response.Write "<select name='HouseZhiFu'>"
            Response.Write "<option value='分期'"
            If rsHouseList("HouseZhiFu") = "分期" Then Response.Write " selected"
            Response.Write ">分期</option>"
            Response.Write "<option value='银行按揭'"
            If rsHouseList("HouseZhiFu") = "银行按揭" Then Response.Write " selected"
            Response.Write ">银行按揭</option>"
            Response.Write "<option value='公积金贷款'"
            If rsHouseList("HouseZhiFu") = "公积金贷款" Then Response.Write " selected"
            Response.Write ">公积金贷款</option>"
            Response.Write "<option value='一次性'"
            If rsHouseList("HouseZhiFu") = "一次性" Then Response.Write " selected"
            Response.Write ">一次性</option>"
            Response.Write "</select>"
            Response.Write "</td>"
            Response.Write "</tr>"
        Case 2
            Call ExportHuXingStr_Modify("HouseHuXing")
            Response.Write "<td width='348'><strong>房产面积：</strong>"
            Response.Write "<input name='HouseMianJi' type='text' size='10' maxlength='8' value=" & rsHouseList("HouseMianJi")
            Response.Write ">"
            Response.Write "㎡ <font color='#FF0000'>*</font></td>"
            Response.Write "</tr>"
            Call ExportHouseLouCengStr_Modify
            Call ExportHouseLeiXingStr_Modify
            Call ExportHouseJiChuStr_Modify
            Call ExportHouseJiaJuStr_Modify
            Call ExportHouseZhuangXiuStr_Modify("HouseZhuangXiu")
            Response.Write "<tr class='tdbg'>"
            Response.Write "<td width='120' align='right'><strong>卫生设施：</strong></td>"
            Call ExportHouseWeiShengStr_Modify
            Response.Write "</tr>"
            Call ExportHouseDianQiStr_Modify
            Response.Write "<tr class='tdbg'>"
            Response.Write "<td width='120' align='right'><strong>信息设施：</strong></td>"
            Response.Write "<td colspan='2' width='644'>"
            Response.Write "<input name='HouseXinXi' type='checkbox' value='有线电视'"
            If chk_midstr(rsHouseList("HouseXinXi"), "有线电视") = True Then Response.Write " checked"
            Response.Write ">有线电视，"
            Response.Write "<input name='HouseXinXi' type='checkbox' value='LAN宽带'"
            If chk_midstr(rsHouseList("HouseXinXi"), "LAN宽带") = True Then Response.Write " checked"
            Response.Write ">LAN宽带，"
            Response.Write "<input name='HouseXinXi' type='checkbox' value='ADSL宽带'"
            If chk_midstr(rsHouseList("HouseXinXi"), "ADSL宽带") = True Then Response.Write " checked"
            Response.Write ">ADSL宽带，"
            Response.Write "<input name='HouseXinXi' type='checkbox' value='附近能使用小灵通'"
            If chk_midstr(rsHouseList("HouseXinXi"), "附近能使用小灵通") = True Then Response.Write " checked"
            Response.Write ">附近能使用小灵通"
            Response.Write "</td>"
            Response.Write "</tr>"
            Response.Write "<tr class='tdbg'>"
            Response.Write "<td width='120' align='right'><strong>附近公交：</strong></td>"
            Response.Write "<td colspan='2' width='644'>"
            Response.Write "<input type='text' name='HouseGongJiaoLu' maxlength='80' size='15' value=" & rsHouseList("HouseGongJiaoLu") & "> 路"
            Response.Write "<input type='text' name='HouseGongJiaoZhan' maxlength='40' size='15' value=" & rsHouseList("HouseGongJiaoZhan") & "> 站"
            Response.Write "</td>"
            Response.Write "</tr>"
            Call ExportHouseShiZhengStr_Modify
            Response.Write "<tr class='tdbg'>"
            Response.Write "<td width='120' align='right'><strong>租赁时间：</strong></td>"
            Response.Write "<td colspan='2' width='644'>"
            Call ExportTimeLimitStr_Modify("ZuLinStart")
            Response.Write "  至"
            Call ExportTimeLimitStr_Modify("ZuLinEnd")
            Response.Write "</td>"
            Response.Write "</tr>"
            Call ExportHouseZuJinStr_Modify
        Case 4
            Call ExportHuXingStr_Modify("HouseHuXing")
            Response.Write "<td width='348'><strong>欲租面积：</strong>"
            Response.Write "<input name='HouseMianJi1' type='text' size='10' maxlength='8' value=" & rsHouseList("HouseMianJi1") & ">-"
            Response.Write "<input name='HouseMianJi2' type='text' size='10' maxlength='8' value=" & rsHouseList("HouseMianJi2") & ">㎡ <font color='#FF0000'>*</font></td>"
            Response.Write "</tr>"
            Call ExportHouseZuJinStr_Modify
            Call ExportHouseLouCengStr_Modify
            Call ExportHouseLeiXingStr_Modify
            Call ExportHouseJiChuStr_Modify
            Call ExportHouseJiaJuStr_Modify
            Call ExportHouseZhuangXiuStr_Modify("HouseZhuangXiu")
            Response.Write "<tr class='tdbg'>"
            Response.Write "<td width='120' align='right'><strong>期望卫设：</strong></td>"
            Call ExportHouseWeiShengStr_Modify
            Response.Write "</tr>"
            Call ExportHouseDianQiStr_Modify
            Response.Write "<tr class='tdbg'>"
            Response.Write "<td width='120' align='right'><strong>期望管线：</strong></td>"
            Response.Write "<td colspan='2' width='644'>"
            Response.Write "<input name='HouseXinXi' type='checkbox' value='有线电视'"
            If chk_midstr(rsHouseList("HouseXinXi"), "有线电视") = True Then Response.Write " checked"
            Response.Write ">有线电视，"
            Response.Write "<input name='HouseXinXi' type='checkbox' value='LAN宽带'"
            If chk_midstr(rsHouseList("HouseXinXi"), "LAN宽带") = True Then Response.Write " checked"
            Response.Write ">LAN宽带，"
            Response.Write "<input name='HouseXinXi' type='checkbox' value='ADSL宽带'"
            If chk_midstr(rsHouseList("HouseXinXi"), "ADSL宽带") = True Then Response.Write " checked"
            Response.Write ">ADSL，"
            Response.Write "<input name='HouseXinXi' type='checkbox' value='能使用小灵通'"
            If chk_midstr(rsHouseList("HouseXinXi"), "能使用小灵通") = True Then Response.Write " checked"
            Response.Write ">能使用小灵通"
            Response.Write "</td>"
            Response.Write "</tr>"
            Call ExportHouseShiZhengStr_Modify
            Response.Write "<tr class='tdbg'>"
            Response.Write "<td width='120' align='right'><strong>租赁时间：</strong></td>"
            Response.Write "<td colspan='2' width='644'>"
            Call ExportTimeLimitStr_Modify("ZuLinStart")
            Response.Write "  至"
            Call ExportTimeLimitStr_Modify("ZuLinEnd")
            Response.Write "</td>"
            Response.Write "</tr>"
        Case 3
            Response.Write "<tr class='tdbg'>"
            Response.Write "<td width='120' align='right'>"
            Response.Write "<strong>建成年份：</strong></td>"
            Response.Write "<td width=300><select name='HouseJianCheng1'>"
            Response.Write "<option value=''></option>"
            Response.Write "<option value='1988年以前'"
            If rsHouseList("HouseJianCheng1") = "1988年以前" Then Response.Write " selected"
            Response.Write ">1988年以前</option>"
            For i = 1988 To 2014
                Response.Write "<option value='" & i & "年' "
                If rsHouseList("HouseJianCheng1") = "" & i & "年" Then Response.Write " selected"
                Response.Write ">" & i & "年</option>"
            Next
            Response.Write "</select>至"
            Response.Write "<select name='HouseJianCheng2'>"
            Response.Write "<option value=' '></option>"
            For i = 1988 To 2014
                Response.Write "<option value='" & i & "年' "
                If rsHouseList("HouseJianCheng2") = "" & i & "年" Then Response.Write " selected"
                Response.Write ">" & i & "年</option>"
            Next
            Response.Write "</select>年间的"
            Call ExportHouseLeiXingStr_Modify
            Response.Write "</td>"
            Response.Write "<td>"
            Response.Write "<strong>房屋性质:</strong><select name='HouseXingZhi'>"
            Response.Write "<option value=''> </option>"
            Response.Write "<option value='二手房'"
            If rsHouseList("HouseXingZhi") = "二手房" Then Response.Write " selected"
            Response.Write ">二手房</option>"
            Response.Write "<option value='期房'"
            If rsHouseList("HouseXingZhi") = "期房" Then Response.Write " selected"
            Response.Write ">期房</option>"
            Response.Write "<option value='新楼盘'"
            If rsHouseList("HouseXingZhi") = "新楼盘" Then Response.Write " selected"
            Response.Write ">新楼盘</option>"
            Response.Write "<option value='准现房'"
            If rsHouseList("HouseXingZhi") = "准现房" Then Response.Write " selected"
            Response.Write ">准现房</option>"
            Response.Write "</select>"
            Response.Write "</td>"
            Response.Write "</tr>"
            Call ExportHuXingStr_Modify("HouseHuXing")
            Response.Write "<td width='348'><strong>房产面积：</strong>"
            Response.Write "<input name='HouseMianJi1' type='text' size='10' maxlength='8' value=" & rsHouseList("HouseMianJi1") & ">-"
            Response.Write "<input name='HouseMianJi2' type='text' size='10' maxlength='8' value=" & rsHouseList("HouseMianJi2") & ">㎡ <font color='#FF0000'>*</font></td>"
            Response.Write "</tr>"
            Call ExportHouseLouCengStr_Modify
            Response.Write "</tr>"
            Response.Write "<tr class='tdbg'>"
            Response.Write "<td width='120' align='right'><strong>期望价格：</strong></td>"
            Response.Write "<td colspan='2'>"
            Response.Write "<input type='text' name='HousePrice1' size='10'  maxlength='8' value=" & rsHouseList("HousePrice1") & ">-"
            Response.Write "<input type='text' name='HousePrice2' size='10'  maxlength='8' value=" & rsHouseList("HousePrice2") & ">"
            Response.Write "<select name='HousePriceType'>"
            Response.Write "<option value='元/㎡'"
            If rsHouseList("HousePriceType") = "元/㎡" Then Response.Write " selected"
            Response.Write ">元/㎡</option>"
            Response.Write "<option value='万元'"
            If rsHouseList("HousePriceType") = "万元" Then Response.Write " selected"
            Response.Write ">万元</option>"
            Response.Write "</select>"
            Response.Write "<font color='#FF0000'>*</font>"
            Response.Write "  支付方式："
            Response.Write "<select name='HouseZhiFu'>"
            Response.Write "<option value='分期'"
            If rsHouseList("HouseZhiFu") = "分期" Then Response.Write " selected"
            Response.Write ">分期</option>"
            Response.Write "<option value='银行按揭'"
            If rsHouseList("HouseZhiFu") = "银行按揭" Then Response.Write " selected"
            Response.Write ">银行按揭</option>"
            Response.Write "<option value='公积金贷款'"
            If rsHouseList("HouseZhiFu") = "公积金贷款" Then Response.Write " selected"
            Response.Write ">公积金贷款</option>"
            Response.Write "<option value='一次性'"
            If rsHouseList("HouseZhiFu") = "一次性" Then Response.Write " selected"
            Response.Write ">一次性</option>"
            Response.Write "</select>"
            Response.Write "</td>"
            Response.Write "</tr>"
            Call ExportHouseJiChuStr_Modify
            Call ExportHouseZhuangXiuStr_Modify("HouseZhuangXiu")
            Call ExportHouseShiZhengStr_Modify
            Call ExportTimeLimitStr_Modify("JiaoFangStart")
        Case 5
            Call ExportHuXingStr_Modify("HouseHuXing")
            Response.Write "<td width='348'><strong>整体面积：</strong>"
            Response.Write "<input name='HouseMianJi' type='text' size='10' maxlength='8' value=" & rsHouseList("HouseMianJi")
            Response.Write ">"
            Response.Write "㎡ <font color='#FF0000'>*</font></td>"
            Response.Write "</tr>"
            Call ExportHuXingStr_Modify("HouseHuXing1")
            Response.Write "<td><strong>分租面积：</strong>"
            Response.Write "<input name='HouseMianJi1' type='text' size='10' maxlength='8' value=" & rsHouseList("HouseMianJi1") & ">"
            Response.Write "㎡ </td>"
            Response.Write "</tr>"
            Call ExportHuXingStr_Modify("HouseHuXing2")
            Response.Write "<td><strong>共用面积：</strong><input name='HouseMianJi2' type='text' size='10' maxlength='8' value=" & rsHouseList("HouseMianJi2")
            Response.Write ">㎡</td>"
            Response.Write "</tr>"
            Call ExportHouseLouCengStr_Modify
            Call ExportHouseLeiXingStr_Modify
            Response.Write "<tr class='tdbg'>"
            Response.Write "<td width='120' align='right'><strong>我的简介：</strong></td>"
            Call ExportShiYouStr_Modify("HouseJianJie")
            Response.Write "</tr>"
            Response.Write "<tr class='tdbg'>"
            Response.Write "<td width='120' align='right'><strong>要求室友：</strong></td>"
            Call ExportShiYouStr_Modify("HouseShiYou")
            Response.Write "</tr>"
            Call ExportHouseJiChuStr_Modify
            Call ExportHouseJiaJuStr_Modify
            Call ExportHouseZhuangXiuStr_Modify("HouseZhuangXiu")
            Response.Write "<tr class='tdbg'>"
            Response.Write "<td width='120' align='right'><strong>卫生设施：</strong></td>"
            Call ExportHouseWeiShengStr_Modify
            Response.Write "</tr>"
            Call ExportHouseDianQiStr_Modify
            Response.Write "<tr class='tdbg'>"
            Response.Write "<td width='120' align='right'><strong>信息设施：</strong></td>"
            Response.Write "<td colspan='2' width='644'>"
            Response.Write "<input name='HouseXinXi' type='checkbox' value='有线电视'"
            If chk_midstr(rsHouseList("HouseXinXi"), "有线电视") = True Then Response.Write " checked"
            Response.Write ">有线电视，"
            Response.Write "<input name='HouseXinXi' type='checkbox' value='LAN宽带'"
            If chk_midstr(rsHouseList("HouseXinXi"), "LAN宽带") = True Then Response.Write " checked"
            Response.Write ">LAN宽带，"
            Response.Write "<input name='HouseXinXi' type='checkbox' value='ADSL宽带'"
            If chk_midstr(rsHouseList("HouseXinXi"), "ADSL宽带") = True Then Response.Write " checked"
            Response.Write ">ADSL宽带，"
            Response.Write "<input name='HouseXinXi' type='checkbox' value='附近能使用小灵通'"
            If chk_midstr(rsHouseList("HouseXinXi"), "附近能使用小灵通") = True Then Response.Write " checked"
            Response.Write ">附近能使用小灵通"
            Response.Write "</td>"
            Response.Write "</tr>"
            Response.Write "<tr class='tdbg'>"
            Response.Write "<td width='120' align='right'><strong>附近公交：</strong></td>"
            Response.Write "<td colspan='2' width='644'>"
            Response.Write "<input type='text' name='HouseGongJiaoLu' maxlength='80' size='15' value=" & rsHouseList("HouseGongJiaoLu") & "> 路"
            Response.Write "<input type='text' name='HouseGongJiaoZhan' maxlength='40' size='15' value=" & rsHouseList("HouseGongJiaoZhan") & "> 站"
            Response.Write "</td>"
            Response.Write "</tr>"
            Call ExportHouseShiZhengStr_Modify
            Response.Write "<tr class='tdbg'>"
            Response.Write "<td width='120' align='right'><strong>租赁时间：</strong></td>"
            Response.Write "<td colspan='2' width='644'>"
            Call ExportTimeLimitStr_Modify("ZuLinStart")
            Response.Write "  至"
            Call ExportTimeLimitStr_Modify("ZuLinEnd")
            Response.Write "</td>"
            Response.Write "</tr>"
            Call ExportHouseZuJinStr_Modify
        End Select
    End If
    Response.Write "<tr class='tdbg'>"
    Response.Write "<td width='120' align='right'><strong>关 键 字：</strong></td>"
    Response.Write "<td > "
    Response.Write "<input name='Keyword' type='text' size='30' maxlength='100' value=" & Mid(rsHouseList("Keyword"), 2, Len(rsHouseList("Keyword")) - 2) & " title='用来查找相关房产，可输入多个关键字，中间用“|”隔开。不能出现'*?,.()等字符。'>"
    Response.Write "<font color='#FF0000'>*</font>"
    Response.Write "</td>"
    Response.Write "<td width='348'><strong>本信息有效期：</strong> "
    Response.Write "<select name='YouXiaoQi'>"
    Response.Write "<option value='一周'"
    If rsHouseList("YouXiaoQi") = "一周" Then Response.Write " selected"
    Response.Write ">一周</option>"
    Response.Write "<option value='半个月'"
    If rsHouseList("YouXiaoQi") = "半个月" Then Response.Write " selected"
    Response.Write ">半个月</option>"
    Response.Write "<option value='一个月'"
    If rsHouseList("YouXiaoQi") = "一个月" Then Response.Write " selected"
    Response.Write ">一个月</option>"
    Response.Write "<option value='两个月'"
    If rsHouseList("YouXiaoQi") = "两个月" Then Response.Write " selected"
    Response.Write ">两个月</option>"
    Response.Write "<option value='半年'"
    If rsHouseList("YouXiaoQi") = "半年" Then Response.Write " selected"
    Response.Write ">半年</option>"
    Response.Write "<option value='一年'"
    If rsHouseList("YouXiaoQi") = "一年" Then Response.Write " selected"
    Response.Write ">一年</option>"
    Response.Write "</select>"
    Response.Write "</td>"
    Response.Write "</tr>"
    Response.Write "</tbody>"

    Response.Write "        <tbody id='Tabs' style='display:none'>" & vbCrLf
    Response.Write "<tr class='tdbg'> "
    Response.Write "<td width='120' align='right'><strong>联系电话：</strong></td>"
    Response.Write "<td> "
    Response.Write "<input name='ContactPhone' type='text' size='30' maxlength='50' value=" & rsHouseList("ContactPhone") & ">"
    Response.Write "<font color='#FF0000'>*</font>"
    Response.Write "</td>"
    Response.Write "<td width='348'><strong>联系人：</strong>"
    Response.Write "<input name='ContactName' type='text' size='20' maxlength='20' value=" & rsHouseList("ContactName") & ">"
    Response.Write "<font color='#FF0000'>*</font>"
    Response.Write "</td>"
    Response.Write "</tr>"
    Response.Write "<tr class='tdbg'>"
    Response.Write "<td width='120' align='right'><strong>电子邮件：</strong></td>"
    Response.Write "<td > "
    Response.Write "<input name='ContactEmail' type='text' size='30' maxlength='100' value=" & rsHouseList("ContactEmail") & ">"
    Response.Write "</td>"
    Response.Write "<td width='348'><strong>OICQ号：</strong> "
    Response.Write "<input name='ContactQQ' type='text' size='20' maxlength='20' value=" & rsHouseList("ContactQQ") & ">"
    Response.Write "</td>"
    Response.Write "</tr>"
    Response.Write "</tbody>"
    Response.Write "        <tbody id='Tabs' style='display:none'>" & vbCrLf
    Response.Write "<tr class='tdbg'>"
    Response.Write "<td width='120' align='right'><strong>其它说明：</strong></td>"
    Response.Write "            <td colspan='2' ><textarea name='HouseQiTa' cols='80' rows='10' id='HouseQiTa' style='display:none'>" & Server.HTMLEncode(rsHouseList("HouseQiTa")) & "</textarea>"
    Response.Write "                <iframe ID='editor' src='../editor.asp?ChannelID=" & ChannelID & "&ShowType=5&tContentid=HouseQiTa' frameborder='1' scrolling='no' width='520' height='260' ></iframe>"
    Response.Write "            </td>"
    Response.Write "</tr>"
    Response.Write "</table>"
    Response.Write "</td>"
    Response.Write "</tr>"
    Response.Write "</table>"
    Response.Write "<div align='center'>"
    Response.Write "<p> "
    Response.Write " <input name='Action' type='hidden' id='Action' value='SaveModify'>"
    Response.Write " <input name='Add' type='submit'  id='Add' value=' 修 改 ' style='cursor:hand;'>"
    Response.Write " &nbsp; "
    Response.Write " <input name='Cancel' type='button' id='Cancel' value=' 取 消 ' onClick=""window.location.href='User_House.asp?ChannelID=" & ChannelID & "&ClassID=" & ClassID & "&Action=Manage';"" style='cursor:hand;'>"
    Response.Write "</p>"
    Response.Write "</div>"
    Response.Write "</form>"
    rsHouseList.Close
    Set rsHouseList = Nothing
        
End Sub

Sub SaveAddChuShou()
    Dim rs, sql
    Dim HouseType, HouseQuyu, HouseDiZhi, HouseXiangXiDiZhi, HouseHuXing, HouseMianJi, HouseChanQuan, HouseJianCheng, HouseLouCeng, HouseChaoXiang, HouseLeiXing, HouseJiChu, HouseZhuangXiu, HouseShuiDian, HouseDianQi, HouseJiaJu, HouseXinXi, HouseGongJiaoLu, HouseGongJiaoZhan, HouseShiZheng, JiaoFangStartDate, TotalPrice, OtherPrice, ShuiFei, ContactName, ContactPhone, ContactEmail, ContactQQ, Keyword, YouXiaoQi, HouseQiTa, HouseSource, HousePriceType, HouseZhiFu, CommendClassDays, IsElite

    Dim Editor, UpdateTime, ViewAll, OnTop, Hot, Elite, Hits, Passed
    FoundErr = False
    CommendClassDays = PE_HTMLEncode(PE_CLng(Request.Form("CommendClassDays")))
    IsElite = PE_HTMLEncode(Request.Form("isElite"))
    If CheckUserPoint(IsElite, CommendClassDays) = False Then
        Exit Sub
    End If
    HouseSource = PE_HTMLEncode(Trim(Request.Form("HouseSource")))
    HouseType = PE_HTMLEncode(Trim(Request.Form("HouseType")))
    HouseQuyu = PE_HTMLEncode(Trim(Request.Form("HouseQuyu")))
    HouseDiZhi = PE_HTMLEncode(Trim(Request.Form("HouseDiZhi")))
    HousePriceType = PE_HTMLEncode(Trim(Request.Form("HousePriceType")))
    HouseZhiFu = PE_HTMLEncode(Trim(Request.Form("HouseZhiFu")))
    HouseXiangXiDiZhi = PE_HTMLEncode(Trim(Request.Form("HouseXiangXiDiZhi")))
    If PE_HTMLEncode(Trim(Request.Form("HouseHuXing1"))) <> "0" Then
        HouseHuXing = add_str(HouseHuXing, PE_HTMLEncode(Trim(Request.Form("HouseHuXing1"))) & "房")
    End If
    If PE_HTMLEncode(Trim(Request.Form("HouseHuXing2"))) <> "0" Then
        HouseHuXing = add_str(HouseHuXing, PE_HTMLEncode(Trim(Request.Form("HouseHuXing2"))) & "厅")
    End If
    If PE_HTMLEncode(Trim(Request.Form("HouseHuXing3"))) <> "0" Then
        HouseHuXing = add_str(HouseHuXing, PE_HTMLEncode(Trim(Request.Form("HouseHuXing3"))) & "卫")
    End If
    If PE_HTMLEncode(Trim(Request.Form("HouseHuXing4"))) <> "0" Then
        HouseHuXing = add_str(HouseHuXing, PE_HTMLEncode(Trim(Request.Form("HouseHuXing4"))) & "厨")
    End If
    If PE_HTMLEncode(Trim(Request.Form("HouseHuXing5"))) <> "0" Then
        HouseHuXing = add_str(HouseHuXing, PE_HTMLEncode(Trim(Request.Form("HouseHuXing5"))) & "阳台")
    End If
    If HouseHuXing = "" Then
        HouseHuXing = "未知"
    End If
    HouseMianJi = PE_CDbl(Trim(Request.Form("HouseMianJi")))
    HouseChanQuan = PE_HTMLEncode(Trim(Request.Form("HouseChanQuan")))
    HouseJianCheng = PE_HTMLEncode(Trim(Request.Form("HouseJianCheng")))
    If PE_HTMLEncode(Trim(Request.Form("HouseLouCeng1"))) <> "" Then
        HouseLouCeng = add_str(HouseLouCeng, PE_CLng(Request.Form("HouseLouCeng1")) & "楼/")
    End If
    If PE_HTMLEncode(Trim(Request.Form("HouseLouCeng2"))) <> "" Then
        HouseLouCeng = add_str(HouseLouCeng, "" & PE_CLng(Request.Form("HouseLouCeng2")) & "层")
    End If
    If PE_HTMLEncode(Trim(Request.Form("HouseLouCeng3"))) <> "" Then
        HouseLouCeng = add_str(HouseLouCeng, Replace(PE_HTMLEncode(Trim(Request.Form("HouseLouCeng3"))), " ", ""))
    End If
    If PE_HTMLEncode(Trim(Request.Form("HouseChaoXiang1"))) <> "" Then
        HouseChaoXiang = add_str(HouseChaoXiang, "客厅" & PE_HTMLEncode(Replace(Request.Form("HouseChaoXiang1"), ",", "，")))
    End If
    If PE_HTMLEncode(Trim(Request.Form("HouseChaoXiang2"))) <> "" Then
        HouseChaoXiang = add_str(HouseChaoXiang, "主卧" & PE_HTMLEncode(Replace(Request.Form("HouseChaoXiang2"), ",", "，")))
    End If
    If PE_HTMLEncode(Trim(Request.Form("HouseChaoXiang3"))) <> "" Then
        HouseChaoXiang = add_str(HouseChaoXiang, "次卧" & PE_HTMLEncode(Replace(Request.Form("HouseChaoXiang3"), ",", "，")))
    End If
    If PE_HTMLEncode(Trim(Request.Form("HouseChaoXiang4"))) <> "" Then
        HouseChaoXiang = add_str(HouseChaoXiang, PE_HTMLEncode(Replace(Trim(Request.Form("HouseChaoXiang4")), " ", "")))
    End If
    HouseLeiXing = PE_HTMLEncode(Trim(Request.Form("HouseLeiXing")))
    HouseJiChu = PE_HTMLEncode(Replace(Trim(Request.Form("HouseJiChu")), " ", ""))
    If PE_HTMLEncode(Trim(Request.Form("HouseZhuangXiu1"))) <> "" Then
        HouseZhuangXiu = add_str(HouseZhuangXiu, PE_HTMLEncode(Replace(Trim(Request.Form("HouseZhuangXiu1")), " ", "")))
    End If
    If PE_HTMLEncode(Trim(Request.Form("HouseZhuangXiu2"))) <> "" Then
        HouseZhuangXiu = add_str(HouseZhuangXiu, "已住" & PE_HTMLEncode(Request.Form("HouseZhuangXiu2")) & "年")
    End If
    HouseShuiDian = PE_HTMLEncode(Replace(Trim(Request.Form("HouseShuiDian")), " ", ""))
    If PE_HTMLEncode(Trim(Request.Form("HouseDianQi1"))) <> "0" Then
        HouseDianQi = add_str(HouseDianQi, "空调" & PE_HTMLEncode(Replace(Request.Form("HouseDianQi1"), ",", "，")) & "台")
    End If
    If PE_HTMLEncode(Trim(Request.Form("HouseDianQi2"))) <> "0" Then
        HouseDianQi = add_str(HouseDianQi, "电扇" & PE_HTMLEncode(Replace(Request.Form("HouseDianQi2"), ",", "，")) & "台")
    End If
    If PE_HTMLEncode(Trim(Request.Form("HouseDianQi3"))) <> "0" Then
        HouseDianQi = add_str(HouseDianQi, "电视机" & PE_HTMLEncode(Replace(Request.Form("HouseDianQi3"), ",", "，")) & "台")
    End If
    If PE_HTMLEncode(Trim(Request.Form("HouseDianQi4"))) <> "" Then
        HouseDianQi = add_str(HouseDianQi, PE_HTMLEncode(Replace(Trim(Request.Form("HouseDianQi4")), " ", "")))
    End If
    HouseJiaJu = PE_HTMLEncode(Replace(Trim(Request.Form("HouseJiaJu")), " ", ""))
    HouseGongJiaoLu = PE_HTMLEncode(Trim(Request.Form("HouseGongJiaoLu")))
    HouseGongJiaoZhan = PE_HTMLEncode(Trim(Request.Form("HouseGongJiaoZhan")))
    HouseShiZheng = PE_HTMLEncode(Replace(Trim(Request.Form("HouseShiZheng")), " ", ""))
    JiaoFangStartDate = PE_HTMLEncode(Trim(Request.Form("JiaoFangStartYear"))) & "-" & PE_HTMLEncode(Trim(Request.Form("JiaoFangStartMonth"))) & "-" & PE_HTMLEncode(Trim(Request.Form("JiaoFangStartDay")))
    TotalPrice = PE_CDbl(Trim(Request.Form("TotalPrice")))
    OtherPrice = PE_CDbl(Trim(Request.Form("OtherPrice")))
    ShuiFei = PE_HTMLEncode(Trim(Request.Form("ShuiFei")))
    ContactName = PE_HTMLEncode(Trim(Request.Form("ContactName")))
    ContactPhone = PE_HTMLEncode(Trim(Request.Form("ContactPhone")))
    ContactEmail = PE_HTMLEncode(Trim(Request.Form("ContactEmail")))
    ContactQQ = PE_HTMLEncode(Trim(Request.Form("ContactQQ")))
    Keyword = PE_HTMLEncode(Trim(Request.Form("Keyword")))
    YouXiaoQi = PE_HTMLEncode(Trim(Request.Form("YouXiaoQi")))
    HouseQiTa = FilterJS(ReplaceBadUrl(Trim(Request.Form("HouseQiTa"))))
    Editor = UserName
    UpdateTime = PE_HTMLEncode(Trim(Request.Form("UpdateTime")))
    ViewAll = PE_HTMLEncode(Trim(Request.Form("ViewAll")))
    OnTop = PE_HTMLEncode(Trim(Request.Form("OnTop")))
    Hot = PE_HTMLEncode(Trim(Request.Form("Hot")))
    Elite = PE_HTMLEncode(Trim(Request.Form("Elite")))
    Hits = PE_HTMLEncode(Trim(Request.Form("Hits")))
    Passed = PE_HTMLEncode(Trim(Request.Form("Passed")))

        If Not IsNumeric(HouseMianJi) Then
            FoundErr = True
            ErrMsg = ErrMsg & "<br><li>房产面积必须使用数字</li>"
        End If
        If JiaoFangStartDate = "" Or Not IsDate(JiaoFangStartDate) Then
            FoundErr = True
            ErrMsg = ErrMsg & "<br><li>交房日期不能为空，且必须为有效日期格式</li>"
        Else
            JiaoFangStartDate = CDate(JiaoFangStartDate)
        End If
        If TotalPrice = "" Then
            FoundErr = True
            ErrMsg = ErrMsg & "<br><li>房产总价不能为空</li>"
        End If
        If Not IsNumeric(TotalPrice) Then
            FoundErr = True
            ErrMsg = ErrMsg & "<br><li>房产总价必须使用数字</li>"
        End If
        If OtherPrice <> "" Then
            If Not IsNumeric(OtherPrice) Then
                FoundErr = True
                ErrMsg = ErrMsg & "<br><li>家具家电价格必须使用数字，您可以选择不输入。</li>"
            End If
        End If
        If ContactName = "" Then
            FoundErr = True
            ErrMsg = ErrMsg & "<br><li>联系人姓名不能为空</li>"
        End If
        If ContactPhone = "" Then
            FoundErr = True
            ErrMsg = ErrMsg & "<br><li>联系人电话不能为空</li>"
        End If
        If ContactEmail <> "" Then
            If IsValidEmail(ContactEmail) = False Then
                FoundErr = True
                ErrMsg = ErrMsg & "<br><li>您的Email有错误，您可以选择不输入。</li>"
            End If
        End If
        If ContactQQ <> "" Then
            If Not IsNumeric(ContactQQ) Or Len(CStr(ContactQQ)) > 10 Then
                FoundErr = True
                ErrMsg = ErrMsg & "<br><li>QQ号码只能是4-10位数字，您可以选择不输入。</li>"
            End If
        End If
        If Keyword = "" Then
            FoundErr = True
            ErrMsg = ErrMsg & "<br><li>请输入房产关键字</li>"
        End If
        If FoundErr = True Then
            Exit Sub
        End If

        If OtherPrice = "" Then OtherPrice = 0

        Keyword = "|" & ReplaceBadChar(Keyword) & "|"
        If UpdateTime <> "" And IsDate(UpdateTime) = True Then
            UpdateTime = CDate(UpdateTime)
        Else
            UpdateTime = Now()
        End If
        If Hits <> "" Then
            Hits = CLng(Hits)
        Else
            Hits = 0
        End If
        
        Set rs = Server.CreateObject("adodb.recordset")
        If Action = "SaveAdd" Then
            Dim mrs
            If Session("HouseQuyu") = HouseQuyu And Session("HouseDiZhi") = HouseDiZhi And Session("HouseXiangXiDiZhi") = HouseXiangXiDiZhi And DateDiff("S", Session("AddTime"), Now()) < 100 Then
                FoundErr = True
                ErrMsg = ErrMsg & "<br><li>请不要在提示""保存成功""的页面刷新！</li>"
                Exit Sub
            End If
            Session("HouseQuyu") = HouseQuyu
            Session("HouseDiZhi") = HouseDiZhi
            Session("HouseXiangXiDiZhi") = HouseXiangXiDiZhi
            Session("AddTime") = Now()
            Set mrs = Conn.Execute("select max(HouseID) from PE_HouseCS")
            If IsNull(mrs(0)) Then
                HouseID = 1
            Else
                HouseID = mrs(0) + 1
            End If
            Set mrs = Nothing

            sql = "select top 1 * from PE_HouseCS"
            rs.Open sql, Conn, 1, 3
            rs.AddNew
            rs("HouseID") = HouseID
            rs("UpdateTime") = Now()
            rs("ViewAll") = PE_True
            rs("OnTop") = PE_False
            rs("Hot") = PE_False
            If CheckLevel = 0 Then
                rs("Passed") = PE_True
            Else
                rs("Passed") = PE_False
            End If
        ElseIf Action = "SaveModify" Then
            If HouseID = 0 Then
                FoundErr = True
                ErrMsg = ErrMsg & "<br><li>不能确定HouseID的值</li>"
            Else
                sql = "select * from PE_HouseCS where HouseId=" & HouseID
                rs.Open sql, Conn, 1, 3
                If rs.BOF And rs.EOF Then
                    FoundErr = True
                    ErrMsg = ErrMsg & "<br><li>找不到此房产，可能已经被其他人删除。</li>"
                End If
            End If
        Else
            FoundErr = True
            ErrMsg = "<br><li>参数错误!</li>"
        End If
        If FoundErr = True Then
            Exit Sub
        End If

    rs("HouseSource") = HouseSource
    rs("HouseQuyu") = HouseQuyu
    rs("HouseDiZhi") = HouseDiZhi
    rs("HouseXiangXiDiZhi") = HouseXiangXiDiZhi
    rs("HouseHuXing") = HouseHuXing
    rs("HouseMianJi") = HouseMianJi
    rs("HouseChanQuan") = HouseChanQuan
    rs("HouseJianCheng") = HouseJianCheng
    rs("HouseLouCeng") = HouseLouCeng
    rs("HouseChaoXiang") = HouseChaoXiang
    rs("HouseLeiXing") = HouseLeiXing
    rs("HouseJiChu") = HouseJiChu
    rs("HouseZhuangXiu") = HouseZhuangXiu
    rs("HouseShuiDian") = HouseShuiDian
    rs("HouseDianQi") = HouseDianQi
    rs("HouseJiaJu") = HouseJiaJu
    rs("HouseGongJiaoLu") = HouseGongJiaoLu
    rs("HouseGongJiaoZhan") = HouseGongJiaoZhan
    rs("HouseShiZheng") = HouseShiZheng
    rs("JiaoFangStartDate") = JiaoFangStartDate
    rs("TotalPrice") = TotalPrice
    rs("OtherPrice") = OtherPrice
    rs("ShuiFei") = ShuiFei
    rs("HouseZhiFu") = HouseZhiFu
    rs("HousePriceType") = HousePriceType
    rs("ContactName") = ContactName
    rs("ContactPhone") = ContactPhone
    rs("ContactEmail") = ContactEmail
    rs("ContactQQ") = ContactQQ
    rs("Keyword") = Keyword
    rs("YouXiaoQi") = YouXiaoQi
    rs("HouseQiTa") = HouseQiTa

    rs("Hits") = Hits
    rs("UpdateTime") = UpdateTime
    rs("CommendClassdays") = CommendClassDays
    If IsElite = "yes" Then
        rs("Elite") = PE_True
    End If

    rs("Editor") = Editor
    rs.Update
    HouseID = rs("HouseID")
    Passed = rs("Passed")
    If Action = "SaveAdd" And CheckLevel = 0 Then
        Conn.Execute ("update PE_Channel set ItemChecked=ItemChecked+1 where ChannelID=" & ChannelID & "")
    End If
    If Action = "SaveAdd" Then
        Conn.Execute ("update PE_Channel set ItemCount=ItemCount+1 where ChannelID=" & ChannelID & "")
        Conn.Execute ("Update PE_HouseConfig set ItemCount=ItemCount+1 where ClassID=" & ClassID & "")
    End If
    If Passed = True And IsDeduction = True Then
        Call DeductPoint(IsElite, HouseDiZhi)
    End If
    Call SaveSuccess(HouseHuXing, HouseDiZhi, HouseXiangXiDiZhi, HouseLeiXing, ContactName, Keyword, Passed, HouseID, "ChuShou")
    rs.Close
    Set rs = Nothing
    Call ClearSiteCache(0)
End Sub

Sub SaveAddChuZhu()
    Dim rs, sql
    Dim HouseType, HouseQuyu, HouseDiZhi, HouseXiangXiDiZhi, HouseHuXing, HouseMianJi, HouseLouCeng, HouseLeiXing, HouseJiChu, HouseZhuangXiu, HouseWeiSheng, HouseDianQi, HouseJiaJu, HouseXinXi, HouseGongJiaoLu, HouseGongJiaoZhan, HouseShiZheng, ZuLinStartDate, ZuLinEndDate, HouseZuJin, HouseZuJinType, HouseZhiFu, ContactName, ContactPhone, ContactEmail, ContactQQ, Keyword, YouXiaoQi, HouseQiTa, HouseSource

    Dim Editor, UpdateTime, ViewAll, OnTop, Hot, Elite, Hits, Passed, IsElite, CommendClassDays

    FoundErr = False
    CommendClassDays = PE_HTMLEncode(PE_CLng(Request.Form("CommendClassDays")))
    IsElite = PE_HTMLEncode(Request.Form("isElite"))
    If CheckUserPoint(IsElite, CommendClassDays) = False Then
        Exit Sub
    End If

    HouseSource = PE_HTMLEncode(Trim(Request("HouseSource")))
    HouseType = PE_HTMLEncode(Trim(Request.Form("HouseType")))
    HouseQuyu = PE_HTMLEncode(Trim(Request.Form("HouseQuyu")))
    HouseDiZhi = PE_HTMLEncode(Trim(Request.Form("HouseDiZhi")))
    HouseXiangXiDiZhi = PE_HTMLEncode(Trim(Request.Form("HouseXiangXiDiZhi")))
    If PE_HTMLEncode(Trim(Request.Form("HouseHuXing1"))) <> "0" Then
        HouseHuXing = add_str(HouseHuXing, PE_HTMLEncode(Trim(Request.Form("HouseHuXing1"))) & "房")
    End If
    If PE_HTMLEncode(Trim(Request.Form("HouseHuXing2"))) <> "0" Then
        HouseHuXing = add_str(HouseHuXing, PE_HTMLEncode(Trim(Request.Form("HouseHuXing2"))) & "厅")
    End If
    If PE_HTMLEncode(Trim(Request.Form("HouseHuXing3"))) <> "0" Then
        HouseHuXing = add_str(HouseHuXing, PE_HTMLEncode(Trim(Request.Form("HouseHuXing3"))) & "卫")
    End If
    If PE_HTMLEncode(Trim(Request.Form("HouseHuXing4"))) <> "0" Then
        HouseHuXing = add_str(HouseHuXing, PE_HTMLEncode(Trim(Request.Form("HouseHuXing4"))) & "厨")
    End If
    If PE_HTMLEncode(Trim(Request.Form("HouseHuXing5"))) <> "0" Then
        HouseHuXing = add_str(HouseHuXing, PE_HTMLEncode(Trim(Request.Form("HouseHuXing5"))) & "阳台")
    End If
    If HouseHuXing = "" Then
        HouseHuXing = "未知"
    End If
    HouseMianJi = PE_CDbl(Trim(Request.Form("HouseMianJi")))
    If PE_HTMLEncode(Trim(Request.Form("HouseLouCeng1"))) <> "" Then
        HouseLouCeng = add_str(HouseLouCeng, PE_CLng(Request.Form("HouseLouCeng1")) & "楼/")
    End If
    If PE_HTMLEncode(Trim(Request.Form("HouseLouCeng2"))) <> "" Then
        HouseLouCeng = add_str(HouseLouCeng, "" & PE_CLng(Request.Form("HouseLouCeng2")) & "层")
    End If
    If PE_HTMLEncode(Trim(Request.Form("HouseLouCeng3"))) <> "" Then
        HouseLouCeng = add_str(HouseLouCeng, PE_HTMLEncode(Replace(Trim(Request.Form("HouseLouCeng3")), " ", "")))
    End If
    HouseLeiXing = PE_HTMLEncode(Trim(Request.Form("HouseLeiXing")))
    HouseJiChu = PE_HTMLEncode(Replace(Trim(Request.Form("HouseJiChu")), " ", ""))
    If PE_HTMLEncode(Trim(Request.Form("HouseJiaJu1"))) <> "0" Then
        HouseJiaJu = add_str(HouseJiaJu, "床" & PE_HTMLEncode(Replace(Request.Form("HouseJiaJu1"), ",", "，")) & "张")
    End If
    If PE_HTMLEncode(Trim(Request.Form("HouseJiaJu2"))) <> "0" Then
        HouseJiaJu = add_str(HouseJiaJu, "衣柜" & PE_HTMLEncode(Replace(Request.Form("HouseJiaJu2"), ",", "，")) & "个")
    End If
    If PE_HTMLEncode(Trim(Request.Form("HouseJiaJu3"))) <> "0" Then
        HouseJiaJu = add_str(HouseJiaJu, "写字台" & PE_HTMLEncode(Replace(Request.Form("HouseJiaJu3"), ",", "，")) & "张")
    End If
    If PE_HTMLEncode(Trim(Request.Form("HouseJiaJu4"))) <> "" Then
        HouseJiaJu = add_str(HouseJiaJu, PE_HTMLEncode(Replace(Trim(Request.Form("HouseJiaJu4")), " ", "")))
    End If
    If PE_HTMLEncode(Trim(Request.Form("HouseZhuangXiu1"))) <> "" Then
        HouseZhuangXiu = add_str(HouseZhuangXiu, "房间" & PE_HTMLEncode(Request.Form("HouseZhuangXiu1")) & "")
    End If
    If PE_HTMLEncode(Trim(Request.Form("HouseZhuangXiu2"))) <> "" Then
        HouseZhuangXiu = add_str(HouseZhuangXiu, "房间墙面" & PE_HTMLEncode(Request.Form("HouseZhuangXiu2")) & "")
    End If
    If PE_HTMLEncode(Trim(Request.Form("HouseZhuangXiu3"))) <> "" Then
        HouseZhuangXiu = add_str(HouseZhuangXiu, "客厅" & PE_HTMLEncode(Request.Form("HouseZhuangXiu3")) & "")
    End If
    If PE_HTMLEncode(Trim(Request.Form("HouseZhuangXiu4"))) <> "" Then
        HouseZhuangXiu = add_str(HouseZhuangXiu, "客厅墙面" & PE_HTMLEncode(Request.Form("HouseZhuangXiu4")) & "")
    End If
    If PE_HTMLEncode(Trim(Request.Form("HouseZhuangXiu5"))) <> "" Then
        HouseZhuangXiu = add_str(HouseZhuangXiu, "卫生间" & PE_HTMLEncode(Request.Form("HouseZhuangXiu5")) & "")
    End If
    If PE_HTMLEncode(Trim(Request.Form("HouseZhuangXiu6"))) <> "" Then
        HouseZhuangXiu = add_str(HouseZhuangXiu, PE_HTMLEncode(Replace(Trim(Request.Form("HouseZhuangXiu6")), " ", "")))
    End If
    HouseWeiSheng = PE_HTMLEncode(Replace(Trim(Request.Form("HouseWeiSheng")), " ", ""))
    If PE_HTMLEncode(Trim(Request.Form("HouseDianQi1"))) <> "0" Then
        HouseDianQi = add_str(HouseDianQi, "空调" & PE_HTMLEncode(Replace(Request.Form("HouseDianQi1"), ",", "，")) & "台")
    End If
    If PE_HTMLEncode(Trim(Request.Form("HouseDianQi2"))) <> "0" Then
        HouseDianQi = add_str(HouseDianQi, "电扇" & PE_HTMLEncode(Replace(Request.Form("HouseDianQi2"), ",", "，")) & "台")
    End If
    If PE_HTMLEncode(Trim(Request.Form("HouseDianQi3"))) <> "0" Then
        HouseDianQi = add_str(HouseDianQi, "电视机" & PE_HTMLEncode(Replace(Request.Form("HouseDianQi3"), ",", "，")) & "台")
    End If
    If PE_HTMLEncode(Trim(Request.Form("HouseDianQi4"))) <> "" Then
        HouseDianQi = add_str(HouseDianQi, PE_HTMLEncode(Replace(Trim(Request.Form("HouseDianQi4")), " ", "")))
    End If

    HouseXinXi = PE_HTMLEncode(Replace(Trim(Request.Form("HouseXinXi")), " ", ""))
    HouseGongJiaoLu = PE_HTMLEncode(Trim(Request.Form("HouseGongJiaoLu")))
    HouseGongJiaoZhan = PE_HTMLEncode(Trim(Request.Form("HouseGongJiaoZhan")))
    HouseShiZheng = PE_HTMLEncode(Replace(Trim(Request.Form("HouseShiZheng")), " ", ""))
    ZuLinStartDate = PE_HTMLEncode(Trim(Request.Form("ZuLinStartYear"))) & "-" & PE_HTMLEncode(Trim(Request.Form("ZuLinStartMonth"))) & "-" & PE_HTMLEncode(Trim(Request.Form("ZuLinStartDay")))
    ZuLinEndDate = PE_HTMLEncode(Trim(Request.Form("ZuLinEndYear"))) & "-" & PE_HTMLEncode(Trim(Request.Form("ZuLinEndMonth"))) & "-" & PE_HTMLEncode(Trim(Request.Form("ZuLinEndDay")))
    HouseZuJin = PE_CDbl(Trim(Request.Form("HouseZuJin")))
    HouseZuJinType = PE_HTMLEncode(Trim(Request.Form("HouseZuJinType")))
    HouseZhiFu = PE_HTMLEncode(Trim(Request.Form("HouseZhiFu")))
    ContactName = PE_HTMLEncode(Trim(Request.Form("ContactName")))
    ContactPhone = PE_HTMLEncode(Trim(Request.Form("ContactPhone")))
    ContactEmail = PE_HTMLEncode(Trim(Request.Form("ContactEmail")))
    ContactQQ = PE_HTMLEncode(Trim(Request.Form("ContactQQ")))
    Keyword = PE_HTMLEncode(Trim(Request.Form("Keyword")))
    YouXiaoQi = PE_HTMLEncode(Trim(Request.Form("YouXiaoQi")))
    HouseQiTa = FilterJS(ReplaceBadUrl(Trim(Request.Form("HouseQiTa"))))
    Editor = UserName
    UpdateTime = PE_HTMLEncode(Trim(Request.Form("UpdateTime")))
    ViewAll = PE_HTMLEncode(Trim(Request.Form("ViewAll")))
    OnTop = PE_HTMLEncode(Trim(Request.Form("OnTop")))
    Hot = PE_HTMLEncode(Trim(Request.Form("Hot")))
    Elite = PE_HTMLEncode(Trim(Request.Form("Elite")))
    Hits = PE_HTMLEncode(Trim(Request.Form("Hits")))
    Passed = PE_HTMLEncode(Trim(Request.Form("Passed")))

        If HouseDiZhi = "" Then
            FoundErr = True
            ErrMsg = ErrMsg & "<br><li>房屋地址不能为空</li>"
        End If
        If HouseMianJi = "" Then
            FoundErr = True
            ErrMsg = ErrMsg & "<br><li>房屋面积不能为空</li>"
        End If
        If Not IsNumeric(HouseMianJi) Then
            FoundErr = True
            ErrMsg = ErrMsg & "<br><li>房屋面积必须使用数字</li>"
        End If
        If ZuLinStartDate = "" Or Not IsDate(ZuLinStartDate) Then
            FoundErr = True
            ErrMsg = ErrMsg & "<br><li>租赁开始日期不能为空，且必须为有效日期格式</li>"
        Else
            ZuLinStartDate = CDate(ZuLinStartDate)
        End If
        If HouseZuJin = "" Then
            FoundErr = True
            ErrMsg = ErrMsg & "<br><li>房屋租金不能为空</li>"
        End If
        If Not IsNumeric(HouseZuJin) Then
            FoundErr = True
            ErrMsg = ErrMsg & "<br><li>房屋租金必须使用数字</li>"
        End If
        If ContactName = "" Then
            FoundErr = True
            ErrMsg = ErrMsg & "<br><li>联系人姓名不能为空</li>"
        End If
        If ContactPhone = "" Then
            FoundErr = True
            ErrMsg = ErrMsg & "<br><li>联系人电话不能为空</li>"
        End If
        If ContactEmail <> "" Then
            If IsValidEmail(ContactEmail) = False Then
                FoundErr = True
                ErrMsg = ErrMsg & "<br><li>您的Email有错误，您可以选择不输入。</li>"
            End If
        End If
        If ContactQQ <> "" Then
            If Not IsNumeric(ContactQQ) Or Len(CStr(ContactQQ)) > 10 Then
                FoundErr = True
                ErrMsg = ErrMsg & "<br><li>QQ号码只能是4-10位数字，您可以选择不输入。</li>"
            End If
        End If
        If Keyword = "" Then
            FoundErr = True
            ErrMsg = ErrMsg & "<br><li>请输入房产关键字</li>"
        End If
        If FoundErr = True Then
            Exit Sub
        End If

        Keyword = "|" & ReplaceBadChar(Keyword) & "|"
        If UpdateTime <> "" And IsDate(UpdateTime) = True Then
            UpdateTime = CDate(UpdateTime)
        Else
            UpdateTime = Now()
        End If
        If Hits <> "" Then
            Hits = CLng(Hits)
        Else
            Hits = 0
        End If
        Dim i
        Set rs = Server.CreateObject("adodb.recordset")
        If Action = "SaveAdd" Then
            Dim mrs
            If Session("HouseQuyu") = HouseQuyu And Session("HouseDiZhi") = HouseDiZhi And Session("HouseXiangXiDiZhi") = HouseXiangXiDiZhi And DateDiff("S", Session("AddTime"), Now()) < 100 Then
                FoundErr = True
                ErrMsg = ErrMsg & "<br><li>请不要在提示""保存成功""的页面刷新！</li>"
                Exit Sub
            End If
            Session("HouseQuyu") = HouseQuyu
            Session("HouseDiZhi") = HouseDiZhi
            Session("HouseXiangXiDiZhi") = HouseXiangXiDiZhi
            Session("AddTime") = Now()
            Set mrs = Conn.Execute("select max(HouseID) from PE_HouseCZ")
            If IsNull(mrs(0)) Then
                HouseID = 1
            Else
                HouseID = mrs(0) + 1
            End If
            Set mrs = Nothing

            sql = "select top 1 * from PE_HouseCZ"
            rs.Open sql, Conn, 1, 3
            rs.AddNew
            rs("HouseID") = HouseID
            rs("UpdateTime") = Now()
            rs("ViewAll") = PE_True
            rs("OnTop") = PE_False
            rs("Hot") = PE_False
            If CheckLevel = 0 Then
                rs("Passed") = PE_True
            Else
                rs("Passed") = PE_False
            End If
        ElseIf Action = "SaveModify" Then
            If HouseID = 0 Then
                FoundErr = True
                ErrMsg = ErrMsg & "<br><li>不能确定HouseID的值</li>"
            Else
                sql = "select * from PE_HouseCZ where HouseId=" & HouseID
                rs.Open sql, Conn, 1, 3
                If rs.BOF And rs.EOF Then
                    FoundErr = True
                    ErrMsg = ErrMsg & "<br><li>找不到此房产，可能已经被其他人删除。</li>"
                End If
            End If
        Else
            FoundErr = True
            ErrMsg = "<br><li>参数错误!</li>"
        End If
        If FoundErr = True Then
            Exit Sub
        End If

    rs("HouseSource") = HouseSource
    rs("HouseQuyu") = HouseQuyu
    rs("HouseDiZhi") = HouseDiZhi
    rs("HouseXiangXiDiZhi") = HouseXiangXiDiZhi
    rs("HouseHuXing") = HouseHuXing
    rs("HouseMianJi") = HouseMianJi
    rs("HouseLouCeng") = HouseLouCeng
    rs("HouseLeiXing") = HouseLeiXing
    rs("HouseJiChu") = HouseJiChu
    rs("HouseZhuangXiu") = HouseZhuangXiu
    rs("HouseWeiSheng") = HouseWeiSheng
    rs("HouseDianQi") = HouseDianQi
    rs("HouseJiaJu") = HouseJiaJu
    rs("HouseXinXi") = HouseXinXi
    rs("HouseGongJiaoLu") = HouseGongJiaoLu
    rs("HouseGongJiaoZhan") = HouseGongJiaoZhan
    rs("HouseShiZheng") = HouseShiZheng
    rs("ZuLinStartDate") = ZuLinStartDate
    rs("ZuLinEndDate") = ZuLinEndDate
    rs("HouseZuJin") = HouseZuJin
    rs("HouseZuJinType") = HouseZuJinType
    rs("HouseZhiFu") = HouseZhiFu
    rs("ContactName") = ContactName
    rs("ContactPhone") = ContactPhone
    rs("ContactEmail") = ContactEmail
    rs("ContactQQ") = ContactQQ
    rs("Keyword") = Keyword
    rs("YouXiaoQi") = YouXiaoQi
    rs("HouseQiTa") = HouseQiTa

    rs("Hits") = Hits
    rs("UpdateTime") = UpdateTime
    rs("CommendClassdays") = CommendClassDays
    If IsElite = "yes" Then
        rs("Elite") = PE_True
    End If

    rs("Editor") = Editor
    rs.Update
    HouseID = rs("HouseID")
    Passed = rs("Passed")
    If Action = "SaveAdd" And CheckLevel = 0 Then
        Conn.Execute ("update PE_Channel set ItemChecked=ItemChecked+1 where ChannelID=" & ChannelID & "")
    End If
    If Action = "SaveAdd" Then
        Conn.Execute ("update PE_Channel set ItemCount=ItemCount+1 where ChannelID=" & ChannelID & "")
        Conn.Execute ("Update PE_HouseConfig set ItemCount=ItemCount+1 where ClassID=" & ClassID & "")
    End If
    If Passed = True And IsDeduction = True Then
        Call DeductPoint(IsElite, HouseDiZhi)
    End If
    Call SaveSuccess(HouseHuXing, HouseDiZhi, HouseXiangXiDiZhi, HouseLeiXing, ContactName, Keyword, Passed, HouseID, "ChuZhu")

    rs.Close
    Set rs = Nothing
    Call ClearSiteCache(0)
End Sub

Sub SaveAddQiuGou()
    Dim rs, sql
    Dim HouseType, HouseQuyu, HouseDiZhi, HouseJianCheng1, HouseJianCheng2, HouseLeiXing, HouseXingZhi, HouseHuXing, HouseMianJi1, HouseMianJi2, HouseLouCeng, HouseChaoXiang, HousePriceType, HousePrice1, HousePrice2, HouseZhiFu, HouseJiChu, HouseZhuangXiu, HouseShiZheng, JiaoFangStartDate, JiaoFangEndDate, ContactName, ContactPhone, ContactEmail, ContactQQ, Keyword, YouXiaoQi, HouseQiTa, HouseXiangXiDiZhi, HouseSource

    Dim Editor, UpdateTime, ViewAll, OnTop, Hot, Elite, Hits, Passed, IsElite, CommendClassDays

    FoundErr = False
    CommendClassDays = PE_HTMLEncode(PE_CLng(Request.Form("CommendClassDays")))
    IsElite = PE_HTMLEncode(Request.Form("isElite"))
    If CheckUserPoint(IsElite, CommendClassDays) = False Then
        Exit Sub
    End If

    HouseSource = PE_HTMLEncode(Trim(Request.Form("HouseSource")))
    HouseType = PE_HTMLEncode(Trim(Request.Form("HouseType")))
    HouseQuyu = PE_HTMLEncode(Trim(Request.Form("HouseQuyu")))
    HouseDiZhi = PE_HTMLEncode(Trim(Request.Form("HouseDiZhi")))
    HouseJianCheng1 = PE_HTMLEncode(Trim(Request.Form("HouseJianCheng1")))
    HouseJianCheng2 = PE_HTMLEncode(Trim(Request.Form("HouseJianCheng2")))
    HouseLeiXing = PE_HTMLEncode(Trim(Request.Form("HouseLeiXing")))
    HouseXingZhi = PE_HTMLEncode(Trim(Request.Form("HouseXingZhi")))
    If PE_HTMLEncode(Trim(Request.Form("HouseHuXing1"))) <> "0" Then
        HouseHuXing = add_str(HouseHuXing, PE_HTMLEncode(Trim(Request.Form("HouseHuXing1"))) & "房")
    End If
    If PE_HTMLEncode(Trim(Request.Form("HouseHuXing2"))) <> "0" Then
        HouseHuXing = add_str(HouseHuXing, PE_HTMLEncode(Trim(Request.Form("HouseHuXing2"))) & "厅")
    End If
    If PE_HTMLEncode(Trim(Request.Form("HouseHuXing3"))) <> "0" Then
        HouseHuXing = add_str(HouseHuXing, PE_HTMLEncode(Trim(Request.Form("HouseHuXing3"))) & "卫")
    End If
    If PE_HTMLEncode(Trim(Request.Form("HouseHuXing4"))) <> "0" Then
        HouseHuXing = add_str(HouseHuXing, PE_HTMLEncode(Trim(Request.Form("HouseHuXing4"))) & "厨")
    End If
    If PE_HTMLEncode(Trim(Request.Form("HouseHuXing5"))) <> "0" Then
        HouseHuXing = add_str(HouseHuXing, PE_HTMLEncode(Trim(Request.Form("HouseHuXing5"))) & "阳台")
    End If
    If HouseHuXing = "" Then
        HouseHuXing = "未知"
    End If
    HouseMianJi1 = PE_CDbl(Trim(Request.Form("HouseMianJi1")))
    HouseMianJi2 = PE_CDbl(Trim(Request.Form("HouseMianJi2")))
    If PE_HTMLEncode(Trim(Request.Form("HouseLouCeng1"))) <> "" Then
        HouseLouCeng = add_str(HouseLouCeng, PE_CLng(Request.Form("HouseLouCeng1")) & "楼/")
    End If
    If PE_HTMLEncode(Trim(Request.Form("HouseLouCeng2"))) <> "" Then
        HouseLouCeng = add_str(HouseLouCeng, "" & PE_CLng(Request.Form("HouseLouCeng2")) & "层")
    End If
    If PE_HTMLEncode(Trim(Request.Form("HouseLouCeng3"))) <> "" Then
        HouseLouCeng = add_str(HouseLouCeng, PE_HTMLEncode(Replace(Trim(Request.Form("HouseLouCeng3")), " ", "")))
    End If
    HouseChaoXiang = PE_HTMLEncode(Trim(Request.Form("HouseChaoXiang")))
    HousePriceType = PE_HTMLEncode(Trim(Request.Form("HousePriceType")))
    HousePrice1 = PE_CDbl(Trim(Request.Form("HousePrice1")))
    HousePrice2 = PE_CDbl(Trim(Request.Form("HousePrice2")))
    HouseZhiFu = PE_HTMLEncode(Trim(Request.Form("HouseZhiFu")))
    HouseJiChu = PE_HTMLEncode(Replace(Trim(Request.Form("HouseJiChu")), " ", ""))
    HouseZhuangXiu = PE_HTMLEncode(Replace(Trim(Request.Form("HouseZhuangXiu1")), " ", ""))
    HouseShiZheng = PE_HTMLEncode(Replace(Trim(Request.Form("HouseShiZheng")), " ", ""))
    JiaoFangStartDate = PE_HTMLEncode(Trim(Request.Form("JiaoFangStartYear"))) & "-" & PE_HTMLEncode(Trim(Request.Form("JiaoFangStartMonth"))) & "-" & PE_HTMLEncode(Trim(Request.Form("JiaoFangStartDay")))
    ContactName = PE_HTMLEncode(Trim(Request.Form("ContactName")))
    ContactPhone = PE_HTMLEncode(Trim(Request.Form("ContactPhone")))
    ContactEmail = PE_HTMLEncode(Trim(Request.Form("ContactEmail")))
    ContactQQ = PE_HTMLEncode(Trim(Request.Form("ContactQQ")))
    Keyword = PE_HTMLEncode(Trim(Request.Form("Keyword")))
    YouXiaoQi = PE_HTMLEncode(Trim(Request.Form("YouXiaoQi")))
    HouseQiTa = FilterJS(ReplaceBadUrl(Trim(Request.Form("HouseQiTa"))))
    Editor = UserName
    UpdateTime = PE_HTMLEncode(Trim(Request.Form("UpdateTime")))
    ViewAll = PE_HTMLEncode(Trim(Request.Form("ViewAll")))
    OnTop = PE_HTMLEncode(Trim(Request.Form("OnTop")))
    Hot = PE_HTMLEncode(Trim(Request.Form("Hot")))
    Elite = PE_HTMLEncode(Trim(Request.Form("Elite")))
    Hits = PE_HTMLEncode(Trim(Request.Form("Hits")))
    Passed = PE_HTMLEncode(Trim(Request.Form("Passed")))

        If HouseDiZhi = "" Then
            FoundErr = True
            ErrMsg = ErrMsg & "<br><li>房产地址不能为空</li>"
        End If
        If HouseMianJi1 = "" Or HouseMianJi2 = "" Then
            FoundErr = True
            ErrMsg = ErrMsg & "<br><li>房产面积不能为空</li>"
        End If
        If Not IsNumeric(HouseMianJi1) Or Not IsNumeric(HouseMianJi2) Then
            FoundErr = True
            ErrMsg = ErrMsg & "<br><li>房产面积必须使用数字</li>"
        End If
        If HousePrice1 = "" Or HousePrice2 = "" Then
            FoundErr = True
            ErrMsg = ErrMsg & "<br><li>房产价格不能为空</li>"
        End If
        If Not IsNumeric(HousePrice1) Or Not IsNumeric(HousePrice2) Then
            FoundErr = True
            ErrMsg = ErrMsg & "<br><li>房产价格必须使用数字</li>"
        End If
        If JiaoFangStartDate = "" Or Not IsDate(JiaoFangStartDate) Then
            FoundErr = True
            ErrMsg = ErrMsg & "<br><li>交房日期不能为空，且必须为有效日期格式</li>"
        Else
            JiaoFangStartDate = CDate(JiaoFangStartDate)
        End If
        If ContactName = "" Then
            FoundErr = True
            ErrMsg = ErrMsg & "<br><li>联系人姓名不能为空</li>"
        End If
        If ContactPhone = "" Then
            FoundErr = True
            ErrMsg = ErrMsg & "<br><li>联系人电话不能为空</li>"
        End If
        If ContactEmail <> "" Then
            If IsValidEmail(ContactEmail) = False Then
                FoundErr = True
                ErrMsg = ErrMsg & "<br><li>您的Email有错误，您可以选择不输入。</li>"
            End If
        End If
        If ContactQQ <> "" Then
            If Not IsNumeric(ContactQQ) Or Len(CStr(ContactQQ)) > 10 Then
                FoundErr = True
                ErrMsg = ErrMsg & "<br><li>QQ号码只能是4-10位数字，您可以选择不输入。</li>"
            End If
        End If
        If Keyword = "" Then
            FoundErr = True
            ErrMsg = ErrMsg & "<br><li>请输入房产关键字</li>"
        End If
        If FoundErr = True Then
            Exit Sub
        End If

        Keyword = "|" & ReplaceBadChar(Keyword) & "|"
        If UpdateTime <> "" And IsDate(UpdateTime) = True Then
            UpdateTime = CDate(UpdateTime)
        Else
            UpdateTime = Now()
        End If
        If Hits <> "" Then
            Hits = CLng(Hits)
        Else
            Hits = 0
        End If

        Set rs = Server.CreateObject("adodb.recordset")
        If Action = "SaveAdd" Then
            Dim mrs
            If Session("HouseQuyu") = HouseQuyu And Session("HouseDiZhi") = HouseDiZhi And DateDiff("S", Session("AddTime"), Now()) < 100 Then
                FoundErr = True
                ErrMsg = ErrMsg & "<br><li>请不要在提示""保存成功""的页面刷新！</li>"
                Exit Sub
            End If
            Session("HouseQuyu") = HouseQuyu
            Session("HouseDiZhi") = HouseDiZhi
            Session("AddTime") = Now()
            Set mrs = Conn.Execute("select max(HouseID) from PE_HouseQG")
            If IsNull(mrs(0)) Then
                HouseID = 1
            Else
                HouseID = mrs(0) + 1
            End If
            Set mrs = Nothing

            sql = "select top 1 * from PE_HouseQG"
            rs.Open sql, Conn, 1, 3
            rs.AddNew
            rs("HouseID") = HouseID
            rs("UpdateTime") = Now()
            rs("ViewAll") = PE_True
            rs("OnTop") = PE_False
            rs("Hot") = PE_False
            If CheckLevel = 0 Then
                rs("Passed") = PE_True
            Else
                rs("Passed") = PE_False
            End If
        ElseIf Action = "SaveModify" Then
            If HouseID = 0 Then
                FoundErr = True
                ErrMsg = ErrMsg & "<br><li>不能确定HouseID的值</li>"
            Else
                sql = "select * from PE_HouseQG where HouseId=" & HouseID
                rs.Open sql, Conn, 1, 3
                If rs.BOF And rs.EOF Then
                    FoundErr = True
                    ErrMsg = ErrMsg & "<br><li>找不到此房产，可能已经被其他人删除。</li>"
                End If
            End If
        Else
            FoundErr = True
            ErrMsg = "<br><li>参数错误!</li>"
        End If
        If FoundErr = True Then
            Exit Sub
        End If

    rs("HouseSource") = HouseSource
    rs("HouseQuyu") = HouseQuyu
    rs("HouseDiZhi") = HouseDiZhi
    rs("HouseJianCheng1") = HouseJianCheng1
    rs("HouseJianCheng2") = HouseJianCheng2
    rs("HouseLeiXing") = HouseLeiXing
    rs("HouseXingZhi") = HouseXingZhi
    rs("HouseHuXing") = HouseHuXing
    rs("HouseMianJi1") = HouseMianJi1
    rs("HouseMianJi2") = HouseMianJi2
    rs("HouseLouCeng") = HouseLouCeng
    rs("HouseChaoXiang") = HouseChaoXiang
    rs("HousePriceType") = HousePriceType
    rs("HousePrice1") = HousePrice1
    rs("HousePrice2") = HousePrice2
    rs("HouseZhiFu") = HouseZhiFu
    rs("HouseJiChu") = HouseJiChu
    rs("HouseZhuangXiu") = HouseZhuangXiu
    rs("HouseShiZheng") = HouseShiZheng
    rs("JiaoFangStartDate") = JiaoFangStartDate
    rs("ContactName") = ContactName
    rs("ContactPhone") = ContactPhone
    rs("ContactEmail") = ContactEmail
    rs("ContactQQ") = ContactQQ
    rs("Keyword") = Keyword
    rs("YouXiaoQi") = YouXiaoQi
    rs("HouseQiTa") = HouseQiTa

    rs("Hits") = Hits
    rs("UpdateTime") = UpdateTime
    rs("CommendClassdays") = CommendClassDays
    If IsElite = "yes" Then
        rs("Elite") = PE_True
    End If

    rs("Editor") = Editor
    rs.Update
    HouseID = rs("HouseID")
    Passed = rs("Passed")

    If Action = "SaveAdd" And CheckLevel = 0 Then
        Conn.Execute ("update PE_Channel set ItemChecked=ItemChecked+1 where ChannelID=" & ChannelID & "")
    End If
    If Action = "SaveAdd" Then
        Conn.Execute ("update PE_Channel set ItemCount=ItemCount+1 where ChannelID=" & ChannelID & "")
        Conn.Execute ("Update PE_HouseConfig set ItemCount=ItemCount+1 where ClassID=" & ClassID & "")
    End If
    If Passed = True And IsDeduction = True Then
        Call DeductPoint(IsElite, HouseDiZhi)
    End If
    Call SaveSuccess(HouseHuXing, HouseDiZhi, HouseXiangXiDiZhi, HouseLeiXing, ContactName, Keyword, Passed, HouseID, "QiuGou")

    rs.Close
    Set rs = Nothing
    Call ClearSiteCache(0)
End Sub

Sub SaveAddQiuZhu()
    Dim rs, sql
    Dim HouseType, HouseQuyu, HouseDiZhi, HouseHuXing, HouseMianJi1, HouseMianJi2, HouseZuJin1, HouseZuJin2, HouseZuJinType, HouseZhiFu, HouseLouCeng, HouseLeiXing, HouseJiChu, HouseZhuangXiu, HouseWeiSheng, HouseDianQi, HouseJiaJu, HouseXinXi, HouseShiZheng, ZuLinStartDate, ZuLinEndDate, ContactName, ContactPhone, ContactEmail, ContactQQ, Keyword, YouXiaoQi, HouseQiTa, HouseXiangXiDiZhi, HouseSource, IsElite, CommendClassDays

    Dim Editor, UpdateTime, ViewAll, OnTop, Hot, Elite, Hits, Passed

    FoundErr = False
    CommendClassDays = PE_HTMLEncode(PE_CLng(Request.Form("CommendClassDays")))
    IsElite = PE_HTMLEncode(Request.Form("isElite"))
    If CheckUserPoint(IsElite, CommendClassDays) = False Then
        Exit Sub
    End If

    HouseSource = PE_HTMLEncode(Trim(Request.Form("HouseSource")))
    HouseType = PE_HTMLEncode(Trim(Request.Form("HouseType")))
    HouseQuyu = PE_HTMLEncode(Trim(Request.Form("HouseQuyu")))
    HouseDiZhi = PE_HTMLEncode(Trim(Request.Form("HouseDiZhi")))
    If PE_HTMLEncode(Trim(Request.Form("HouseHuXing1"))) <> "0" Then
        HouseHuXing = add_str(HouseHuXing, PE_HTMLEncode(Trim(Request.Form("HouseHuXing1"))) & "房")
    End If
    If PE_HTMLEncode(Trim(Request.Form("HouseHuXing2"))) <> "0" Then
        HouseHuXing = add_str(HouseHuXing, PE_HTMLEncode(Trim(Request.Form("HouseHuXing2"))) & "厅")
    End If
    If PE_HTMLEncode(Trim(Request.Form("HouseHuXing3"))) <> "0" Then
        HouseHuXing = add_str(HouseHuXing, PE_HTMLEncode(Trim(Request.Form("HouseHuXing3"))) & "卫")
    End If
    If PE_HTMLEncode(Trim(Request.Form("HouseHuXing4"))) <> "0" Then
        HouseHuXing = add_str(HouseHuXing, PE_HTMLEncode(Trim(Request.Form("HouseHuXing4"))) & "厨")
    End If
    If PE_HTMLEncode(Trim(Request.Form("HouseHuXing5"))) <> "0" Then
        HouseHuXing = add_str(HouseHuXing, PE_HTMLEncode(Trim(Request.Form("HouseHuXing5"))) & "阳台")
    End If
    If HouseHuXing = "" Then
        HouseHuXing = "未知"
    End If
    HouseMianJi1 = PE_CDbl(Trim(Request.Form("HouseMianJi1")))
    HouseMianJi2 = PE_CDbl(Trim(Request.Form("HouseMianJi2")))
    HouseZuJin1 = PE_CDbl(Trim(Request.Form("HouseZuJin1")))
    HouseZuJin2 = PE_CDbl(Trim(Request.Form("HouseZuJin2")))
    HouseZuJinType = PE_HTMLEncode(Trim(Request.Form("HouseZuJinType")))
    HouseZhiFu = PE_HTMLEncode(Trim(Request.Form("HouseZhiFu")))

    If PE_HTMLEncode(Trim(Request.Form("HouseLouCeng1"))) <> "" Then
        HouseLouCeng = add_str(HouseLouCeng, PE_CLng(Request.Form("HouseLouCeng1")) & "楼/")
    End If
    If PE_HTMLEncode(Trim(Request.Form("HouseLouCeng2"))) <> "" Then
        HouseLouCeng = add_str(HouseLouCeng, "" & PE_CLng(Request.Form("HouseLouCeng2")) & "层")
    End If
    If PE_HTMLEncode(Trim(Request.Form("HouseLouCeng3"))) <> "" Then
        HouseLouCeng = add_str(HouseLouCeng, PE_HTMLEncode(Replace(Trim(Request.Form("HouseLouCeng3")), " ", "")))
    End If
    HouseLeiXing = PE_HTMLEncode(Trim(Request.Form("HouseLeiXing")))
    HouseJiChu = PE_HTMLEncode(Replace(Trim(Request.Form("HouseJiChu")), " ", ""))
    If PE_HTMLEncode(Trim(Request.Form("HouseJiaJu1"))) <> "0" Then
        HouseJiaJu = add_str(HouseJiaJu, "床" & PE_HTMLEncode(Replace(Request.Form("HouseJiaJu1"), ",", "，")) & "张")
    End If
    If PE_HTMLEncode(Trim(Request.Form("HouseJiaJu2"))) <> "0" Then
        HouseJiaJu = add_str(HouseJiaJu, "衣柜" & PE_HTMLEncode(Replace(Request.Form("HouseJiaJu2"), ",", "，")) & "个")
    End If
    If PE_HTMLEncode(Trim(Request.Form("HouseJiaJu3"))) <> "0" Then
        HouseJiaJu = add_str(HouseJiaJu, "写字台" & PE_HTMLEncode(Replace(Request.Form("HouseJiaJu3"), ",", "，")) & "张")
    End If
    If PE_HTMLEncode(Trim(Request.Form("HouseJiaJu4"))) <> "" Then
        HouseJiaJu = add_str(HouseJiaJu, PE_HTMLEncode(Replace(Trim(Request.Form("HouseJiaJu4")), " ", "")))
    End If
    If PE_HTMLEncode(Trim(Request.Form("HouseZhuangXiu1"))) <> "" Then
        HouseZhuangXiu = add_str(HouseZhuangXiu, "客厅" & PE_HTMLEncode(Request.Form("HouseZhuangXiu1")) & "")
    End If
    If PE_HTMLEncode(Trim(Request.Form("HouseZhuangXiu2"))) <> "" Then
        HouseZhuangXiu = add_str(HouseZhuangXiu, "客厅墙面" & PE_HTMLEncode(Request.Form("HouseZhuangXiu2")) & "")
    End If
    If PE_HTMLEncode(Trim(Request.Form("HouseZhuangXiu3"))) <> "" Then
        HouseZhuangXiu = add_str(HouseZhuangXiu, "房间" & PE_HTMLEncode(Request.Form("HouseZhuangXiu3")) & "")
    End If
    If PE_HTMLEncode(Trim(Request.Form("HouseZhuangXiu4"))) <> "" Then
        HouseZhuangXiu = add_str(HouseZhuangXiu, "房间墙面" & PE_HTMLEncode(Request.Form("HouseZhuangXiu4")) & "")
    End If
    If PE_HTMLEncode(Trim(Request.Form("HouseZhuangXiu5"))) <> "" Then
        HouseZhuangXiu = add_str(HouseZhuangXiu, "卫生间" & PE_HTMLEncode(Request.Form("HouseZhuangXiu5")) & "")
    End If
    If PE_HTMLEncode(Trim(Request.Form("HouseZhuangXiu6"))) <> "" Then
        HouseZhuangXiu = add_str(HouseZhuangXiu, PE_HTMLEncode(Replace(Trim(Request.Form("HouseZhuangXiu6")), " ", "")))
    End If
    HouseWeiSheng = Replace(Trim(Request.Form("HouseWeiSheng")), " ", "")
    If PE_HTMLEncode(Trim(Request.Form("HouseDianQi1"))) <> "0" Then
        HouseDianQi = add_str(HouseDianQi, "空调" & PE_HTMLEncode(Replace(Request.Form("HouseDianQi1"), ",", "，")) & "台")
    End If
    If PE_HTMLEncode(Trim(Request.Form("HouseDianQi2"))) <> "0" Then
        HouseDianQi = add_str(HouseDianQi, "电扇" & PE_HTMLEncode(Replace(Request.Form("HouseDianQi2"), ",", "，")) & "台")
    End If
    If PE_HTMLEncode(Trim(Request.Form("HouseDianQi3"))) <> "0" Then
        HouseDianQi = add_str(HouseDianQi, "电视机" & PE_HTMLEncode(Replace(Request.Form("HouseDianQi3"), ",", "，")) & "台")
    End If
    If PE_HTMLEncode(Trim(Request.Form("HouseDianQi4"))) <> "" Then
        HouseDianQi = add_str(HouseDianQi, PE_HTMLEncode(Replace(Trim(Request.Form("HouseDianQi4")), " ", "")))
    End If

    HouseXinXi = PE_HTMLEncode(Replace(Trim(Request.Form("HouseXinXi")), " ", ""))
    If Trim(Request.Form("HouseShiZheng1")) <> "" Then
        HouseShiZheng = add_str(HouseShiZheng, "公交" & PE_HTMLEncode(Replace(Request.Form("HouseShiZheng1"), ",", "，")) & "路")
    End If
    If Trim(Request.Form("HouseShiZheng")) <> "" Then
        HouseShiZheng = add_str(HouseShiZheng, PE_HTMLEncode(Replace(Request.Form("HouseShiZheng"), " ", "")))
    End If
    ZuLinStartDate = PE_HTMLEncode(Trim(Request.Form("ZuLinStartYear"))) & "-" & PE_HTMLEncode(Trim(Request.Form("ZuLinStartMonth"))) & "-" & PE_HTMLEncode(Trim(Request.Form("ZuLinStartDay")))
    ZuLinEndDate = PE_HTMLEncode(Trim(Request.Form("ZuLinEndYear"))) & "-" & PE_HTMLEncode(Trim(Request.Form("ZuLinEndMonth"))) & "-" & PE_HTMLEncode(Trim(Request.Form("ZuLinEndDay")))
    ContactName = PE_HTMLEncode(Trim(Request.Form("ContactName")))
    ContactPhone = PE_HTMLEncode(Trim(Request.Form("ContactPhone")))
    ContactEmail = PE_HTMLEncode(Trim(Request.Form("ContactEmail")))
    ContactQQ = PE_HTMLEncode(Trim(Request.Form("ContactQQ")))
    Keyword = PE_HTMLEncode(Trim(Request.Form("Keyword")))
    YouXiaoQi = PE_HTMLEncode(Trim(Request.Form("YouXiaoQi")))
    HouseQiTa = FilterJS(ReplaceBadUrl(Trim(Request.Form("HouseQiTa"))))
    Editor = UserName
    UpdateTime = PE_HTMLEncode(Trim(Request.Form("UpdateTime")))
    ViewAll = PE_HTMLEncode(Trim(Request.Form("ViewAll")))
    OnTop = PE_HTMLEncode(Trim(Request.Form("OnTop")))
    Hot = PE_HTMLEncode(Trim(Request.Form("Hot")))
    Elite = PE_HTMLEncode(Trim(Request.Form("Elite")))
    Hits = PE_HTMLEncode(Trim(Request.Form("Hits")))
    Passed = PE_HTMLEncode(Trim(Request.Form("Passed")))

        If HouseDiZhi = "" Then
            FoundErr = True
            ErrMsg = ErrMsg & "<br><li>房产地址不能为空</li>"
        End If
        If HouseMianJi1 = "" Or HouseMianJi2 = "" Then
            FoundErr = True
            ErrMsg = ErrMsg & "<br><li>欲租面积不能为空</li>"
        End If
        If Not IsNumeric(HouseMianJi1) Or Not IsNumeric(HouseMianJi2) Then
            FoundErr = True
            ErrMsg = ErrMsg & "<br><li>欲租面积必须使用数字</li>"
        End If
        If HouseZuJin1 = "" Or HouseZuJin2 = "" Then
            FoundErr = True
            ErrMsg = ErrMsg & "<br><li>期望租金不能为空！</li>"
        End If
        If Not IsNumeric(HouseZuJin1) Or Not IsNumeric(HouseZuJin2) Then
            FoundErr = True
            ErrMsg = ErrMsg & "<br><li>期望租金必须使用数字</li>"
        End If
        If ZuLinStartDate = "" Or Not IsDate(ZuLinStartDate) Then
            FoundErr = True
            ErrMsg = ErrMsg & "<br><li>租赁开始日期不能为空，且必须为有效日期格式</li>"
        Else
            ZuLinStartDate = CDate(ZuLinStartDate)
        End If
        If ZuLinEndDate = "" Or Not IsDate(ZuLinEndDate) Then
            FoundErr = True
            ErrMsg = ErrMsg & "<br><li>租赁结束日期不能为空，且必须为有效日期格式</li>"
        Else
            ZuLinEndDate = CDate(ZuLinEndDate)
        End If
        If ContactName = "" Then
            FoundErr = True
            ErrMsg = ErrMsg & "<br><li>联系人姓名不能为空</li>"
        End If
        If ContactPhone = "" Then
            FoundErr = True
            ErrMsg = ErrMsg & "<br><li>联系人电话不能为空</li>"
        End If
        If ContactEmail <> "" Then
            If IsValidEmail(ContactEmail) = False Then
                FoundErr = True
                ErrMsg = ErrMsg & "<br><li>您的Email有错误，您可以选择不输入。</li>"
            End If
        End If
        If ContactQQ <> "" Then
            If Not IsNumeric(ContactQQ) Or Len(CStr(ContactQQ)) > 10 Then
                FoundErr = True
                ErrMsg = ErrMsg & "<br><li>QQ号码只能是4-10位数字，您可以选择不输入。</li>"
            End If
        End If
        If Keyword = "" Then
            FoundErr = True
            ErrMsg = ErrMsg & "<br><li>请输入房产关键字</li>"
        End If
        If FoundErr = True Then
            Exit Sub
        End If

        Keyword = "|" & ReplaceBadChar(Keyword) & "|"
        If UpdateTime <> "" And IsDate(UpdateTime) = True Then
            UpdateTime = CDate(UpdateTime)
        Else
            UpdateTime = Now()
        End If
        If Hits <> "" Then
            Hits = CLng(Hits)
        Else
            Hits = 0
        End If
        
        Set rs = Server.CreateObject("adodb.recordset")
        If Action = "SaveAdd" Then
            Dim mrs
            If Session("HouseQuyu") = HouseQuyu And Session("HouseDiZhi") = HouseDiZhi And Session("HouseXiangXiDiZhi") = HouseXiangXiDiZhi And DateDiff("S", Session("AddTime"), Now()) < 100 Then
                FoundErr = True
                ErrMsg = ErrMsg & "<br><li>请不要在提示""保存成功""的页面刷新！</li>"
                Exit Sub
            End If
            Session("HouseQuyu") = HouseQuyu
            Session("HouseDiZhi") = HouseDiZhi
            Session("HouseXiangXiDiZhi") = HouseXiangXiDiZhi
            Session("AddTime") = Now()
            Set mrs = Conn.Execute("select max(HouseID) from PE_HouseQZ")
            If IsNull(mrs(0)) Then
                HouseID = 1
            Else
                HouseID = mrs(0) + 1
            End If
            Set mrs = Nothing

            sql = "select top 1 * from PE_HouseQZ"
            rs.Open sql, Conn, 1, 3
            rs.AddNew
            rs("HouseID") = HouseID
            rs("UpdateTime") = Now()
            rs("ViewAll") = PE_True
            rs("OnTop") = PE_False
            rs("Hot") = PE_False
            If CheckLevel = 0 Then
                rs("Passed") = PE_True
            Else
                rs("Passed") = PE_False
            End If
        ElseIf Action = "SaveModify" Then
            If HouseID = 0 Then
                FoundErr = True
                ErrMsg = ErrMsg & "<br><li>不能确定HouseID的值</li>"
            Else
                sql = "select * from PE_HouseQZ where HouseId=" & HouseID
                rs.Open sql, Conn, 1, 3
                If rs.BOF And rs.EOF Then
                    FoundErr = True
                    ErrMsg = ErrMsg & "<br><li>找不到此房产，可能已经被其他人删除。</li>"
                End If
            End If
        Else
            FoundErr = True
            ErrMsg = "<br><li>参数错误!</li>"
        End If
        If FoundErr = True Then
            Exit Sub
        End If

    rs("HouseSource") = HouseSource
    rs("HouseQuyu") = HouseQuyu
    rs("HouseDiZhi") = HouseDiZhi
    rs("HouseHuXing") = HouseHuXing
    rs("HouseMianJi1") = HouseMianJi1
    rs("HouseMianJi2") = HouseMianJi2
    rs("HouseZuJin1") = HouseZuJin1
    rs("HouseZuJin2") = HouseZuJin2
    rs("HouseZuJinType") = HouseZuJinType
    rs("HouseZhiFu") = HouseZhiFu
    rs("HouseLouCeng") = HouseLouCeng
    rs("HouseLeiXing") = HouseLeiXing
    rs("HouseJiChu") = HouseJiChu
    rs("HouseZhuangXiu") = HouseZhuangXiu
    rs("HouseWeiSheng") = HouseWeiSheng
    rs("HouseDianQi") = HouseDianQi
    rs("HouseJiaJu") = HouseJiaJu
    rs("HouseXinXi") = HouseXinXi
    rs("HouseShiZheng") = HouseShiZheng
    rs("ZuLinStartDate") = ZuLinStartDate
    rs("ZuLinEndDate") = ZuLinEndDate
    rs("ContactName") = ContactName
    rs("ContactPhone") = ContactPhone
    rs("ContactEmail") = ContactEmail
    rs("ContactQQ") = ContactQQ
    rs("Keyword") = Keyword
    rs("YouXiaoQi") = YouXiaoQi
    rs("HouseQiTa") = HouseQiTa

    rs("Hits") = Hits
    rs("UpdateTime") = UpdateTime
    rs("CommendClassdays") = CommendClassDays
    If IsElite = "yes" Then
        rs("Elite") = PE_True
    End If

    rs("Editor") = Editor
    rs.Update
    HouseID = rs("HouseID")
    Passed = rs("Passed")
    If Action = "SaveAdd" And CheckLevel = 0 Then
        Conn.Execute ("update PE_Channel set ItemChecked=ItemChecked+1 where ChannelID=" & ChannelID & "")
    End If
    If Action = "SaveAdd" Then
        Conn.Execute ("update PE_Channel set ItemCount=ItemCount+1 where ChannelID=" & ChannelID & "")
        Conn.Execute ("Update PE_HouseConfig set ItemCount=ItemCount+1 where ClassID=" & ClassID & "")
    End If
    If Passed = True And IsDeduction = True Then
        Call DeductPoint(IsElite, HouseDiZhi)
    End If
    Call SaveSuccess(HouseHuXing, HouseDiZhi, HouseXiangXiDiZhi, HouseLeiXing, ContactName, Keyword, Passed, HouseID, "QiuZhu")

    rs.Close
    Set rs = Nothing
    Call ClearSiteCache(0)
End Sub

Sub SaveAddHeZhu()
    Dim rs, sql
    Dim HeZhuType, HouseQuyu, HouseDiZhi, HouseXiangXiDiZhi, HouseHuXing, HouseHuXing1, HouseHuXing2, HouseMianJi, HouseMianJi1, HouseMianJi2, HouseLouCeng, HouseLeiXing, HouseJianJie, HouseShiYou, HouseJiChu, HouseZhuangXiu, HouseWeiSheng, HouseDianQi, HouseJiaJu, HouseXinXi, HouseGongJiaoLu, HouseGongJiaoZhan, HouseShiZheng, ZuLinStartDate, ZuLinEndDate, HouseZuJin, HouseZuJinType, HouseZhiFu, ContactName, ContactPhone, ContactEmail, ContactQQ, Keyword, YouXiaoQi, HouseQiTa, HouseSource

    Dim Editor, UpdateTime, ViewAll, OnTop, Hot, Elite, Hits, Passed, trs, IsElite, CommendClassDays

    FoundErr = False
    CommendClassDays = PE_HTMLEncode(PE_CLng(Request.Form("CommendClassDays")))
    IsElite = PE_HTMLEncode(Request.Form("isElite"))
    If CheckUserPoint(IsElite, CommendClassDays) = False Then
        Exit Sub
    End If

    OnTop = PE_HTMLEncode(Request.Form("OnTop"))
    Elite = PE_HTMLEncode(Request.Form("Elite"))
    Hot = PE_HTMLEncode(Request.Form("Hot"))
    Passed = PE_HTMLEncode(Request.Form("Passed"))
    Hits = PE_HTMLEncode(PE_CLng(Request.Form("Hits")))
    HouseSource = PE_HTMLEncode(Trim(Request.Form("HouseSource")))
    HeZhuType = PE_HTMLEncode(Trim(Request.Form("HeZhuType")))
    HouseQuyu = PE_HTMLEncode(Trim(Request.Form("HouseQuyu")))
    HouseDiZhi = PE_HTMLEncode(Trim(Request.Form("HouseDiZhi")))
    HouseXiangXiDiZhi = PE_HTMLEncode(Trim(Request.Form("HouseXiangXiDiZhi")))
    If Trim(Request.Form("HouseHuXing1")) <> "0" Then
        HouseHuXing = add_str(HouseHuXing, PE_HTMLEncode(Trim(Request.Form("HouseHuXing1"))) & "房")
    End If
    If Trim(Request.Form("HouseHuXing2")) <> "0" Then
        HouseHuXing = add_str(HouseHuXing, PE_HTMLEncode(Trim(Request.Form("HouseHuXing2"))) & "厅")
    End If
    If Trim(Request.Form("HouseHuXing3")) <> "0" Then
        HouseHuXing = add_str(HouseHuXing, PE_HTMLEncode(Trim(Request.Form("HouseHuXing3"))) & "卫")
    End If
    If Trim(Request.Form("HouseHuXing4")) <> "0" Then
        HouseHuXing = add_str(HouseHuXing, PE_HTMLEncode(Trim(Request.Form("HouseHuXing4"))) & "厨")
    End If
    If Trim(Request.Form("HouseHuXing5")) <> "0" Then
        HouseHuXing = add_str(HouseHuXing, PE_HTMLEncode(Trim(Request.Form("HouseHuXing4"))) & "阳台")
    End If

    If Trim(Request.Form("HouseHuXing11")) <> "0" Then
        HouseHuXing1 = add_str(HouseHuXing1, PE_HTMLEncode(Trim(Request.Form("HouseHuXing11"))) & "房")
    End If
    If Trim(Request.Form("HouseHuXing12")) <> "0" Then
        HouseHuXing1 = add_str(HouseHuXing1, PE_HTMLEncode(Trim(Request.Form("HouseHuXing12"))) & "厅")
    End If
    If Trim(Request.Form("HouseHuXing13")) <> "0" Then
        HouseHuXing1 = add_str(HouseHuXing1, PE_HTMLEncode(Trim(Request.Form("HouseHuXing13"))) & "卫")
    End If
    If Trim(Request.Form("HouseHuXing14")) <> "0" Then
        HouseHuXing1 = add_str(HouseHuXing1, PE_HTMLEncode(Trim(Request.Form("HouseHuXing14"))) & "厨")
    End If
    If Trim(Request.Form("HouseHuXing15")) <> "0" Then
        HouseHuXing1 = add_str(HouseHuXing1, PE_HTMLEncode(Trim(Request.Form("HouseHuXing14"))) & "阳台")
    End If

    If Trim(Request.Form("HouseHuXing21")) <> "0" Then
        HouseHuXing2 = add_str(HouseHuXing2, PE_HTMLEncode(Trim(Request.Form("HouseHuXing21"))) & "房")
    End If
    If Trim(Request.Form("HouseHuXing22")) <> "0" Then
        HouseHuXing2 = add_str(HouseHuXing2, PE_HTMLEncode(Trim(Request.Form("HouseHuXing22"))) & "厅")
    End If
    If Trim(Request.Form("HouseHuXing23")) <> "0" Then
        HouseHuXing2 = add_str(HouseHuXing2, PE_HTMLEncode(Trim(Request.Form("HouseHuXing23"))) & "卫")
    End If
    If Trim(Request.Form("HouseHuXing24")) <> "0" Then
        HouseHuXing2 = add_str(HouseHuXing2, PE_HTMLEncode(Trim(Request.Form("HouseHuXing24"))) & "厨")
    End If
    If Trim(Request.Form("HouseHuXing25")) <> "0" Then
        HouseHuXing2 = add_str(HouseHuXing2, PE_HTMLEncode(Trim(Request.Form("HouseHuXing24"))) & "阳台")
    End If
    If HouseHuXing = "" Then
        HouseHuXing = "未知"
    End If
    HouseMianJi = PE_CDbl(Trim(Request.Form("HouseMianJi")))
    HouseMianJi1 = PE_CDbl(Trim(Request.Form("HouseMianJi1")))
    HouseMianJi2 = PE_CDbl(Trim(Request.Form("HouseMianJi2")))

    If Trim(Request.Form("HouseLouCeng1")) <> "" Then
        HouseLouCeng = add_str(HouseLouCeng, PE_CLng(Request.Form("HouseLouCeng1")) & "楼/")
    End If
    If Trim(Request.Form("HouseLouCeng2")) <> "" Then
        HouseLouCeng = add_str(HouseLouCeng, "" & PE_CLng(Request.Form("HouseLouCeng2")) & "层")
    End If
    If Trim(Request.Form("HouseLouCeng3")) <> "" Then
        HouseLouCeng = add_str(HouseLouCeng, PE_HTMLEncode(Replace(Trim(Request.Form("HouseLouCeng3")), " ", "")))
    End If
    HouseLeiXing = PE_HTMLEncode(Trim(Request.Form("HouseLeiXing")))


    If Trim(Request.Form("HouseJianJie1")) <> "" Then
        HouseJianJie = add_str(HouseJianJie, "性别" & PE_HTMLEncode(Request.Form("HouseJianJie1")) & "")
    End If
    If Trim(Request.Form("HouseJianJie2")) <> "" Then
        HouseJianJie = add_str(HouseJianJie, "年龄" & PE_HTMLEncode(Request.Form("HouseJianJie2")) & "")
    End If
    If Trim(Request.Form("HouseJianJie3")) <> "" Then
        HouseJianJie = add_str(HouseJianJie, "学历" & PE_HTMLEncode(Request.Form("HouseJianJie3")) & "")
    End If
    If Trim(Request.Form("HouseJianJie4")) <> "" Then
        HouseJianJie = add_str(HouseJianJie, "身份" & PE_HTMLEncode(Request.Form("HouseJianJie4")) & "")
    End If
    If Trim(Request.Form("HouseJianJie5")) <> "" Then
        HouseJianJie = add_str(HouseJianJie, "配偶" & PE_HTMLEncode(Request.Form("HouseJianJie5")) & "")
    End If
    If Trim(Request.Form("HouseJianJie6")) <> "" Then
        HouseJianJie = add_str(HouseJianJie, PE_HTMLEncode(Replace(Trim(Request.Form("HouseJianJie6")), " ", "")))
    End If

    If Trim(Request.Form("HouseShiYou1")) <> "" Then
        HouseShiYou = add_str(HouseShiYou, "性别" & PE_HTMLEncode(Request.Form("HouseShiYou1")) & "")
    End If
    If Trim(Request.Form("HouseShiYou2")) <> "" Then
        HouseShiYou = add_str(HouseShiYou, "年龄" & PE_HTMLEncode(Request.Form("HouseShiYou2")) & "")
    End If
    If Trim(Request.Form("HouseShiYou3")) <> "" Then
        HouseShiYou = add_str(HouseShiYou, "学历" & PE_HTMLEncode(Request.Form("HouseShiYou3")) & "")
    End If
    If Trim(Request.Form("HouseShiYou4")) <> "" Then
        HouseShiYou = add_str(HouseShiYou, "身份" & PE_HTMLEncode(Request.Form("HouseShiYou4")) & "")
    End If
    If Trim(Request.Form("HouseShiYou5")) <> "" Then
        HouseShiYou = add_str(HouseShiYou, "配偶" & PE_HTMLEncode(Request.Form("HouseShiYou5")) & "")
    End If
    If Trim(Request.Form("HouseShiYou6")) <> "" Then
        HouseShiYou = add_str(HouseShiYou, PE_HTMLEncode(Replace(Trim(Request.Form("HouseShiYou6")), " ", "")))
    End If

    HouseJiChu = PE_HTMLEncode(Replace(Trim(Request.Form("HouseJiChu")), " ", ""))
    If Trim(Request.Form("HouseJiaJu1")) <> "0" Then
        HouseJiaJu = add_str(HouseJiaJu, "床" & PE_HTMLEncode(Replace(Request.Form("HouseJiaJu1"), ",", "，")) & "张")
    End If
    If Trim(Request.Form("HouseJiaJu2")) <> "0" Then
        HouseJiaJu = add_str(HouseJiaJu, "衣柜" & PE_HTMLEncode(Replace(Request.Form("HouseJiaJu2"), ",", "，")) & "个")
    End If
    If Trim(Request.Form("HouseJiaJu3")) <> "0" Then
        HouseJiaJu = add_str(HouseJiaJu, "写字台" & PE_HTMLEncode(Replace(Request.Form("HouseJiaJu3"), ",", "，")) & "张")
    End If
    If Trim(Request.Form("HouseJiaJu4")) <> "" Then
        HouseJiaJu = add_str(HouseJiaJu, PE_HTMLEncode(Replace(Trim(Request.Form("HouseJiaJu4")), " ", "")))
    End If
    HouseJiChu = PE_HTMLEncode(Replace(Trim(Request.Form("HouseJiChu")), " ", ""))
    If Trim(Request.Form("HouseZhuangXiu1")) <> "" Then
        HouseZhuangXiu = add_str(HouseZhuangXiu, "房间" & PE_HTMLEncode(Request.Form("HouseZhuangXiu1")) & "")
    End If
    If Trim(Request.Form("HouseZhuangXiu2")) <> "" Then
        HouseZhuangXiu = add_str(HouseZhuangXiu, "房间墙面" & PE_HTMLEncode(Request.Form("HouseZhuangXiu2")) & "")
    End If
    If Trim(Request.Form("HouseZhuangXiu3")) <> "" Then
        HouseZhuangXiu = add_str(HouseZhuangXiu, "客厅" & PE_HTMLEncode(Request.Form("HouseZhuangXiu3")) & "")
    End If
    If Trim(Request.Form("HouseZhuangXiu4")) <> "" Then
        HouseZhuangXiu = add_str(HouseZhuangXiu, "客厅墙面" & PE_HTMLEncode(Request.Form("HouseZhuangXiu4")) & "")
    End If
    If Trim(Request.Form("HouseZhuangXiu5")) <> "" Then
        HouseZhuangXiu = add_str(HouseZhuangXiu, "卫生间" & PE_HTMLEncode(Request.Form("HouseZhuangXiu5")) & "")
    End If
    If Trim(Request.Form("HouseZhuangXiu6")) <> "" Then
        HouseZhuangXiu = add_str(HouseZhuangXiu, PE_HTMLEncode(Replace(Trim(Request.Form("HouseZhuangXiu6")), " ", "")))
    End If

    HouseWeiSheng = PE_HTMLEncode(Replace(Trim(Request.Form("HouseWeiSheng")), " ", ""))

    If Trim(Request.Form("HouseDianQi1")) <> "0" Then
        HouseDianQi = add_str(HouseDianQi, "空调" & PE_HTMLEncode(Replace(Request.Form("HouseDianQi1"), ",", "，")) & "台")
    End If
    If Trim(Request.Form("HouseDianQi2")) <> "0" Then
        HouseDianQi = add_str(HouseDianQi, "电扇" & PE_HTMLEncode(Replace(Request.Form("HouseDianQi2"), ",", "，")) & "台")
    End If
    If Trim(Request.Form("HouseDianQi3")) <> "0" Then
        HouseDianQi = add_str(HouseDianQi, "电视机" & PE_HTMLEncode(Replace(Request.Form("HouseDianQi3"), ",", "，")) & "台")
    End If
    If Trim(Request.Form("HouseDianQi4")) <> "" Then
        HouseDianQi = add_str(HouseDianQi, PE_HTMLEncode(Replace(Trim(Request.Form("HouseDianQi4")), " ", "")))
    End If

    HouseXinXi = PE_HTMLEncode(Replace(Trim(Request.Form("HouseXinXi")), " ", ""))
    HouseGongJiaoLu = PE_HTMLEncode(Trim(Request.Form("HouseGongJiaoLu")))
    HouseGongJiaoZhan = PE_HTMLEncode(Trim(Request.Form("HouseGongJiaoZhan")))
    HouseShiZheng = PE_HTMLEncode(Replace(Trim(Request.Form("HouseShiZheng")), " ", ""))
    ZuLinStartDate = PE_HTMLEncode(Trim(Request.Form("ZuLinStartYear"))) & "-" & PE_HTMLEncode(Trim(Request.Form("ZuLinStartMonth"))) & "-" & PE_HTMLEncode(Trim(Request.Form("ZuLinStartDay")))
    ZuLinEndDate = PE_HTMLEncode(Trim(Request.Form("ZuLinEndYear"))) & "-" & PE_HTMLEncode(Trim(Request.Form("ZuLinEndMonth"))) & "-" & PE_HTMLEncode(Trim(Request.Form("ZuLinEndDay")))
    HouseZuJin = PE_CDbl(Trim(Request.Form("HouseZuJin")))
    HouseZuJinType = PE_HTMLEncode(Trim(Request.Form("HouseZuJinType")))
    HouseZhiFu = PE_HTMLEncode(Trim(Request.Form("HouseZhiFu")))
    ContactName = PE_HTMLEncode(Trim(Request.Form("ContactName")))
    ContactPhone = PE_HTMLEncode(Trim(Request.Form("ContactPhone")))
    ContactEmail = PE_HTMLEncode(Trim(Request.Form("ContactEmail")))
    ContactQQ = PE_HTMLEncode(Trim(Request.Form("ContactQQ")))
    Keyword = PE_HTMLEncode(Trim(Request.Form("Keyword")))
    YouXiaoQi = PE_HTMLEncode(Trim(Request.Form("YouXiaoQi")))
    HouseQiTa = FilterJS(ReplaceBadUrl(Trim(Request.Form("HouseQiTa"))))
    Editor = UserName

        If HeZhuType = "" Then
            FoundErr = True
            ErrMsg = ErrMsg & "<br><li>合租类型不能为空</li>"
        End If
        If HouseDiZhi = "" Then
            FoundErr = True
            ErrMsg = ErrMsg & "<br><li>房产地址不能为空</li>"
        End If
        If HouseHuXing = "" Then
            FoundErr = True
            ErrMsg = ErrMsg & "<br><li>原房户型不能为空</li>"
        End If
        If HouseHuXing1 = "" Then
            FoundErr = True
            ErrMsg = ErrMsg & "<br><li>原分租户型不能为空</li>"
        End If
        If HouseMianJi <> "" Then
            If Not IsNumeric(HouseMianJi) Then
                FoundErr = True
                ErrMsg = ErrMsg & "<br><li>房产面积必须使用数字，您可以选择不输入。</li>"
            End If
        Else
            HouseMianJi = 0
        End If
        If HouseMianJi1 <> "" Then
            If Not IsNumeric(HouseMianJi1) Then
                FoundErr = True
                ErrMsg = ErrMsg & "<br><li>分租面积必须使用数字，您可以选择不输入。</li>"
            End If
        Else
            HouseMianJi1 = 0
        End If
        If HouseMianJi2 <> "" Then
            If Not IsNumeric(HouseMianJi2) Then
                FoundErr = True
                ErrMsg = ErrMsg & "<br><li>共用面积必须使用数字，您可以选择不输入。</li>"
            End If
        Else
            HouseMianJi2 = 0
        End If
        If ZuLinStartDate = "" Or Not IsDate(ZuLinStartDate) Then
            FoundErr = True
            ErrMsg = ErrMsg & "<br><li>租赁开始日期不能为空，且必须为有效日期格式</li>"
        Else
            ZuLinStartDate = CDate(ZuLinStartDate)
        End If
        If ZuLinEndDate = "" Or Not IsDate(ZuLinEndDate) Then
            FoundErr = True
            ErrMsg = ErrMsg & "<br><li>租赁结束日期不能为空，且必须为有效日期格式</li>"
        Else
            ZuLinEndDate = CDate(ZuLinEndDate)
        End If
        If HouseZuJin = "" Then
            FoundErr = True
            ErrMsg = ErrMsg & "<br><li>房产租金不能为空</li>"
        End If
        If Not IsNumeric(HouseZuJin) Then
            FoundErr = True
            ErrMsg = ErrMsg & "<br><li>房产租金必须使用数字</li>"
        End If
        If ContactName = "" Then
            FoundErr = True
            ErrMsg = ErrMsg & "<br><li>联系人姓名不能为空</li>"
        End If
        If ContactPhone = "" Then
            FoundErr = True
            ErrMsg = ErrMsg & "<br><li>联系人电话不能为空</li>"
        End If
        If ContactEmail <> "" Then
            If IsValidEmail(ContactEmail) = False Then
                FoundErr = True
                ErrMsg = ErrMsg & "<br><li>您的Email有错误，您可以选择不输入。</li>"
            End If
        End If
        If ContactQQ <> "" Then
            If Not IsNumeric(ContactQQ) Or Len(CStr(ContactQQ)) > 10 Then
                FoundErr = True
                ErrMsg = ErrMsg & "<br><li>QQ号码只能是4-10位数字，您可以选择不输入。</li>"
            End If
        End If
        If Keyword = "" Then
            FoundErr = True
            ErrMsg = ErrMsg & "<br><li>请输入房产关键字</li>"
        End If
        If FoundErr = True Then
            Exit Sub
        End If

        Keyword = "|" & ReplaceBadChar(Keyword) & "|"
        UpdateTime = Now()
        
        Set rs = Server.CreateObject("adodb.recordset")
        If Action = "SaveAdd" Then
            Dim mrs
            If Session("HouseQuyu") = HouseQuyu And Session("HouseDiZhi") = HouseDiZhi And Session("HouseXiangXiDiZhi") = HouseXiangXiDiZhi And DateDiff("S", Session("AddTime"), Now()) < 100 Then
                FoundErr = True
                ErrMsg = ErrMsg & "<br><li>请不要在提示""保存成功""的页面刷新！</li>"
                Exit Sub
            End If
            Session("HouseQuyu") = HouseQuyu
            Session("HouseDiZhi") = HouseDiZhi
            Session("HouseXiangXiDiZhi") = HouseXiangXiDiZhi
            Session("AddTime") = Now()
            Set mrs = Conn.Execute("select max(HouseID) from PE_HouseHZ")
            If IsNull(mrs(0)) Then
                HouseID = 1
            Else
                HouseID = mrs(0) + 1
            End If
            Set mrs = Nothing

            sql = "select top 1 * from PE_HouseHZ"
            rs.Open sql, Conn, 1, 3
            rs.AddNew
            rs("HouseID") = HouseID
            rs("UpdateTime") = Now()
            rs("ViewAll") = PE_True
            rs("OnTop") = PE_False
            rs("Hot") = PE_False
            If CheckLevel = 0 Then
                rs("Passed") = PE_True
            Else
                rs("Passed") = PE_False
            End If
        ElseIf Action = "SaveModify" Then
            If HouseID = 0 Then
                FoundErr = True
                ErrMsg = ErrMsg & "<br><li>不能确定HouseID的值</li>"
            Else
                sql = "select * from PE_HouseHZ where HouseId=" & HouseID
                rs.Open sql, Conn, 1, 3
                If rs.BOF And rs.EOF Then
                    FoundErr = True
                    ErrMsg = ErrMsg & "<br><li>找不到此房产，可能已经被其他人删除。</li>"
                End If
            End If
        Else
            FoundErr = True
            ErrMsg = "<br><li>参数错误!</li>"
        End If
        If FoundErr = True Then
            Exit Sub
        End If

    rs("HouseSource") = HouseSource
    rs("HeZhuType") = HeZhuType
    rs("HouseQuyu") = HouseQuyu
    rs("HouseDiZhi") = HouseDiZhi
    rs("HouseXiangXiDiZhi") = HouseXiangXiDiZhi
    rs("HouseHuXing") = HouseHuXing
    rs("HouseHuXing1") = HouseHuXing1
    rs("HouseHuXing2") = HouseHuXing2
    rs("HouseMianJi") = HouseMianJi
    rs("HouseMianJi1") = HouseMianJi1
    rs("HouseMianJi2") = HouseMianJi2
    rs("HouseLouCeng") = HouseLouCeng
    rs("HouseLeiXing") = HouseLeiXing
    rs("HouseJianJie") = HouseJianJie
    rs("HouseShiYou") = HouseShiYou
    rs("HouseJiChu") = HouseJiChu
    rs("HouseZhuangXiu") = HouseZhuangXiu
    rs("HouseWeiSheng") = HouseWeiSheng
    rs("HouseDianQi") = HouseDianQi
    rs("HouseJiaJu") = HouseJiaJu
    rs("HouseXinXi") = HouseXinXi
    rs("HouseGongJiaoLu") = HouseGongJiaoLu
    rs("HouseGongJiaoZhan") = HouseGongJiaoZhan
    rs("HouseShiZheng") = HouseShiZheng
    rs("ZuLinStartDate") = ZuLinStartDate
    rs("ZuLinEndDate") = ZuLinEndDate
    rs("HouseZuJin") = HouseZuJin
    rs("HouseZuJinType") = HouseZuJinType
    rs("HouseZhiFu") = HouseZhiFu
    rs("ContactName") = ContactName
    rs("ContactPhone") = ContactPhone
    rs("ContactEmail") = ContactEmail
    rs("ContactQQ") = ContactQQ
    rs("Keyword") = Keyword
    rs("YouXiaoQi") = YouXiaoQi
    rs("HouseQiTa") = HouseQiTa

    rs("Hits") = Hits
    rs("UpdateTime") = UpdateTime
    rs("CommendClassdays") = CommendClassDays
    If IsElite = "yes" Then
        rs("Elite") = PE_True
    End If
    rs("Editor") = Editor
    rs.Update
    HouseID = rs("HouseID")
    Passed = rs("Passed")

    If Action = "SaveAdd" And CheckLevel = 0 Then
        Conn.Execute ("update PE_Channel set ItemChecked=ItemChecked+1 where ChannelID=" & ChannelID & "")
    End If
    If Action = "SaveAdd" Then
        Conn.Execute ("update PE_Channel set ItemCount=ItemCount+1 where ChannelID=" & ChannelID & "")
        Conn.Execute ("Update PE_HouseConfig set ItemCount=ItemCount+1 where ClassID=" & ClassID & "")
    End If
    If Passed = True And IsDeduction = True Then
        Call DeductPoint(IsElite, HouseDiZhi)
    End If
    Call SaveSuccess(HouseHuXing, HouseDiZhi, HouseXiangXiDiZhi, HouseLeiXing, ContactName, Keyword, Passed, HouseID, "HeZhu")

    rs.Close
    Set rs = Nothing
    Call ClearSiteCache(0)
End Sub

Sub SaveSuccess(HouseHuXing, HouseDiZhi, HouseXiangXiDiZhi, HouseLeiXing, ContactName, Keyword, Passed, HouseID, itype)
    Response.Write "<br><br>"
    Response.Write "<table class='border' align=center width='400' border='0' cellpadding='0' cellspacing='0' bordercolor='#999999'>"
    Response.Write "<tr align=center class='title'>"
    Response.Write "<td height='22' align='center'><FONT color='#FFFFFF'><b>"
    If Action = "SaveAdd" Then
         Response.Write "添加"
    Else
         Response.Write "修改"
    End If
    Select Case itype
    Case "ChuShou"
        Response.Write "出售信息 成功</b></FONT></td>"
    Case "ChuZhu"
        Response.Write "出租信息 成功</b></FONT></td>"
    Case "QiuGou"
        Response.Write "求购信息 成功</b></FONT></td>"
    Case "QiuZhu"
        Response.Write "求租信息 成功</b></FONT></td>"
    Case "HeZhu"
        Response.Write "合租信息 成功</b></FONT></td>"
    End Select
    Response.Write "</tr>"
    If Passed = False Then
        Response.Write "<tr class='tdbg'>"
        Response.Write "<td height='60'><font color='#0000FF'>注意：</font><br>"
        Response.Write "&nbsp;&nbsp;&nbsp; 你的房产信息尚未真正发表！只有等管理员审核并通过了你的房产信息后，你所添加的房产信息才会发表。</td>"
        Response.Write "</tr>"
    End If
    Response.Write "<tr>"
    Response.Write "<td>"
    Response.Write "<table align='center' border='0' cellpadding='2' cellspacing='1' bordercolor='#999999' width=100% >"
    Response.Write "<tr class='tdbg'>"
    Response.Write "<td class='tdbg5' align='right' width='120'>户型：</td>"
    Response.Write "<td>" & PE_HTMLEncode(HouseHuXing) & "</td>"
    Response.Write "</tr>"
    Response.Write "<tr class='tdbg'>"
    Response.Write "<td class='tdbg5' align='right' width='120'>房产地址：</td>"
    Response.Write "<td>" & PE_HTMLEncode(HouseDiZhi) & "</td>"
    Response.Write "</tr>"
    Response.Write "<tr class='tdbg'>"
    Response.Write "<td class='tdbg5' align='right' width='120'>详细门牌：</td>"
    Response.Write "<td>" & PE_HTMLEncode(HouseXiangXiDiZhi) & "</td>"
    Response.Write "</tr>"
    Response.Write "<tr class='tdbg'>"
    Response.Write "<td class='tdbg5' align='right' width='120'>物业类型：</td>"
    Response.Write "<td>" & PE_HTMLEncode(HouseLeiXing) & "</td>"
    Response.Write "</tr>"
    Response.Write "<tr class='tdbg'>"
    Response.Write "<td class='tdbg5' align='right' width='120'>联系人姓名：</td>"
    Response.Write "<td>" & PE_HTMLEncode(ContactName) & "</td>"
    Response.Write "</tr>"
    Response.Write "<tr class='tdbg'>"
    Response.Write "<td class='tdbg5' align='right' width='120'>关 键 字：</td>"
    Response.Write "<td>" & Mid(Keyword, 2, Len(Keyword) - 2) & "</td>"
    Response.Write "</tr>"
    Response.Write "</table></td>"
    Response.Write "</tr>"
    Response.Write "<tr class='tdbg'>"
    Response.Write "<td align='center'>【<a href=User_House.asp?ChannelID=" & ChannelID & "&Action=Modify&ClassID=" & ClassID & "&HouseID=" & HouseID & ">修改此信息</a>】&nbsp;【<a href=User_House.asp?ChannelID=" & ChannelID & "&Action=Add&ClassID=" & ClassID & ">继续添加信息</a>】&nbsp;【<a href=User_House.asp?ChannelID=" & ChannelID & "&Action=Manage&ClassID=" & ClassID & ">房产信息管理</a>】&nbsp;【<a href=User_House.asp?ChannelID=" & ChannelID & "&Action=Show&ClassID=" & ClassID & "&HouseID=" & HouseID & ">预览房产信息</a>】</td>"
    Response.Write "</tr>"
    Response.Write "</table>"
End Sub

Sub Show()
    Dim rs, rsClass

    Response.Write "<SCRIPT language='javascript'>" & vbCrLf
    Response.Write "function resizepic(thispic){" & vbCrLf
    Response.Write "  if(thispic.width>600) thispic.width=600;" & vbCrLf
    Response.Write "}" & vbCrLf
    Response.Write "function bbimg(o){" & vbCrLf
    Response.Write "  var zoom=parseInt(o.style.zoom, 10)||100;" & vbCrLf
    Response.Write "  zoom+=event.wheelDelta/12;" & vbCrLf
    Response.Write "  if (zoom>0) o.style.zoom=zoom+'%';" & vbCrLf
    Response.Write "  if (zoom>0) o.style.zoom=zoom+'%';" & vbCrLf
    Response.Write "  return false;" & vbCrLf
    Response.Write "}" & vbCrLf

    Response.Write "var tID=0;" & vbCrLf
    Response.Write "function ShowTabs(ID){" & vbCrLf
    Response.Write "  if(ID!=tID){" & vbCrLf
    Response.Write "    TabTitle[tID].className='title5';" & vbCrLf
    Response.Write "    TabTitle[ID].className='title6';" & vbCrLf
    Response.Write "    Tabs[tID].style.display='none';" & vbCrLf
    Response.Write "    Tabs[ID].style.display='';" & vbCrLf
    Response.Write "    tID=ID;" & vbCrLf
    Response.Write "  }" & vbCrLf
    Response.Write "}" & vbCrLf
    Response.Write "</SCRIPT>" & vbCrLf

    Set rsClass = Conn.Execute("select ClassName,UpgradePoint from PE_HouseConfig where ClassID=" & ClassID & "")
    Response.Write "<body leftmargin='2' topmargin='0' marginwidth='0' marginheight='0'>"
    Response.Write "<TABLE width='100%' border=0 align=center cellPadding=2 cellSpacing=1 bgcolor='#FFFFFF' class='border' style='WORD-BREAK: break-all'>"
    Response.Write "  <tr class='title'>"
    Select Case ClassID
    Case 1
        Set rs = Conn.Execute("select * from PE_HouseCS where HouseID=" & HouseID)
        Response.Write "<td height='22' colspan='5'>您现在的位置：&nbsp;<a href=User_House.asp?ChannelID=" & ChannelID & "&Action=Manage&InfoType=" & InfoType & "><font color=red>" & ClassName & "</font>信息管理</a>&nbsp;&gt;&gt;&nbsp;" & PE_HTMLEncode(rs("HouseQuYu") & rs("HouseDiZhi")) & "</td>"
        Response.Write "</tr>"
        Response.Write "<tr class='tdbg'>"
        Response.Write "<td align='right' width='100'>房产地址：</td>"
        Response.Write "<td colspan='3'>" & PE_HTMLEncode(rs("HouseQuYu") & rs("HouseDiZhi")) & "</td>"
        Response.Write "</tr>"
        Response.Write "<tr class='tdbg'>"
        Response.Write "<td width='100' align='right'>详细地址：</td>"
        Response.Write "<td colspan='3'>" & PE_HTMLEncode(rs("HouseXiangXiDiZhi")) & " </td>"
        Response.Write "</tr>"
        Response.Write "<tr class='tdbg'>"
        Response.Write "<td width='100' align='right'>房屋户型：</td>"
        Response.Write "<td width='200'>" & rs("HouseHuXing") & "</td>"
        Response.Write "<td width='100' align=right>房产面积：</td>"
        Response.Write "<td width='150'>" & rs("HouseMianJi") & " ㎡</td>"
        Response.Write "</tr>"
        Response.Write "<tr class='tdbg'>"
        Response.Write "<td width='100' align='right'>产权性质：</td>"
        Response.Write "<td width='200'>" & rs("HouseChanQuan") & "</td>"
        Response.Write "<td width='100' align=right>建成年份：</td>"
        Response.Write "<td width='150'>" & rs("HouseJianCheng") & "</td>"
        Response.Write "</tr>"
        Response.Write "<tr class='tdbg'>"
        Response.Write "<td width='100' align='right'>所在楼层：</td>"
        Response.Write "<td width='200'>" & PE_HTMLEncode(rs("HouseLouCeng")) & "</td>"
        Response.Write "<td width='100' align=right>物业类型：</td>"
        Response.Write "<td width='150'>" & rs("HouseLeiXing") & "</td>"
        Response.Write "</tr>"
        Response.Write "<tr class='tdbg'>"
        Response.Write "<td width='100' align='right'>采光朝向：</td>"
        Response.Write "<td colspan='3'>" & rs("HouseChaoXiang") & "</td>"
        Response.Write "</tr>"
        Response.Write "<tr class='tdbg'>"
        Response.Write "<td width='100' align='right'>基础设施：</td>"
        Response.Write "<td colspan='3'>" & rs("HouseJiChu") & "</td>"
        Response.Write "</tr>"
        Response.Write "<tr class='tdbg'>"
        Response.Write "<td width='100' align='right'>装修程度：</td>"
        Response.Write "<td colspan='3'>" & rs("HouseZhuangXiu") & "</td>"
        Response.Write "</tr>"
        Response.Write "<tr class='tdbg'>"
        Response.Write "<td width='100' align='right'>水电管线：</td>"
        Response.Write "<td colspan='3'>" & rs("HouseShuiDian") & "</td>"
        Response.Write "</tr>"
        Response.Write "<tr class='tdbg'>"
        Response.Write "<td width='100' align='right'>附带电器：</td>"
        Response.Write "<td colspan='3'>" & rs("HouseDianQi") & "</td>"
        Response.Write "</tr>"
        Response.Write "<tr class='tdbg'>"
        Response.Write "<td width='100' align='right'>附带家具：</td>"
        Response.Write "<td colspan='3'>" & rs("HouseJiaJu") & "</td>"
        Response.Write "</tr>"
        Response.Write "<tr class='tdbg'>"
        Response.Write "<td width='100' align='right'>公交线路：</td>"
        Response.Write "<td colspan='3'>" & rs("HouseGongJiaoLu") & " 路  " & rs("HouseGongJiaoZhan") & " 站</td>"
        Response.Write "</tr>"
        Response.Write "<tr class='tdbg'>"
        Response.Write "<td width='100' align='right'>市政配套：</td>"
        Response.Write "<td colspan='3'>" & rs("HouseShiZheng") & "</td>"
        Response.Write "</tr>"
        Response.Write "<tr class='tdbg'>"
        Response.Write "<td width='100' align='right'>交房时间：</td>"
        Response.Write "<td colspan='3'>" & rs("JiaoFangStartDate") & "</td>"
        Response.Write "</tr>"
        Response.Write "<tr class='tdbg'>"
        Response.Write "<td width='100' align='right'>出售价格：</td>"
        Response.Write "<td colspan='3'>"
        Response.Write "总价" & rs("TotalPrice") & " " & rs("HousePriceType") & "人民币，（其中家电装修折价" & rs("OtherPrice") & "万元）"
        If Trim(rs("ShuiFei")) <> "" Then Response.Write "<br>卖方交易税费由" & rs("ShuiFei")
        Response.Write "</td>"
        Response.Write "</tr>"
    Case 2
        Set rs = Conn.Execute("select * from PE_HouseCZ where HouseID=" & HouseID)
        Response.Write "<td height='22' colspan='5'>您现在的位置：&nbsp;<a href=Admin_House.asp?ChannelID=" & ChannelID & "&Action=Manage&InfoType=ChuZhu><font color=red>" & ClassName & "</font>信息管理</a>&nbsp;&gt;&gt;&nbsp;" & PE_HTMLEncode(rs("HouseQuYu") & rs("HouseDiZhi")) & "</td>"
        Response.Write "</tr>"
        Response.Write "<tr class='tdbg'>"
        Response.Write "<td align='right' width='100'>房产地址：</td>"
        Response.Write "<td colspan='3'>" & PE_HTMLEncode(rs("HouseQuYu") & rs("HouseDiZhi")) & "</td>"
        Response.Write "</tr>"
        Response.Write "<tr class='tdbg'>"
        Response.Write "<td width='100' align='right'>详细地址：</td>"
        Response.Write "<td colspan='3'>" & PE_HTMLEncode(rs("HouseXiangXiDiZhi")) & " </td>"
        Response.Write "</tr>"
        Response.Write "<tr class='tdbg'>"
        Response.Write "<td width='100' align='right'>房屋户型：</td>"
        Response.Write "<td width='200'>" & rs("HouseHuXing") & "</td>"
        Response.Write "<td width='100' align=right>房产面积：</td>"
        Response.Write "<td width='150'>" & rs("HouseMianJi") & " ㎡</td>"
        Response.Write "</tr>"
        Response.Write "<tr class='tdbg'>"
        Response.Write "<td width='100' align='right'>所在楼层：</td>"
        Response.Write "<td width='200'>" & PE_HTMLEncode(rs("HouseLouCeng")) & "</td>"
        Response.Write "<td width='100' align=right>物业类型：</td>"
        Response.Write "<td width='150'>" & rs("HouseLeiXing") & "</td>"
        Response.Write "</tr>"
        Response.Write "<tr class='tdbg'>"
        Response.Write "<td width='100' align='right'>基础设施：</td>"
        Response.Write "<td width='200'>" & rs("HouseJiChu") & "</td>"
        Response.Write "<td width='100' align=right>装修程度：</td>"
        Response.Write "<td width='150'>" & rs("HouseZhuangXiu") & "</td>"
        Response.Write "</tr>"
        Response.Write "<tr class='tdbg'>"
        Response.Write "<td width='100' align='right'>卫生设施：</td>"
        Response.Write "<td colspan='3'>" & rs("HouseWeiSheng") & "</td>"
        Response.Write "</tr>"
        Response.Write "<tr class='tdbg'>"
        Response.Write "<td width='100' align='right'>电器设备：</td>"
        Response.Write "<td colspan='3'>" & rs("HouseDianQi") & "</td>"
        Response.Write "</tr>"
        Response.Write "<tr class='tdbg'>"
        Response.Write "<td width='100' align='right'>家具设施：</td>"
        Response.Write "<td colspan='3'>" & rs("HouseJiaJu") & "</td>"
        Response.Write "</tr>"
        Response.Write "<tr class='tdbg'>"
        Response.Write "<td width='100' align='right'>信息设施：</td>"
        Response.Write "<td colspan='3'>" & rs("HouseXinXi") & "</td>"
        Response.Write "</tr>"
        Response.Write "<tr class='tdbg'>"
        Response.Write "<td width='100' align='right'>公交线路：</td>"
        Response.Write "<td colspan='3'>" & rs("HouseGongJiaoLu") & " 路  " & rs("HouseGongJiaoZhan") & " 站</td>"
        Response.Write "</tr>"
        Response.Write "<tr class='tdbg'>"
        Response.Write "<td width='100' align='right'>市政配套：</td>"
        Response.Write "<td colspan='3'>" & rs("HouseShiZheng") & "</td>"
        Response.Write "</tr>"
        Response.Write "<tr class='tdbg'>"
        Response.Write "<td width='100' align='right'>租赁时间：</td>"
        Response.Write "<td colspan='3'>" & rs("ZuLinStartDate") & "至" & rs("ZuLinEndDate") & "</td>"
        Response.Write "</tr>"
        Response.Write "<tr class='tdbg'>"
        Response.Write "<td width='100' align='right'>出租价格：</td>"
        Response.Write "<td colspan='3'>" & rs("HouseZuJin") & rs("HouseZuJinType") & "，支付方式:" & rs("HouseZhiFu") & "一付</td>"
        Response.Write "</tr>"
    Case 3
        Set rs = Conn.Execute("select * from PE_HouseQG where HouseID=" & HouseID)
        Response.Write "    <td height='22' colspan='5'>您现在的位置：&nbsp;<a href=Admin_House.asp?ChannelID=" & ChannelID & "&Action=Manage&InfoType=QiuGou><font color=red>" & ClassName & "</font>信息管理</a>&nbsp;&gt;&gt;&nbsp;" & PE_HTMLEncode(rs("HouseQuYu") & rs("HouseDiZhi")) & "</td>"
        Response.Write "</tr>"
        Response.Write "<tr class='tdbg'>"
        Response.Write "<td align='right' width='100'>欲购地段：</td>"
        Response.Write "<td colspan='3'>" & PE_HTMLEncode(rs("HouseQuYu") & rs("HouseDiZhi")) & "</td>"
        Response.Write "</tr>"
        Response.Write "<tr class='tdbg'>"
        Response.Write "<td width='100' align='right'>欲购类型：</td>"
        Response.Write "<td colspan='3'>" & "建造于" & rs("HouseJianCheng1") & "年至" & rs("HouseJianCheng2") & "年间的" & rs("HouseLeiXing") & "，房屋性质为" & rs("HouseXingZhi") & " </td>"
        Response.Write "</tr>"
        Response.Write "<tr class='tdbg'>"
        Response.Write "<td width='100' align='right'>欲购户型：</td>"
        Response.Write "<td width='200'>" & rs("HouseHuXing") & "</td>"
        Response.Write "<td width='100' align=right>房产面积：</td>"
        Response.Write "<td width='150'>" & "在" & rs("HouseMianJi1") & " - " & rs("HouseMianJi2") & "㎡之间</td>"
        Response.Write "</tr>"
        Response.Write "<tr class='tdbg'>"
        Response.Write "<td width='100' align='right'>期望楼层：</td>"
        Response.Write "<td width='200'>" & PE_HTMLEncode(rs("HouseLouCeng")) & " 主体朝" & rs("HouseChaoXiang") & "</td>"
        Response.Write "<td width='100' align=right>期望价格：</td>"
        Response.Write "<td width='150'>" & rs("HousePrice1") & " - " & rs("HousePrice2") & " " & rs("HousePriceType") & " 人民币，付款方式为" & rs("HouseZhiFu") & "</td>"
        Response.Write "</tr>"
        Response.Write "<tr class='tdbg'>"
        Response.Write "<td width='100' align='right'>期望设施：</td>"
        Response.Write "<td width='200'>" & rs("HouseJiChu") & "</td>"
        Response.Write "<td width='100' align=right>期望装修：</td>"
        Response.Write "<td width='150'>" & rs("HouseZhuangXiu") & "</td>"
        Response.Write "</tr>"
        Response.Write "<tr class='tdbg'>"
        Response.Write "<td width='100' align='right'>期望附近：</td>"
        Response.Write "<td colspan='3'>" & rs("HouseShiZheng") & "</td>"
        Response.Write "</tr>"
        Response.Write "<tr class='tdbg'>"
        Response.Write "<td width='100' align='right'>交房时间：</td>"
        Response.Write "<td colspan='3'>" & rs("JiaoFangStartDate") & "</td>"
        Response.Write "</tr>"
    Case 4
        Set rs = Conn.Execute("select * from PE_HouseQZ where HouseID=" & HouseID)
        Response.Write "    <td height='22' colspan='5'>您现在的位置：&nbsp;<a href=Admin_House.asp?ChannelID=" & ChannelID & "&Action=Manage&InfoType=QiuZhu><font color=red>" & ClassName & "</font>信息管理</a>&nbsp;&gt;&gt;&nbsp;" & PE_HTMLEncode(rs("HouseQuYu") & rs("HouseDiZhi")) & "</td>"
        Response.Write "</tr>"
        Response.Write "<tr class='tdbg'>"
        Response.Write "<td align='right' width='100'>欲租地址：</td>"
        Response.Write "<td colspan='3'>" & PE_HTMLEncode(rs("HouseQuYu") & rs("HouseDiZhi")) & "</td>"
        Response.Write "</tr>"
        Response.Write "<tr class='tdbg'>"
        Response.Write "<td width='100' align='right'>欲租户型：</td>"
        Response.Write "<td colspan='3'>" & rs("HouseHuXing") & " </td>"
        Response.Write "</tr>"
        Response.Write "<tr class='tdbg'>"
        Response.Write "<td width='100' align='right'>欲租面积：</td>"
        Response.Write "<td width='200'>" & rs("HouseHuXing") & "</td>"
        Response.Write "<td width='100' align=right>房产面积：</td>"
        Response.Write "<td width='150'>" & rs("HouseMianJi1") & " - " & rs("HouseMianJi2") & "㎡</td>"
        Response.Write "</tr>"
        Response.Write "<tr class='tdbg'>"
        Response.Write "<td width='100' align='right'>期望租金：</td>"
        Response.Write "<td width='200'>" & rs("HouseZuJin1") & " - " & rs("HouseZuJin2") & " " & rs("HouseZuJinType") & "</td>"
        Response.Write "<td width='100' align=right>支付方式：</td>"
        Response.Write "<td width='150'>" & rs("HouseZhiFu") & "一付</td>"
        Response.Write "</tr>"
        Response.Write "<tr class='tdbg'>"
        Response.Write "<td width='100' align='right'>期望楼层：</td>"
        Response.Write "<td width='200'>" & PE_HTMLEncode(rs("HouseLouCeng")) & "</td>"
        Response.Write "<td width='100' align=right>欲租物业：</td>"
        Response.Write "<td width='150'>" & rs("HouseLeiXing") & "</td>"
        Response.Write "</tr>"
        Response.Write "<tr class='tdbg'>"
        Response.Write "<td width='100' align='right'>期望设施：</td>"
        Response.Write "<td colspan='3'>" & rs("HouseJiChu") & "</td>"
        Response.Write "</tr>"
        Response.Write "<tr class='tdbg'>"
        Response.Write "<td width='100' align='right'>期望装修：</td>"
        Response.Write "<td colspan='3'>" & rs("HouseZhuangXiu") & "</td>"
        Response.Write "</tr>"
        Response.Write "<tr class='tdbg'>"
        Response.Write "<td width='100' align='right'>期望卫设：</td>"
        Response.Write "<td colspan='3'>" & rs("HouseWeiSheng") & "</td>"
        Response.Write "</tr>"
        Response.Write "<tr class='tdbg'>"
        Response.Write "<td width='100' align='right'>期望电器：</td>"
        Response.Write "<td colspan='3'>" & rs("HouseDianQi") & "</td>"
        Response.Write "</tr>"
        Response.Write "<tr class='tdbg'>"
        Response.Write "<td width='100' align='right'>期望家具：</td>"
        Response.Write "<td colspan='3'>" & rs("HouseJiaJu") & "</td>"
        Response.Write "</tr>"
        Response.Write "<tr class='tdbg'>"
        Response.Write "<td width='100' align='right'>期望管线：</td>"
        Response.Write "<td colspan='3'>" & rs("HouseXinXi") & "</td>"
        Response.Write "</tr>"
        Response.Write "</tr>"
        Response.Write "<tr class='tdbg'>"
        Response.Write "<td width='100' align='right'>期望附近：</td>"
        Response.Write "<td colspan='3'>" & rs("HouseShiZheng") & "</td>"
        Response.Write "</tr>"
        Response.Write "</tr>"
        Response.Write "<tr class='tdbg'>"
        Response.Write "<td width='100' align='right'>租赁时间：</td>"
        Response.Write "<td colspan='3'>" & rs("ZuLinStartDate") & "至" & rs("ZuLinEndDate") & "</td>"
        Response.Write "</tr>"
    Case 5
        Set rs = Conn.Execute("select * from PE_HouseHZ where HouseID=" & HouseID)
        Response.Write "<td height='22' colspan='5'>您现在的位置：&nbsp;<a href=Admin_House.asp?ChannelID=" & ChannelID & "&Action=Manage&InfoType=HeZhu><font color=red>" & ClassName & "</font>信息管理</a>&nbsp;&gt;&gt;&nbsp;" & PE_HTMLEncode(rs("HouseQuYu") & rs("HouseDiZhi")) & "</td>"
        Response.Write "</tr>"
        Response.Write "<tr class='tdbg'>"
        Response.Write "<td align='right' width='100'>房产地址：</td>"
        Response.Write "<td colspan='3'>" & PE_HTMLEncode(rs("HouseQuYu") & rs("HouseDiZhi")) & "</td>"
        Response.Write "</tr>"
        Response.Write "<tr class='tdbg'>"
        Response.Write "<td width='100' align='right'>详细地址：</td>"
        Response.Write "<td colspan='3'>" & PE_HTMLEncode(rs("HouseXiangXiDiZhi")) & " </td>"
        Response.Write "</tr>"
        Response.Write "<tr class='tdbg'>"
        Response.Write "<td width='100' align='right'>房屋户型：</td>"
        Response.Write "<td width='200'>" & rs("HouseHuXing") & "</td>"
        Response.Write "<td width='100' align=right>整体面积：</td>"
        Response.Write "<td width='150'>" & rs("HouseMianJi") & " ㎡</td>"
        Response.Write "</tr>"
        Response.Write "<tr class='tdbg'>"
        Response.Write "<td width='100' align='right'>独租部分：</td>"
        Response.Write "<td width='200'>" & rs("HouseHuXing1") & "</td>"
        Response.Write "<td width='100' align=right>独用面积：</td>"
        Response.Write "<td width='150'>" & rs("HouseMianJi1") & " ㎡</td>"
        Response.Write "</tr>"
        Response.Write "<tr class='tdbg'>"
        Response.Write "<td width='100' align='right'>共用部分：</td>"
        Response.Write "<td width='200'>" & rs("HouseHuXing2") & "</td>"
        Response.Write "<td width='100' align=right>共用面积：</td>"
        Response.Write "<td width='150'>" & rs("HouseMianJi2") & "</td>"
        Response.Write "</tr>"
        Response.Write "<tr class='tdbg'>"
        Response.Write "<td width='100' align='right'>所在楼层：</td>"
        Response.Write "<td width='200'>" & PE_HTMLEncode(rs("HouseLouCeng")) & "</td>"
        Response.Write "<td width='100' align=right>物业类型：</td>"
        Response.Write "<td width='150'>" & rs("HouseLeiXing") & "</td>"
        Response.Write "</tr>"
        Response.Write "<tr class='tdbg'>"
        Response.Write "<td width='100' align='right'>我的简介：</td>"
        Response.Write "<td colspan='3'>" & PE_HTMLEncode(rs("HouseJianJie")) & "</td>"
        Response.Write "</tr>"
        Response.Write "<tr class='tdbg'>"
        Response.Write "<td width='100' align='right'>要求室友：</td>"
        Response.Write "<td colspan='3'>" & PE_HTMLEncode(rs("HouseShiYou")) & "</td>"
        Response.Write "</tr>"
        Response.Write "<tr class='tdbg'>"
        Response.Write "<td width='100' align='right'>基础设施：</td>"
        Response.Write "<td colspan='3'>" & rs("HouseJiChu") & "</td>"
        Response.Write "</tr>"
        Response.Write "<tr class='tdbg'>"
        Response.Write "<td width='100' align='right'>装修程度：</td>"
        Response.Write "<td colspan='3'>" & rs("HouseZhuangXiu") & "</td>"
        Response.Write "</tr>"
        Response.Write "<tr class='tdbg'>"
        Response.Write "<td width='100' align='right'>卫生设施：</td>"
        Response.Write "<td colspan='3'>" & rs("HouseWeiSheng") & "</td>"
        Response.Write "</tr>"
        Response.Write "<tr class='tdbg'>"
        Response.Write "<td width='100' align='right'>电器设备：</td>"
        Response.Write "<td colspan='3'>" & rs("HouseDianQi") & "</td>"
        Response.Write "</tr>"
        Response.Write "<tr class='tdbg'>"
        Response.Write "<td width='100' align='right'>家具设施：</td>"
        Response.Write "<td colspan='3'>" & rs("HouseJiaJu") & "</td>"
        Response.Write "</tr>"
        Response.Write "<tr class='tdbg'>"
        Response.Write "<td width='100' align='right'>信息设施：</td>"
        Response.Write "<td colspan='3'>" & rs("HouseXinXi") & "</td>"
        Response.Write "</tr>"
        Response.Write "<tr class='tdbg'>"
        Response.Write "<td width='100' align='right'>公交线路：</td>"
        Response.Write "<td colspan='3'>" & rs("HouseGongJiaoLu") & " 路  " & rs("HouseGongJiaoZhan") & "站</td>"
        Response.Write "</tr>"
        Response.Write "<tr class='tdbg'>"
        Response.Write "<td width='100' align='right'>市政配套：</td>"
        Response.Write "<td colspan='3'>" & rs("HouseShiZheng") & "</td>"
        Response.Write "</tr>"
        Response.Write "<tr class='tdbg'>"
        Response.Write "<td width='100' align='right'>租赁时间：</td>"
        Response.Write "<td colspan='3'>" & rs("ZuLinStartDate") & "至" & rs("ZuLinEndDate") & "</td>"
        Response.Write "</tr>"
        Response.Write "<tr class='tdbg'>"
        Response.Write "<td width='100' align='right'>合租价格：</td>"
        Response.Write "<td colspan='3'>" & rs("HouseZuJin") & rs("HouseZuJinType") & "，支付方式:" & rs("HouseZhiFu") & "一付</td>"
        Response.Write "</tr>"

    End Select
    Response.Write "<tr class='tdbg'>"
    Response.Write "<td width='100' align='right'>联系人姓名：</td>"
    Response.Write "<td width='200'>" & PE_HTMLEncode(rs("ContactName")) & "</td>"
    Response.Write "<td width='100' align=right>联系人电话：</td>"
    Response.Write "<td width='150'>" & PE_HTMLEncode(rs("ContactPhone")) & "</td>"
    Response.Write "</tr>"
    Response.Write "<tr class='tdbg'>"
    Response.Write "<td width='100' align='right'>联系人Email：</td>"
    Response.Write "<td width='200'>" & PE_HTMLEncode(rs("ContactEmail")) & "</td>"
    Response.Write "<td width='100' align=right>联系人QQ号：</td>"
    Response.Write "<td width='150'>" & PE_HTMLEncode(rs("ContactQQ")) & "</td>"
    Response.Write "</tr>"
    Response.Write "<tr class='tdbg'>"
    Response.Write "<td width='100' align='right'>关 键 字：</td>"
    Response.Write "<td width='200'>" & Mid(rs("Keyword"), 2, Len(rs("Keyword")) - 2) & "</td>"
    Response.Write "<td width='100' align=right>本信息有效期：</td>"
    Response.Write "<td width='150'>" & rs("YouXiaoQi") & "</td>"
    Response.Write "</tr>"
    Response.Write "<tr class='tdbg'>"
    Response.Write "<td align='right'>房产其它说明： </td>"
    Response.Write "<td colspan='4'>" & rs("HouseQiTa") & "</td>"
    Response.Write "</tr>"
    Response.Write "<tr class='tdbg'>"
    Response.Write "<td colspan='5' align='center'>"
    Response.Write "<font color=blue><b>可用操作：</b></font>"
    If rs("Editor") = UserName Then
        Response.Write "<a href=User_House.asp?ChannelID=" & ChannelID & "&Action=Modify&ClassID=" & ClassID & "&HouseID=" & rs("HouseID") & ">修改</a>&nbsp;&nbsp;"
    End If
    If rs("Editor") = UserName And rs("Passed") = True Then
        Response.Write "<a href='User_House.asp?ChannelID=" & ChannelID & "&Action=SetNew&ClassID=" & ClassID & "&HouseID=" & rs("HouseID") & "' onclick=""return confirm('此信息将被提升" & DateDiff("D", rs("UpdateTime"), Now()) & "天，每提升一天将扣除您" & UpgradePoint & "点,您确定要提升吗？')"">提升</a>&nbsp;"
    End If
    Response.Write "<a href=User_House.asp?ChannelID=" & ChannelID & "&ClassID=" & ClassID & "&Action=Del&HouseID=" & rs("HouseID") & " onclick=""return confirm('确定要删除此" & ChannelShortName & "信息吗？删除后你还可以从回收站中还原。');"">删除</a>&nbsp;&nbsp;"
    Response.Write "    </td>"
    Response.Write "</tr>"
    Response.Write "</TABLE>"
End Sub

Function GetAreaList_Option()
    Dim strAreaList, sql, rsAreaList
    Set rsAreaList = Server.CreateObject("adodb.recordset")
    sql = "select AreaName from PE_HouseArea"
    rsAreaList.Open sql, Conn, 1, 3
    If rsAreaList.EOF Then
        strAreaList = ""
    Else
        Do While Not rsAreaList.EOF
            strAreaList = strAreaList & "<option value=" & rsAreaList(0) & ">" & rsAreaList(0) & "</option>"
            rsAreaList.MoveNext
        Loop
    End If
    GetAreaList_Option = strAreaList

End Function

Function GetAreaList_Option1(AreaName)
    Dim strAreaList, sql, rsAreaList
    Set rsAreaList = Server.CreateObject("adodb.recordset")
    sql = "select AreaName from PE_HouseArea"
    rsAreaList.Open sql, Conn, 1, 3
    If rsAreaList.EOF Then
        strAreaList = ""
    Else
        Do While Not rsAreaList.EOF
            If rsAreaList(0) = AreaName Then
                strAreaList = strAreaList & "<option value=" & rsAreaList(0) & " Selected>" & rsAreaList(0) & "</option>"
            Else
                strAreaList = strAreaList & "<option value=" & rsAreaList(0) & ">" & rsAreaList(0) & "</option>"
            End If
            rsAreaList.MoveNext
        Loop
    End If
    GetAreaList_Option1 = strAreaList

End Function

Sub Del()
    HouseID = Trim(Request("HouseID"))
    If IsValidID(HouseID) = False Then
        HouseID = ""
    End If
    If HouseID = "" Then
        FoundErr = True
        ErrMsg = ErrMsg & "<li>请先选定" & ChannelShortName & "！</li>"
        Exit Sub
    End If

    Dim sqlDel, rsDel, NeedUpdateCache
    NeedUpdateCache = False

    sqlDel = "select * from " & HouseTableName & " where Editor='" & UserName & "' and Deleted=" & PE_False & " and "
    If InStr(HouseID, ",") > 0 Then
        sqlDel = sqlDel & " HouseID in (" & HouseID & ") order by HouseID"
    Else
        sqlDel = sqlDel & " HouseID=" & HouseID
    End If
    Set rsDel = Server.CreateObject("ADODB.Recordset")
    rsDel.Open sqlDel, Conn, 1, 3
    ClassID = rsDel("ClassID")
    Do While Not rsDel.EOF
        If rsDel("Passed") = True Then
            Conn.Execute ("update PE_User set PostItems=PostItems-1,PassedItems=PassedItems-1 where UserName='" & UserName & "'")
            Conn.Execute ("update PE_Channel set ItemCount=ItemCount-1,ItemChecked=ItemChecked-1 where ChannelID=" & ChannelID & "")
            Conn.Execute ("update PE_HouseConfig set ItemCount=ItemCount-1 where ClassID=" & rsDel("ClassID") & "")
            rsDel("Deleted") = True
            rsDel.Update
            NeedUpdateCache = True
        Else
            Conn.Execute ("update PE_Channel set ItemCount=ItemCount-1 where ChannelID=" & ChannelID & "")
            Conn.Execute ("update PE_User set PostItems=PostItems-1 where UserName='" & UserName & "'")
            rsDel("Deleted") = True
            rsDel.Update
        End If
        rsDel.MoveNext
    Loop
    rsDel.Close
    Set rsDel = Nothing
    
    If NeedUpdateCache = True Then
        Call CreateAllJS
        Call ClearSiteCache(0)
    End If

    If FoundErr = False Then
        Call CloseConn
        Response.Redirect "User_House.asp?ChannelID=" & ChannelID & "&Action=Manage&ClassID=" & ClassID & ""
    End If
End Sub

Sub ShowJS_House()
    Response.Write "<script language = 'JavaScript'>"
    Response.Write "function CheckFormChuShou()"
    Response.Write "{"
    Response.Write "  document.myform.HouseQiTa.value=editor.HtmlEdit.document.body.innerHTML; " & vbCrLf
    Response.Write "if (document.myform.HouseDiZhi.value=='')"
    Response.Write "{"
    Response.Write "    ShowTabs(0);" & vbCrLf
    Response.Write "alert('房产地址不能为空！');"
    Response.Write "document.myform.HouseDiZhi.focus();"
    Response.Write "return false;"
    Response.Write "}"
    Response.Write "if (document.myform.HouseMianJi.value=='')"
    Response.Write "{"
    Response.Write "    ShowTabs(0);" & vbCrLf
    Response.Write "alert('房产面积不能为空！');"
    Response.Write "document.myform.HouseMianJi.focus();"
    Response.Write "return false;"
    Response.Write "}"
    Response.Write "if (document.myform.TotalPrice.value=='')"
    Response.Write "{"
    Response.Write "    ShowTabs(0);" & vbCrLf
    Response.Write "alert('房产总价不能为空！');"
    Response.Write "document.myform.TotalPrice.focus();"
    Response.Write "return false;"
    Response.Write "}"
    Response.Write "if (document.myform.ContactPhone.value=='')"
    Response.Write "{"
    Response.Write "    ShowTabs(1);" & vbCrLf
    Response.Write "alert('联系人电话不能为空！');"
    Response.Write "document.myform.ContactPhone.focus();"
    Response.Write "return false;"
    Response.Write "}"
    Response.Write "if (document.myform.ContactName.value=='')"
    Response.Write "{"
    Response.Write "    ShowTabs(1);" & vbCrLf
    Response.Write "alert('联系人姓名不能为空！');"
    Response.Write "document.myform.ContactName.focus();"
    Response.Write "return false;"
    Response.Write "}"
    Response.Write "var CurrentMode=editor.CurrentMode;" & vbCrLf
    Response.Write "if (CurrentMode==0){" & vbCrLf
    Response.Write "    document.myform.HouseQiTa.value=editor.HtmlEdit.document.body.innerHTML; " & vbCrLf
    Response.Write "}" & vbCrLf
    Response.Write "else if(CurrentMode==1){" & vbCrLf
    Response.Write "    document.myform.HouseQiTa.value=editor.HtmlEdit.document.body.innerText;" & vbCrLf
    Response.Write "}" & vbCrLf
    Response.Write "if (document.myform.Keyword.value=='')"
    Response.Write "{"
    Response.Write "    ShowTabs(0);" & vbCrLf
    Response.Write "alert('关键字不能为空！');"
    Response.Write "document.myform.Keyword.focus();"
    Response.Write "return false;"
    Response.Write "}"
    Response.Write "}"
    Response.Write "function CheckFormQiuGou()"
    Response.Write "{"
    Response.Write "  document.myform.HouseQiTa.value=editor.HtmlEdit.document.body.innerHTML; " & vbCrLf
    Response.Write "if (document.myform.HouseDiZhi.value=='')"
    Response.Write "{"
    Response.Write "    ShowTabs(0);" & vbCrLf
    Response.Write "alert('房产地址不能为空！');"
    Response.Write "document.myform.HouseDiZhi.focus();"
    Response.Write "return false;"
    Response.Write "}"
    Response.Write "if (document.myform.HouseMianJi1.value=='')"
    Response.Write "{"
    Response.Write "    ShowTabs(0);" & vbCrLf
    Response.Write "alert('房产面积不能为空！');"
    Response.Write "document.myform.HouseMianJi1.focus();"
    Response.Write "return false;"
    Response.Write "}"
    Response.Write "if (document.myform.HouseMianJi2.value=='')"
    Response.Write "{"
    Response.Write "    ShowTabs(0);" & vbCrLf
    Response.Write "alert('房产面积不能为空！');"
    Response.Write "document.myform.HouseMianJi2.focus();"
    Response.Write "return false;"
    Response.Write "}"
    Response.Write "if (document.myform.HousePrice1.value=='')"
    Response.Write "{"
    Response.Write "    ShowTabs(0);" & vbCrLf
    Response.Write "alert('房产价格不能为空！');"
    Response.Write "document.myform.HousePrice1.focus();"
    Response.Write "return false;"
    Response.Write "}"
    Response.Write "if (document.myform.HousePrice2.value=='')"
    Response.Write "{"
    Response.Write "    ShowTabs(0);" & vbCrLf
    Response.Write "alert('房产价格不能为空！');"
    Response.Write "document.myform.HousePrice2.focus();"
    Response.Write "return false;"
    Response.Write "}"
    Response.Write "if (document.myform.ContactPhone.value=='')"
    Response.Write "{"
    Response.Write "    ShowTabs(1);" & vbCrLf
    Response.Write "alert('联系人电话不能为空！');"
    Response.Write "document.myform.ContactPhone.focus();"
    Response.Write "return false;"
    Response.Write "}"
    Response.Write "if (document.myform.ContactName.value=='')"
    Response.Write "{"
    Response.Write "    ShowTabs(1);" & vbCrLf
    Response.Write "alert('联系人姓名不能为空！');"
    Response.Write "document.myform.ContactName.focus();"
    Response.Write "return false;"
    Response.Write "}"
    Response.Write "var CurrentMode=editor.CurrentMode;" & vbCrLf
    Response.Write "if (CurrentMode==0){" & vbCrLf
    Response.Write "    document.myform.HouseQiTa.value=editor.HtmlEdit.document.body.innerHTML; " & vbCrLf
    Response.Write "}" & vbCrLf
    Response.Write "else if(CurrentMode==1){" & vbCrLf
    Response.Write "    document.myform.HouseQiTa.value=editor.HtmlEdit.document.body.innerText;" & vbCrLf
    Response.Write "}" & vbCrLf
    Response.Write "if (document.myform.Keyword.value=='')"
    Response.Write "{"
    Response.Write "    ShowTabs(0);" & vbCrLf
    Response.Write "alert('关键字不能为空！');"
    Response.Write "document.myform.Keyword.focus();"
    Response.Write "return false;"
    Response.Write "}"
    Response.Write "}"
    Response.Write "function CheckFormChuZhu()"
    Response.Write "{"
    Response.Write "  document.myform.HouseQiTa.value=editor.HtmlEdit.document.body.innerHTML; " & vbCrLf
    Response.Write "if (document.myform.HouseDiZhi.value=='')"
    Response.Write "{"
    Response.Write "    ShowTabs(0);" & vbCrLf
    Response.Write "alert('房产地址不能为空！');"
    Response.Write "document.myform.HouseDiZhi.focus();"
    Response.Write "return false;"
    Response.Write "}"
    Response.Write "if (document.myform.HouseMianJi.value=='')"
    Response.Write "{"
    Response.Write "    ShowTabs(0);" & vbCrLf
    Response.Write "alert('房产面积不能为空！');"
    Response.Write "document.myform.HouseMianJi.focus();"
    Response.Write "return false;"
    Response.Write "}"
    Response.Write "if (document.myform.HouseZuJin.value=='' && document.myform.HouseZuJinType.value!='价格面议')"
    Response.Write "{"
    Response.Write "    ShowTabs(0);" & vbCrLf
    Response.Write "alert('租金不能为空！');"
    Response.Write "document.myform.HouseZuJin.focus();"
    Response.Write "return false;"
    Response.Write "}"
    Response.Write "if (document.myform.ContactPhone.value=='')"
    Response.Write "{"
    Response.Write "    ShowTabs(1);" & vbCrLf
    Response.Write "alert('联系人电话不能为空！');"
    Response.Write "document.myform.ContactPhone.focus();"
    Response.Write "return false;"
    Response.Write "}"
    Response.Write "if (document.myform.ContactName.value=='')"
    Response.Write "{"
    Response.Write "    ShowTabs(1);" & vbCrLf
    Response.Write "alert('联系人姓名不能为空！');"
    Response.Write "document.myform.ContactName.focus();"
    Response.Write "return false;"
    Response.Write "}"
    Response.Write "var CurrentMode=editor.CurrentMode;" & vbCrLf
    Response.Write "if (CurrentMode==0){" & vbCrLf
    Response.Write "    document.myform.HouseQiTa.value=editor.HtmlEdit.document.body.innerHTML; " & vbCrLf
    Response.Write "}" & vbCrLf
    Response.Write "else if(CurrentMode==1){" & vbCrLf
    Response.Write "    document.myform.HouseQiTa.value=editor.HtmlEdit.document.body.innerText;" & vbCrLf
    Response.Write "}" & vbCrLf
    Response.Write "if (document.myform.Keyword.value=='')"
    Response.Write "{"
    Response.Write "    ShowTabs(0);" & vbCrLf
    Response.Write "alert('关键字不能为空！');"
    Response.Write "document.myform.Keyword.focus();"
    Response.Write "return false;"
    Response.Write "}"
    Response.Write "}"
    Response.Write "function CheckFormQiuZhu()"
    Response.Write "{"
    Response.Write "  document.myform.HouseQiTa.value=editor.HtmlEdit.document.body.innerHTML; " & vbCrLf
    Response.Write "if (document.myform.HouseDiZhi.value=='')"
    Response.Write "{"
    Response.Write "    ShowTabs(0);" & vbCrLf
    Response.Write "alert('欲租地址不能为空！');"
    Response.Write "document.myform.HouseDiZhi.focus();"
    Response.Write "return false;"
    Response.Write "}"
    Response.Write "if (document.myform.HouseMianJi1.value=='')"
    Response.Write "{"
    Response.Write "    ShowTabs(0);" & vbCrLf
    Response.Write "alert('欲租面积不能为空！');"
    Response.Write "document.myform.HouseMianJi1.focus();"
    Response.Write "return false;"
    Response.Write "}"
    Response.Write "if (document.myform.HouseMianJi2.value=='')"
    Response.Write "{"
    Response.Write "    ShowTabs(0);" & vbCrLf
    Response.Write "alert('欲租面积不能为空！');"
    Response.Write "document.myform.HouseMianJi2.focus();"
    Response.Write "return false;"
    Response.Write "}"
    Response.Write "if (document.myform.HouseZuJin1.value=='' && document.myform.HouseZuJinType.value!='价格面议')"
    Response.Write "{"
    Response.Write "    ShowTabs(0);" & vbCrLf
    Response.Write "alert('期望租金不能为空！');"
    Response.Write "document.myform.HouseZuJin1.focus();"
    Response.Write "return false;"
    Response.Write "}"
    Response.Write "if (document.myform.HouseZuJin2.value=='' && document.myform.HouseZuJinType.value!='价格面议')"
    Response.Write "{"
    Response.Write "    ShowTabs(0);" & vbCrLf
    Response.Write "alert('期望租金不能为空！');"
    Response.Write "document.myform.HouseZuJin2.focus();"
    Response.Write "return false;"
    Response.Write "}"
    Response.Write "if (document.myform.ContactPhone.value=='')"
    Response.Write "{"
    Response.Write "    ShowTabs(1);" & vbCrLf
    Response.Write "alert('联系人电话不能为空！');"
    Response.Write "document.myform.ContactPhone.focus();"
    Response.Write "return false;"
    Response.Write "}"
    Response.Write "if (document.myform.ContactName.value=='')"
    Response.Write "{"
    Response.Write "    ShowTabs(1);" & vbCrLf
    Response.Write "alert('联系人姓名不能为空！');"
    Response.Write "document.myform.ContactName.focus();"
    Response.Write "return false;"
    Response.Write "}"
    Response.Write "var CurrentMode=editor.CurrentMode;" & vbCrLf
    Response.Write "if (CurrentMode==0){" & vbCrLf
    Response.Write "    document.myform.HouseQiTa.value=editor.HtmlEdit.document.body.innerHTML; " & vbCrLf
    Response.Write "}" & vbCrLf
    Response.Write "else if(CurrentMode==1){" & vbCrLf
    Response.Write "    document.myform.HouseQiTa.value=editor.HtmlEdit.document.body.innerText;" & vbCrLf
    Response.Write "}" & vbCrLf
    Response.Write "if (document.myform.Keyword.value=='')"
    Response.Write "{"
    Response.Write "    ShowTabs(0);" & vbCrLf
    Response.Write "alert('关键字不能为空！');"
    Response.Write "document.myform.Keyword.focus();"
    Response.Write "return false;"
    Response.Write "}"
    Response.Write "}"
    Response.Write "function CheckFormHeZhu()"
    Response.Write "{"
    Response.Write "  document.myform.HouseQiTa.value=editor.HtmlEdit.document.body.innerHTML; " & vbCrLf
    Response.Write "if (document.myform.HouseDiZhi.value=='')"
    Response.Write "{"
    Response.Write "    ShowTabs(0);" & vbCrLf
    Response.Write "alert('房产地址不能为空！');"
    Response.Write "document.myform.HouseDiZhi.focus();"
    Response.Write "return false;"
    Response.Write "}"
    Response.Write "if (document.myform.HouseMianJi.value=='')"
    Response.Write "{"
    Response.Write "    ShowTabs(0);" & vbCrLf
    Response.Write "alert('整体面积不能为空！');"
    Response.Write "document.myform.HouseMianJi.focus();"
    Response.Write "return false;"
    Response.Write "}"
    Response.Write "if (document.myform.HouseHuXing1.value==0)"
    Response.Write "{"
    Response.Write "    ShowTabs(0);" & vbCrLf
    Response.Write "alert('房屋户型不能为空！');"
    Response.Write "document.myform.HouseHuXing1.focus();"
    Response.Write "return false;"
    Response.Write "}"
    Response.Write "if (document.myform.HouseHuXing11.value==0)"
    Response.Write "{"
    Response.Write "    ShowTabs(0);" & vbCrLf
    Response.Write "alert('分租部分不能为空！');"
    Response.Write "document.myform.HouseHuXing11.focus();"
    Response.Write "return false;"
    Response.Write "}"
    Response.Write "if (document.myform.HouseHuXing21.value==0)"
    Response.Write "{"
    Response.Write "    ShowTabs(0);" & vbCrLf
    Response.Write "alert('共用部分不能为空！');"
    Response.Write "document.myform.HouseHuXing21.focus();"
    Response.Write "return false;"
    Response.Write "}"
    Response.Write "if (document.myform.HouseZuJin.value=='' && document.myform.HouseZuJinType.value!='价格面议')"
    Response.Write "{"
    Response.Write "    ShowTabs(0);" & vbCrLf
    Response.Write "alert('租金不能为空！');"
    Response.Write "document.myform.HouseZuJin.focus();"
    Response.Write "return false;"
    Response.Write "}"
    Response.Write "if (document.myform.ContactPhone.value=='')"
    Response.Write "{"
    Response.Write "    ShowTabs(1);" & vbCrLf
    Response.Write "alert('联系人电话不能为空！');"
    Response.Write "document.myform.ContactPhone.focus();"
    Response.Write "return false;"
    Response.Write "}"
    Response.Write "var CurrentMode=editor.CurrentMode;" & vbCrLf
    Response.Write "if (CurrentMode==0){" & vbCrLf
    Response.Write "    document.myform.HouseQiTa.value=editor.HtmlEdit.document.body.innerHTML; " & vbCrLf
    Response.Write "}" & vbCrLf
    Response.Write "else if(CurrentMode==1){" & vbCrLf
    Response.Write "    document.myform.HouseQiTa.value=editor.HtmlEdit.document.body.innerText;" & vbCrLf
    Response.Write "}" & vbCrLf
    Response.Write "if (document.myform.ContactName.value=='')"
    Response.Write "{"
    Response.Write "    ShowTabs(1);" & vbCrLf
    Response.Write "alert('联系人姓名不能为空！');"
    Response.Write "document.myform.ContactName.focus();"
    Response.Write "return false;"
    Response.Write "}"
    Response.Write "if (document.myform.Keyword.value=='')"
    Response.Write "{"
    Response.Write "    ShowTabs(0);" & vbCrLf
    Response.Write "alert('关键字不能为空！');"
    Response.Write "document.myform.Keyword.focus();"
    Response.Write "return false;"
    Response.Write "}"
    Response.Write "}"

    Response.Write "function change_it()"
    Response.Write "{ "
    Response.Write "document.myform.Keyword.value=document.myform.HouseHuXing1.value+'室'+document.myform.HouseHuXing2.value+'厅';"
    Response.Write "} "

    Response.Write "var tID=0;" & vbCrLf
    Response.Write "function ShowTabs(ID){" & vbCrLf
    Response.Write "  if(ID!=tID){" & vbCrLf
    Response.Write "    TabTitle[tID].className='title5';" & vbCrLf
    Response.Write "    TabTitle[ID].className='title6';" & vbCrLf
    Response.Write "    Tabs[tID].style.display='none';" & vbCrLf
    Response.Write "    Tabs[ID].style.display='';" & vbCrLf
    Response.Write "    tID=ID;" & vbCrLf
    Response.Write "    if(ID==2){" & vbCrLf
    Response.Write "  editor.yToolbarsCss();" & vbCrLf
    Response.Write "}" & vbCrLf
    Response.Write "  }" & vbCrLf
    Response.Write "}" & vbCrLf
    
    Response.Write "function change_value(ID)"
    Response.Write "{ " & vbCrLf
    Response.Write "if (document.myform.HouseZuJinType.value=='价格面议')" & vbCrLf
    Response.Write "  { " & vbCrLf
    Response.Write "  if(ID==0)" & vbCrLf
    Response.Write "   {" & vbCrLf
    Response.Write "       document.myform.HouseZuJin.disabled=true;" & vbCrLf
    Response.Write "   }" & vbCrLf
    Response.Write "  else if(ID==1)" & vbCrLf
    Response.Write "   {" & vbCrLf
    Response.Write "       document.myform.HouseZuJin1.disabled=true;" & vbCrLf
    Response.Write "       document.myform.HouseZuJin2.disabled=true;" & vbCrLf
    Response.Write "   }" & vbCrLf
    Response.Write "  }" & vbCrLf
    Response.Write "else" & vbCrLf
    Response.Write "  { " & vbCrLf
    Response.Write "  if(ID==0)" & vbCrLf
    Response.Write "   {" & vbCrLf
    Response.Write "       document.myform.HouseZuJin.disabled=false;" & vbCrLf
    Response.Write "   }" & vbCrLf
    Response.Write "  else if(ID==1)" & vbCrLf
    Response.Write "   {" & vbCrLf
    Response.Write "       document.myform.HouseZuJin1.disabled=false;" & vbCrLf
    Response.Write "       document.myform.HouseZuJin2.disabled=false;" & vbCrLf
    Response.Write "   }" & vbCrLf
    Response.Write "  }" & vbCrLf
    Response.Write "}" & vbCrLf
    Response.Write "</script>"
End Sub

Function GetOpenType_Option(OpenType)
    Dim strOpenType
    strOpenType = "<option value='0'"
    If OpenType = 0 Then
        strOpenType = strOpenType & " selected"
    End If
    strOpenType = strOpenType & ">" & "在原窗口打开</option><option value='1'"
    If OpenType = 1 Then
        strOpenType = strOpenType & " selected"
    End If
    strOpenType = strOpenType & ">" & "在新窗口打开</option>"
    GetOpenType_Option = strOpenType
End Function

Sub SetProperty()
    HouseID = Trim(Request("HouseID"))
    If IsValidID(HouseID) = False Then
        HouseID = ""
    End If
    If HouseID = "" Then
        FoundErr = True
        ErrMsg = ErrMsg & "<li>请先选定" & ChannelShortName & "！</li>"
        Exit Sub
    End If
   
    Dim sqlProperty, rsProperty, rsUser
    If InStr(HouseID, ",") > 0 Then
        sqlProperty = "select * from " & HouseTableName & " where HouseID in (" & HouseID & ")"
    Else
        sqlProperty = "select * from " & HouseTableName & " where HouseID=" & HouseID
    End If
    Set rsProperty = Server.CreateObject("ADODB.Recordset")
    rsProperty.Open sqlProperty, Conn, 1, 3
    Select Case Action
    Case "SetNew"
        If UpgradePoint <> 0 Then
            Set rsUser = Conn.Execute("select UserPoint from PE_User where UserName='" & UserName & "'")
            If rsUser(0) < UpgradePoint Then
                FoundErr = True
                ErrMsg = "<br>&nbsp;&nbsp;&nbsp;&nbsp;对不起，您的点数不够，请及时充值 ！"
                rsUser.Close
                Set rsUser = Nothing
                Exit Sub
            End If
            rsUser.Close
            Set rsUser = Nothing
        End If
        If UpgradePoint <> 0 Then
            Conn.Execute ("Update PE_User set UserPoint=UserPoint-" & DateDiff("D", rsProperty("UpdateTime"), Now()) * UpgradePoint & " where UserName='" & UserName & "'")
            Call AddConsumeLog("System", ModuleType, UserName, HouseID, DateDiff("D", rsProperty("UpdateTime"), Now()) * UpgradePoint, 2, "用于提升" & ClassName & "信息")
        End If
        rsProperty("UpdateTime") = Now()
    End Select
    rsProperty.Update
    rsProperty.Close
    Set rsProperty = Nothing
    'Call CreateAllJS
    Call ClearSiteCache(0)
    If FoundErr = False Then
        Call CloseConn
        Response.Redirect ComeUrl
    End If
End Sub
'*******************************
'函数名：CheckUserPoint
'作用：判断用户是否够点来发布或者推荐信息
'变量：IsElite---是否推荐；CommendClassDays---推荐天数；IsDeduction---是否扣点
'*******************************
Function CheckUserPoint(IsElite, CommendClassDays)
    Dim rsUser
    CheckUserPoint = True
    Set rsUser = Conn.Execute("select UserPoint from PE_User where UserName='" & UserName & "'")
    If Action = "SaveAdd" Then
        If ReleaseDeductPoint <> 0 Then
            If rsUser(0) < ReleaseDeductPoint Then
                FoundErr = True
                CheckUserPoint = False
            Else
                DeductionPoint = ReleaseDeductPoint
                IsDeduction = True
            End If
        End If
        If ReleaseDeductPoint <> 0 And CommendClassPoint <> 0 And IsElite = "yes" And CommendClassDays <> 0 Then
            '判断是否够点来推荐一条信息
            If rsUser(0) < ReleaseDeductPoint + CommendClassDays * CommendClassPoint Then
                FoundErr = True
                CheckUserPoint = False
            Else
                DeductionPoint = ReleaseDeductPoint + CommendClassDays * CommendClassPoint
                IsDeduction = True
            End If
        End If
        If ReleaseDeductPoint = 0 And CommendClassPoint <> 0 And IsElite = "yes" And CommendClassDays <> 0 Then
            If rsUser(0) < CommendClassDays * CommendClassPoint Then
                FoundErr = True
                CheckUserPoint = False
            Else
                DeductionPoint = CommendClassDays * CommendClassPoint
                IsDeduction = True
            End If
        End If
    End If
    If Action = "SaveModify" Then
        If CommendClassPoint <> 0 And IsElite = "yes" And CommendClassDays <> 0 Then
            If rsUser(0) < CommendClassDays * CommendClassPoint Then
                FoundErr = True
                CheckUserPoint = False
            Else
                DeductionPoint = CommendClassDays * CommendClassPoint
                IsDeduction = True
            End If
        End If
    End If
    rsUser.Close
    Set rsUser = Nothing
    If FoundErr = True Then
        ErrMsg = "<br>&nbsp;&nbsp;&nbsp;&nbsp;对不起，您的点数不够，请及时充值 ！"
    End If
End Function
'************************************************
'过程名：DeductPoint
'作用：扣除用户点数
'************************************************
Sub DeductPoint(IsElite, HouseDiZhi)
    Conn.Execute ("Update PE_User set UserPoint=UserPoint-" & DeductionPoint & " where UserName='" & UserName & "'")
    If Action = "SaveAdd" Then
        If IsElite = "yes" Then
            Call AddConsumeLog("System", ModuleType, UserName, PE_CLng(HouseID), DeductionPoint, 2, "用于发表以及推荐" & ClassName & "信息：" & HouseDiZhi)
        Else
            Call AddConsumeLog("System", ModuleType, UserName, PE_CLng(HouseID), DeductionPoint, 2, "用于发表" & ClassName & "信息：" & HouseDiZhi)
        End If
    Else
        Call AddConsumeLog("System", ModuleType, UserName, PE_CLng(HouseID), DeductionPoint, 2, "用于推荐" & ClassName & "信息：" & HouseDiZhi)
    End If
End Sub

Sub ExportHouseHuXingStr(HuXingName)
    Dim i
    Response.Write "<tr class='tdbg'>"
    If HuXingName = "HouseHuXing1" Then
        Response.Write "<td width='120' align='right'><strong>分租部分：</strong></td>"
    End If
    If HuXingName = "HouseHuXing2" Then
        Response.Write "<td width='120' align='right'><strong>共用部分：</strong></td>"
    End If
    If HuXingName = "HouseHuXing" Then
        Response.Write "<td width='120' align='right'><strong>房屋户型：</strong></td>"
    End If
    Response.Write "<td width=300>"
    Response.Write "<select name='" & HuXingName & "1' onChange='change_it()'>"
    For i = 0 To 9
        Response.Write "<option value=" & i & ">" & i & "</option>"
    Next
    Response.Write "<option value='多'>多</option>"
                  
    Response.Write "</select>室"
    Response.Write "<select name='" & HuXingName & "2' onChange='change_it()'>"
    For i = 0 To 5
        Response.Write "<option value=" & i & ">" & i & "</option>"
    Next
    Response.Write "<option value='大'>大</option>"
    Response.Write "</select>厅"
    Response.Write "<select name='" & HuXingName & "3' onChange='change_it()'>"
    For i = 0 To 5
        Response.Write "<option value=" & i & ">" & i & "</option>"
    Next
    Response.Write "</select>卫"
    Response.Write "<select name='" & HuXingName & "4' onChange='change_it()'>"
    For i = 0 To 5
        Response.Write "<option value=" & i & ">" & i & "</option>"
    Next
    Response.Write "</select>厨"
    Response.Write "<select name='" & HuXingName & "5' onChange='change_it()'>"
    For i = 0 To 5
        Response.Write "<option value=" & i & ">" & i & "</option>"
    Next
    Response.Write "</select>阳台"
    Response.Write "<font color='#FF0000'>*</font></td>"
End Sub

Sub ExportHouseLouCengStr()
    Response.Write "<tr class='tdbg'>"
    If ClassID = 3 Then
        Response.Write "<td width='120' align='right'><strong>欲住楼层：</strong></td>"
        Response.Write "<td colspan='2'>"
    Else
        Response.Write "<td width='120' align='right'><strong>所在楼层：</strong></td>"
        Response.Write "<td >"
    End If
    Response.Write "<input type='text' name='HouseLouCeng1' maxlength='3' size='2'>层，共<input type='text' name='HouseLouCeng2' maxlength='3' size='2'>层 "
    Response.Write "<input name='HouseLouCeng3' type='checkbox' value='有架空层'>有架空层"
    Response.Write "<input name='HouseLouCeng3' type='checkbox' value='有隔热层'>有隔热层"
    If ClassID = 3 Then
        Response.Write "&nbsp;&nbsp;主体朝向：<select name='HouseChaoXiang'>"
        Response.Write "<option value=''></option>"
        Response.Write "<option value='东'>东</option>"
        Response.Write "<option value='南'>南</option>"
        Response.Write "<option value='西'>西</option>"
        Response.Write "<option value='北'>北</option>"
        Response.Write "</select>"
    End If
    Response.Write "</td>"
End Sub

Sub ExportHouseLeiXingStr()
    If ClassID <> 3 Then
        Response.Write "<td width='348'><strong>物业类型：</strong> "
    End If
    Response.Write "<select name='HouseLeiXing'>"
    Response.Write "<option value=''></option>"
    Response.Write "<option value='多层住宅'>多层住宅</option>"
    Response.Write "<option value='高层住宅'>高层住宅</option>"
    Response.Write "<option value='公寓住房'>公寓住房</option>"
    Response.Write "<option value='排屋'>排屋</option>"
    Response.Write "<option value='别墅'>别墅</option>"
    Response.Write "<option value='商铺'>商铺</option>"
    Response.Write "<option value='写字楼'>写字楼</option>"
    Response.Write "<option value='商住两用'>商住两用</option>"
    Response.Write "<option value='仓库'>仓库</option>"
    Response.Write "<option value='厂房'>厂房</option>"
    Response.Write "</select>"
    Response.Write "</td>"
    If ClassID <> 3 Then
        Response.Write "</tr>"
    End If
End Sub

Sub ExportHouseChaoXiangStr(ChaoXiangName)
    Response.Write "<select name='" & ChaoXiangName & "'>"
    Response.Write "<option value=''></option>"
    Response.Write "<option value='北窗'>北窗</option>"
    Response.Write "<option value='南窗'>南窗</option>"
    Response.Write "<option value='东窗'>东窗</option>"
    Response.Write "<option value='西窗'>西窗</option>"
    Response.Write "<option value='无窗'>无窗</option>"
    Response.Write "</select>，"
End Sub

Sub ExportHouseJiChuStr()
    Response.Write "<tr class='tdbg'>"
    If ClassID = 3 Or ClassID = 4 Then
        Response.Write "<td width='120' align='right'><strong>期望设施：</strong></td>"
    Else
        Response.Write "<td width='120' align='right'><strong>基础设施：</strong></td>"
    End If
    Response.Write "<td colspan='2' >"
    Response.Write "<input name='HouseJiChu' type='checkbox' value='电梯'>电梯，"
    Response.Write "<input name='HouseJiChu' type='checkbox' value='汽车库'>汽车库，"
    Response.Write "<input name='HouseJiChu' type='checkbox' value='汽车位'>汽车位，"
    Response.Write "<input name='HouseJiChu' type='checkbox' value='一户电表'>一户电表，"
    Response.Write "<input name='HouseJiChu' type='checkbox' value='三相电力'>三相电力，"
    Response.Write "<input name='HouseJiChu' type='checkbox' value='一户水表'>一户水表，"
    Response.Write "<input name='HouseJiChu' type='checkbox' value='管道燃气'>管道燃气，"
    Response.Write "<input name='HouseJiChu' type='checkbox' value='集中供热'>集中供热"
    Response.Write "</td>"
    Response.Write "</tr>"
End Sub

Sub ExportHouseDianQiStr()
    Dim i
    Response.Write "<tr class='tdbg'>"
    If ClassID = 4 Then
        Response.Write "<td width='120' align='right'><strong>期望电器：</strong></td>"
    Else
        Response.Write "<td width='120' align='right'><strong>电器设备：</strong></td>"
    End If
    Response.Write "<td colspan='2' >"
    Response.Write "空调<select name='HouseDianQi1'>"
    For i = 0 To 5
        Response.Write "<option value=" & i & ">" & i & "</option>"
    Next
    Response.Write "</select>台，"
    Response.Write "电扇<select name='HouseDianQi2'>"
    For i = 0 To 5
        Response.Write "<option value=" & i & ">" & i & "</option>"
    Next
    Response.Write "</select>台，"
    Response.Write "电视机<select name='HouseDianQi3'>"
    For i = 0 To 5
        Response.Write "<option value=" & i & ">" & i & "</option>"
    Next
    Response.Write "</select>台，"
    Response.Write "<input name='HouseDianQi4' type='checkbox' value='中央空调'>中央空调，"
    Response.Write "<input name='HouseDianQi4' type='checkbox' value='热水器'>热水器，"
    Response.Write "<input name='HouseDianQi4' type='checkbox' value='冰箱'>冰箱，"
    Response.Write "<input name='HouseDianQi4' type='checkbox' value='洗衣机'>洗衣机，"
    Response.Write "<input name='HouseDianQi4' type='checkbox' value='电脑'>电脑，"
    Response.Write "<input name='HouseDianQi4' type='checkbox' value='电话'>电话"
    Response.Write "</td>"
    Response.Write "</tr>"
End Sub

Sub ExportHouseJiaJuStr()

    Dim i
    Response.Write "<tr class='tdbg'>"
    If ClassID = 1 Or ClassID = 2 Or ClassID = 5 Then
        Response.Write "<td width='120' align='right'><strong>配套家具：</strong></td>"
    Else
        Response.Write "<td width='120' align='right'><strong>期望家具：</strong></td>"
    End If
    Response.Write "<td colspan='2' >"
    If ClassID = 1 Then
        Response.Write "<input name='HouseJiaJu' type='checkbox' value='组合衣柜'>组合衣柜，"
        Response.Write "<input name='HouseJiaJu' type='checkbox' value='写字台'>写字台，"
        Response.Write "<input name='HouseJiaJu' type='checkbox' value='沙发'>沙发，"
        Response.Write "<input name='HouseJiaJu' type='checkbox' value='厨具'>厨具，"
        Response.Write "<input name='HouseJiaJu' type='checkbox' value='办公家具'>办公家具"
    Else
        Response.Write "床<select name='HouseJiaJu1'>"
        For i = 0 To 5
            Response.Write "<option value=" & i & ">" & i & "</option>"
        Next
        Response.Write "</select>张，"
        Response.Write "衣柜<select name='HouseJiaJu2'>"
        For i = 0 To 5
            Response.Write "<option value=" & i & ">" & i & "</option>"
        Next
        Response.Write "</select>个，"
        Response.Write "写字台<select name='HouseJiaJu3'>"
        For i = 0 To 5
            Response.Write "<option value=" & i & ">" & i & "</option>"
        Next
        Response.Write "</select>张，"
        Response.Write "<input name='HouseJiaJu4' type='checkbox' value='沙发'>沙发，"
        Response.Write "<input name='HouseJiaJu4' type='checkbox' value='餐桌'>餐桌，"
        Response.Write "<input name='HouseJiaJu4' type='checkbox' value='厨具'>厨具，"
        Response.Write "<input name='HouseJiaJu4' type='checkbox' value='油烟机'>油烟机，"
        Response.Write "<input name='HouseJiaJu4' type='checkbox' value='煤气灶'>煤气灶"
    End If
    Response.Write "</td>"
    Response.Write "</tr>"
End Sub

Sub ExportJianJieStr(JianJieName)

    Response.Write "<tr class='tdbg'>"
    If JianJieName = "HouseJianJie" Then
        Response.Write "<td width='120' align='right'><strong>我的简介：</strong></td>"
    Else
        Response.Write "<td width='120' align='right'><strong>要求室友：</strong></td>"
    End If
    Response.Write "<td colspan='2' width='644'>"
    Response.Write "<select name='" & JianJieName & "1'>"
    Response.Write "<option value='男'>男</option>"
    Response.Write "<option value='女'>女</option>"
    Response.Write "</select>， <select name='" & JianJieName & "2'>"
    Response.Write "<option value=''></option>"
    Response.Write "<option value='20岁左右'>20岁左右</option>"
    Response.Write "<option value='25岁左右'>25岁左右</option>"
    Response.Write "<option value='30岁左右'>30岁左右</option>"
    Response.Write "<option value='35岁左右'>35岁左右</option>"
    Response.Write "<option value='40岁左右'>40岁左右</option>"
    Response.Write "</select>， <select name='" & JianJieName & "3'>"
    Response.Write "<option value=''></option>"
    Response.Write "<option value='大本'>大本学历</option>"
    Response.Write "<option value='大专'>大专学历</option>"
    Response.Write "<option value='中专'>中专学历</option>"
    Response.Write "<option value='高中'>高中学历</option>"
    Response.Write "<option value='初中'>初中学历</option>"
    Response.Write "<option value='初中以下'>初中以下</option>"
    Response.Write "<option value='大本以上'>大本以上</option>"
    Response.Write "</select>， <select name='" & JianJieName & "4'>"
    Response.Write "<option value=''></option>"
    Response.Write "<option value='在校学生'>在校学生</option>"
    Response.Write "<option value='进修人员'>进修人员</option>"
    Response.Write "<option value='营销人员'>营销人员</option>"
    Response.Write "<option value='文职工作'>文职工作</option>"
    Response.Write "<option value='体力工作'>体力工作</option>"
    Response.Write "<option value='服务场所'>服务场所</option>"
    Response.Write "<option value='夜班工作'>夜班工作</option>"
    Response.Write "<option value='其他工作'>其他工作</option>"
    Response.Write "</select>， <select name='" & JianJieName & "5'>"
    Response.Write "<option value=''></option>"
    Response.Write "<option value='单身'>单身</option>"
    Response.Write "<option value='有恋人'>有恋人</option>"
    Response.Write "<option value='配偶同住'>配偶同住</option>"
    Response.Write "<option value='配偶分居'>配偶分居</option>"
    Response.Write "<option value='伤心恋情'>伤心恋情</option>"
    If JianJieName = "HouseShiYou" Then
        Response.Write "</select>，<input name='" & JianJieName & "6' type='checkbox' value='活泼'>活泼，<input name='" & JianJieName & "6' type='checkbox' value='文静'>文静，<input name='" & JianJieName & "6' type='checkbox' value='会家务'>会家务"
    Else
        Response.Write "</select>，<input name='" & JianJieName & "6' type='checkbox' value='忌烟'>忌烟，<input name='" & JianJieName & "6' type='checkbox' value='忌酒'>忌酒，<input name='" & JianJieName & "6' type='checkbox' value='忌吵闹'>忌吵闹"
    End If
    Response.Write "</td>"
    Response.Write "</tr>"
End Sub

Sub ExportHouseZhuangXiuStr(ZhuangXiuName)

    Dim i
    Response.Write "<tr class='tdbg'>"
    If ClassID = 3 Or ClassID = 4 Then
        Response.Write "<td width='120' align='right'><strong>期望装修：</strong></td>"
    Else
        Response.Write "<td width='120' align='right'><strong>装修程度：</strong></td>"
    End If
    Response.Write "<td colspan='2' >"
    Select Case ClassID
    Case 1, 3
        Response.Write "<select name='" & ZhuangXiuName & "1'>"
        Response.Write "<option value=''> </option>"
        Response.Write "<option value='毛坯房'>毛坯房</option>"
        Response.Write "<option value='简单装修'>简单装修</option>"
        Response.Write "<option value='标准装修'>标准装修</option>"
        Response.Write "<option value='精美装修'>精美装修</option>"
        Response.Write "<option value='豪华装修'>豪华装修</option>"
        Response.Write "</select>， "
        If ClassID = 1 Then
            Response.Write "已住<select name='" & ZhuangXiuName & "2'>"
            Response.Write "<option value=''> </option>"
            For i = 1 To 9
                Response.Write "<option value=" & i & ">" & i & "</option>"
            Next
            Response.Write "</select>年"
        Else
            Response.Write "家具:<select name='" & ZhuangXiuName & "1'>"
            Response.Write "<option value=''> </option>"
            Response.Write "<option value='有全套家具'>有全套家具</option>"
            Response.Write "<option value='有部分家具'>有部分家具</option>"
            Response.Write "</select>"
        End If
    Case 2, 4, 5
        Response.Write "客厅地面<select name='" & ZhuangXiuName & "1'>"
        Response.Write "<option value=''> </option>"
        Response.Write "<option value='地砖'>地砖</option>"
        Response.Write "<option value='地板'>地板</option>"
        Response.Write "<option value='水泥'>水泥</option>"
        Response.Write "<option value='地毯'>地毯</option>"
        Response.Write "<option value='胶垫'>胶垫</option>"
        Response.Write "</select>墙面<select name='" & ZhuangXiuName & "2'>"
        Response.Write "<option value=''> </option>"
        Response.Write "<option value='乳胶漆'>乳胶漆</option>"
        Response.Write "<option value='涂料'>涂料</option>"
        Response.Write "<option value='墙纸'>墙纸</option>"
        Response.Write "<option value='墙砖'>墙砖</option>"
        Response.Write "<option value='白石灰'>白石灰</option>"
        Response.Write "</select>，"
        Response.Write "房间地面<select name='" & ZhuangXiuName & "3'>"
        Response.Write "<option value=''> </option>"
        Response.Write "<option value='地砖'>地砖</option>"
        Response.Write "<option value='地板'>地板</option>"
        Response.Write "<option value='水泥'>水泥</option>"
        Response.Write "<option value='地毯'>地毯</option>"
        Response.Write "<option value='胶垫'>胶垫</option>"
        Response.Write "</select>墙面<select name='" & ZhuangXiuName & "4'>"
        Response.Write "<option value=''> </option>"
        Response.Write "<option value='乳胶漆'>乳胶漆</option>"
        Response.Write "<option value='涂料'>涂料</option>"
        Response.Write "<option value='墙纸'>墙纸</option>"
        Response.Write "<option value='墙砖'>墙砖</option>"
        Response.Write "<option value='白石灰'>白石灰</option>"
        Response.Write "</select>，"
        Response.Write "卫生间<select name='" & ZhuangXiuName & "5'>"
        Response.Write "<option value=''> </option>"
        Response.Write "<option value='毛胚'>毛胚</option>"
        Response.Write "<option value='简装'>简装</option>"
        Response.Write "<option value='精装'>精装</option>"
        Response.Write "<option value='豪华'>豪华</option>"
        Response.Write "</select>，"
        Response.Write "<input name='" & ZhuangXiuName & "6' type='checkbox' value='门套窗套'>门套窗套"
    End Select
    Response.Write "</td>"
    Response.Write "</tr>"
End Sub

Sub ExportHouseWeiShengStr()
    Response.Write "<tr class='tdbg'>"
    Response.Write "<td width='120' align='right'><strong>卫生设施：</strong></td>"
    Response.Write "<td colspan='2' >"
    Response.Write "<select name='HouseWeiSheng'>"
    Response.Write "<option value=''> </option>"
    Response.Write "<option value='毛胚'>毛胚</option>"
    Response.Write "<option value='简易卫生间'>简易卫生间</option>"
    Response.Write "<option value='精装卫生间'>精装卫生间</option>"
    Response.Write "<option value='豪华卫生间'>豪华卫生间</option>"
    Response.Write "</select>"
    Response.Write "</td>"
    Response.Write "</tr>"
End Sub

Sub ExportHouseZuJinStr(ZuJinName)

    Response.Write "<tr class='tdbg'>"
    If ClassID = 4 Then
        Response.Write "<td width='120' align='right'><strong>期望租金：</strong></td>"
    Else
        Response.Write "<td width='120' align='right'><strong>租金：</strong></td>"
    End If
    Response.Write "<td width='289'>"
    If ClassID = 4 Then
        Response.Write "<input type='text' name='" & ZuJinName & "1' size='10'  maxlength='8'> - "
        Response.Write "<input type='text' name='" & ZuJinName & "2' size='10'  maxlength='8'>"
    Else
        Response.Write "<input type='text' name='HouseZuJin' size='10'  maxlength='8'>"
    End If
    Response.Write "<font color='#FF0000'>*</font>"
    If ClassID = 4 Then
        Response.Write "<select name='HouseZuJinType' onchange=change_value(1)>"
    Else
        Response.Write "<select name='HouseZuJinType' onchange=change_value(0)>"
    End If
    Response.Write "<option value='元/月'>元/月</option>"
    Response.Write "<option value='元/季'>元/季</option>"
    Response.Write "<option value='元/天'>元/天</option>"
    Response.Write "<option value='元/周'>元/周</option>"
    Response.Write "<option value='元/年'>元/年</option>"
    Response.Write "<option value='价格面议'>价格面议</option>"
    Response.Write "</select>"
    Response.Write "</td>"
    Response.Write "<td width='348'><strong>支付方式：</strong>"
    Response.Write "<select name='HouseZhiFu'>"
    Response.Write "<option value='每月'>每月</option>"
    Response.Write "<option value='每季'>每季</option>"
    Response.Write "<option value='每半年'>每半年</option>"
    Response.Write "<option value='每年'>每年</option>"
    Response.Write "<option value='每周'>每周</option>"
    Response.Write "</select>"
    Response.Write "一付"
    Response.Write "</td>"
    Response.Write "</tr>"
End Sub

Sub ExportHouseShiZhengStr()

    Response.Write "<tr class='tdbg'> "
    If ClassID = 3 Or ClassID = 4 Then
        Response.Write "<td width='120' align='right'><strong>期望附近：</strong></td>"
    Else
        Response.Write "<td width='120' align='right'><strong>附近配套：</strong></td>"
    End If
    Response.Write "<td colspan='2' > "
    If ClassID = 4 Then
        Response.Write "公交<input type='text' name='HouseShiZheng1' maxlength='10' size='10'>路，"
    End If
    If ClassID = 3 Then
        Response.Write "<input name='HouseShiZheng' type='checkbox' value='公交'>公交，"
    End If
    Response.Write "<input name='HouseShiZheng' type='checkbox' value='公园'>公园，<input name='HouseShiZheng' type='checkbox' value='银行'>银行，<input name='HouseShiZheng' type='checkbox' value='医院'>医院，<input name='HouseShiZheng' type='checkbox' value='菜场'>菜场，<input name='HouseShiZheng' type='checkbox' value='学校'>学校，<input name='HouseShiZheng' type='checkbox' value='邮局'>邮局，<input name='HouseShiZheng' type='checkbox' value='超市'>超市"
    Response.Write "</td>"
    Response.Write "</tr>"
End Sub

Sub ExportTimeLimitStr(TimeLimitName)

    Dim i
    If ClassID = 1 Or ClassID = 3 Then
        Response.Write "<tr class='tdbg'> "
        Response.Write "<td width='120' align='right'><strong>交房时间：</strong></td>"
        Response.Write "<td colspan='2' > "
    End If
    Response.Write " <select name='" & TimeLimitName & "Year'>"
    Response.Write "<option value=''></option>"
    For i = 2006 To 2014
        Response.Write "<option value=" & i & ">" & i & "</option>"
    Next
    Response.Write "</select>年"
    Response.Write "<select name='" & TimeLimitName & "Month'>"
    Response.Write "<option value=''></option>"
    For i = 1 To 12
        Response.Write "<option value=" & i & ">" & i & "</option>"
    Next
    Response.Write "</select>月"
    Response.Write "<select name='" & TimeLimitName & "Day'>"
    Response.Write "<option value=''></option>"
    For i = 1 To 31
        Response.Write "<option value=" & i & ">" & i & "</option>"
    Next
    Response.Write "</select>日 <font color='#FF0000'>*</font>"
    If ClassID = 1 Or ClassID = 3 Then
        Response.Write "</td>"
        Response.Write "</tr>"
    End If
End Sub

Sub ExportHuXingStr_Modify(HuXingName)
    
    Dim i
    Response.Write "<tr class='tdbg'>"
    If HuXingName = "HouseHuXing" Then
        Response.Write "<td width='120' align='right'><strong>房屋户型：</strong></td>"
    End If
        If HuXingName = "HouseHuXing1" Then
        Response.Write "<td width='120' align='right'><strong>分租部分：</strong></td>"
    End If
    If HuXingName = "HouseHuXing2" Then
        Response.Write "<td width='120' align='right'><strong>共用部分：</strong></td>"
    End If
    Response.Write "<td width=300>"
    Response.Write "<select name='" & HuXingName & "1' onChange=change_it()>"
    Response.Write "<option value='0'>0</option>"
    For i = 1 To 9
        Response.Write "<option value='" & i & "' "
        If get_midstr(rsHouseList("" & HuXingName & ""), "", "房") = "" & i & "" Then Response.Write " selected"
        Response.Write ">" & i & "</option>"
    Next
    Response.Write "<option value='多' "
    If get_midstr(rsHouseList("" & HuXingName & ""), "", "房") = "多" Then Response.Write " selected"
    Response.Write ">多</option>"
    Response.Write "</select>房"
    Response.Write "<select name='" & HuXingName & "2' onChange=change_it()>"
    Response.Write "<option value='0'>0</option>"
    For i = 1 To 5
        Response.Write "<option value='" & i & "' "
        If get_midstr(rsHouseList("" & HuXingName & ""), "", "厅") = "" & i & "" Then Response.Write " selected"
        Response.Write ">" & i & "</option>"
    Next
    Response.Write "<option value='大'"
    If get_midstr(rsHouseList("" & HuXingName & ""), "", "厅") = "大" Then Response.Write " selected "
    Response.Write ">大</option>"
    Response.Write "</select>厅"
    Response.Write "<select name='" & HuXingName & "3' onChange=change_it()>"
    Response.Write "<option value='0'>0</option>"
    For i = 1 To 5
        Response.Write "<option value='" & i & "' "
        If get_midstr(rsHouseList("" & HuXingName & ""), "", "卫") = "" & i & "" Then Response.Write " selected"
        Response.Write ">" & i & "</option>"
    Next
    Response.Write "</select>卫"
    Response.Write "<select name='" & HuXingName & "4' onChange=change_it()>"
    Response.Write "<option value='0'>0</option>"
    For i = 1 To 5
        Response.Write "<option value='" & i & "' "
        If get_midstr(rsHouseList("" & HuXingName & ""), "", "厨") = "" & i & "" Then Response.Write " selected"
        Response.Write ">" & i & "</option>"
    Next
    Response.Write "</select>厨"
    Response.Write "<select name='" & HuXingName & "5' onChange=change_it()>"
    Response.Write "<option value='0'>0</option>"
    For i = 1 To 5
        Response.Write "<option value='" & i & "' "
        If get_midstr(rsHouseList("" & HuXingName & ""), "", "阳台") = "" & i & "" Then Response.Write " selected"
        Response.Write ">" & i & "</option>"
    Next
    Response.Write "</select>阳台 <font color='#FF0000'>*</font>"
    Response.Write "</td>"
End Sub

Sub ExportHouseLouCengStr_Modify()
    Response.Write "<tr class='tdbg'>"
    If ClassID = 3 Then
        Response.Write "<td width='120' align='right'><strong>欲购楼层：</strong></td>"
        Response.Write "<td  colspan='2'>"
    Else
        Response.Write "<td width='120' align='right'><strong>所在楼层：</strong></td>"
        Response.Write "<td>"
    End If
    Response.Write "<input type='text' name='HouseLouCeng1' maxlength='3' size='2' value='" & get_midstr(rsHouseList("HouseLouCeng"), "", "楼/") & "'  title='实际楼层'>楼/<input type='text' name='HouseLouCeng2' maxlength='3' size='2' value='" & get_midstr(rsHouseList("HouseLouCeng"), "", "层") & "'  title='总楼层'>层"
    Response.Write "<input name='HouseLouCeng3' type='checkbox' value='&nbsp;有架空层'"
    If chk_midstr(rsHouseList("HouseLouCeng"), "&nbsp;有架空层") = True Then Response.Write " checked"
    Response.Write " title='底楼用户选'>有架空层"
    Response.Write "<input name='HouseLouCeng3' type='checkbox' value='&nbsp;有隔热层'"
    If chk_midstr(rsHouseList("HouseLouCeng"), "&nbsp;有隔热层") = True Then Response.Write " checked"
    Response.Write " title='顶楼用户选'>有隔热层"
    If ClassID = 3 Then
        Response.Write "&nbsp;&nbsp;主体朝向<select name='HouseChaoXiang'>"
        Response.Write "<option value=' '> </option>"
        Response.Write "<option value='东'"
        If rsHouseList("HouseChaoXiang") = "东" Then Response.Write " selected"
        Response.Write "> 东</option>"
        Response.Write "<option value='南'"
        If rsHouseList("HouseChaoXiang") = "南" Then Response.Write " selected"
        Response.Write "> 南</option>"
        Response.Write "<option value='西'"
        If rsHouseList("HouseChaoXiang") = "西" Then Response.Write " selected"
        Response.Write "> 西</option>"
        Response.Write "<option value='北'"
        If rsHouseList("HouseChaoXiang") = "北" Then Response.Write " selected"
        Response.Write "> 北</option>"
        Response.Write "</select>"
    End If
    Response.Write "</td>"
End Sub

Sub ExportHouseLeiXingStr_Modify()
    
    If ClassID <> 3 Then
        Response.Write "<td><strong>物业类型：</strong>"
    End If
    Response.Write "&nbsp;<select name='HouseLeiXing'>"
    Response.Write "<option value=''></option>"
    Response.Write "<option value='多层住宅'"
    If rsHouseList("HouseLeiXing") = "多层住宅" Then Response.Write " selected"
    Response.Write ">多层住宅</option>"
    Response.Write "<option value='高层住宅'"
    If rsHouseList("HouseLeiXing") = "高层住宅" Then Response.Write " selected"
    Response.Write ">高层住宅</option>"
    Response.Write "<option value='公寓住房'"
    If rsHouseList("HouseLeiXing") = "公寓住房" Then Response.Write " selected"
    Response.Write ">公寓住房</option>"
    Response.Write "<option value='排屋'"
    If rsHouseList("HouseLeiXing") = "排屋" Then Response.Write " selected"
    Response.Write ">排屋</option>"
    Response.Write "<option value='别墅'"
    If rsHouseList("HouseLeiXing") = "别墅" Then Response.Write " selected"
    Response.Write ">别墅</option>"
    Response.Write "<option value='商铺'"
    If rsHouseList("HouseLeiXing") = "商铺" Then Response.Write " selected"
    Response.Write ">商铺</option>"
    Response.Write "<option value='写字楼'"
    If rsHouseList("HouseLeiXing") = "写字楼" Then Response.Write " selected"
    Response.Write ">写字楼</option>"
    Response.Write "<option value='商住两用'"
    If rsHouseList("HouseLeiXing") = "商住两用" Then Response.Write " selected"
    Response.Write ">商住两用</option>"
    Response.Write "<option value='仓库'"
    If rsHouseList("HouseLeiXing") = "仓库" Then Response.Write " selected"
    Response.Write ">仓库</option>"
    Response.Write "<option value='厂房'"
    If rsHouseList("HouseLeiXing") = "厂房" Then Response.Write " selected"
    Response.Write ">厂房</option>"
    Response.Write "</select>"
    If ClassID <> 3 Then
        Response.Write "</td>"
        Response.Write "</tr>"
    End If
End Sub

Sub ExportHouseChaoXiangStr_Modify(ChaoXiangName, Position)
    Response.Write "<select name='" & ChaoXiangName & "'>"
    Response.Write "<option value=''></option>"
    Response.Write "<option value='东窗'"
    If get_midstr(rsHouseList("HouseChaoXiang"), "" & Position & "", "") = "东窗" Then Response.Write " selected"
    Response.Write "> 东窗</option>"
    Response.Write "<option value='南窗'"
    If get_midstr(rsHouseList("HouseChaoXiang"), "" & Position & "", "") = "南窗" Then Response.Write " selected"
    Response.Write "> 南窗</option>"
    Response.Write "<option value='西窗'"
    If get_midstr(rsHouseList("HouseChaoXiang"), "" & Position & "", "") = "西窗" Then Response.Write " selected"
    Response.Write "> 西窗</option>"
    Response.Write "<option value='北窗'"
    If get_midstr(rsHouseList("HouseChaoXiang"), "" & Position & "", "") = "北窗" Then Response.Write " selected"
    Response.Write "> 北窗</option>"
    Response.Write "<option value='无窗'"
    If get_midstr(rsHouseList("HouseChaoXiang"), "" & Position & "", "") = "无窗" Then Response.Write " selected"
    Response.Write "> 无窗</option>"
    Response.Write "</select>"
End Sub

Sub ExportHouseJiChuStr_Modify()
    Response.Write "<tr class='tdbg'>"
    If ClassID = 3 Or ClassID = 4 Then
        Response.Write "<td width='120' align='right'><strong>期望设施：</strong></td>"
    Else
        Response.Write "<td width='120' align='right'><strong>基础设施：</strong></td>"
    End If
    Response.Write "<td colspan='2' width='644'>"
    Response.Write "<input name='HouseJiChu' type='checkbox' value='电梯'"
    If chk_midstr(rsHouseList("HouseJiChu"), "电梯") = True Then Response.Write " checked"
    Response.Write ">电梯，"
    Response.Write "<input name='HouseJiChu' type='checkbox' value='汽车库'"
    If chk_midstr(rsHouseList("HouseJiChu"), "汽车库") = True Then Response.Write " checked"
    Response.Write ">汽车库，"
    Response.Write "<input name='HouseJiChu' type='checkbox' value='汽车位'"
    If chk_midstr(rsHouseList("HouseJiChu"), "汽车位") = True Then Response.Write " checked"
    Response.Write ">汽车位，"
    Response.Write "<input name='HouseJiChu' type='checkbox' value='一户电表'"
    If chk_midstr(rsHouseList("HouseJiChu"), "一户电表") = True Then Response.Write " checked"
    Response.Write ">一户电表，"
    Response.Write "<input name='HouseJiChu' type='checkbox' value='三相电力'"
    If chk_midstr(rsHouseList("HouseJiChu"), "三相电力") = True Then Response.Write " checked"
    Response.Write ">三相电力"
    Response.Write "<input name='HouseJiChu' type='checkbox' value='一户水表'"
    If chk_midstr(rsHouseList("HouseJiChu"), "一户水表") = True Then Response.Write " checked"
    Response.Write ">一户水表，"
    Response.Write "<input name='HouseJiChu' type='checkbox' value='管道燃气'"
    If chk_midstr(rsHouseList("HouseJiChu"), "管道燃气") = True Then Response.Write " checked"
    Response.Write ">管道燃气，"
    Response.Write "<input name='HouseJiChu' type='checkbox' value='集中供热'"
    If chk_midstr(rsHouseList("HouseJiChu"), "集中供热") = True Then Response.Write " checked"
    Response.Write ">集中供热"
    Response.Write "</td>"
    Response.Write "</tr>"
End Sub

Sub ExportHouseDianQiStr_Modify()

    Dim i
    Response.Write "<tr class='tdbg'>"
    If ClassID = 4 Then
        Response.Write "<td width='120' align='right'><strong>期望电器：</strong></td>"
    Else
        Response.Write "<td width='120' align='right'><strong>电器设备：</strong></td>"
    End If
    Response.Write "<td colspan='2' width='644'>"
    Response.Write "空调<select name='HouseDianQi1'>"
    For i = 0 To 5
        Response.Write "<option value='" & i & "' "
        If get_midstr(rsHouseList("HouseDianQi"), "空调", "台") = "" & i & "" Then Response.Write " selected "
        Response.Write ">" & i & "</option>"
    Next
    Response.Write "</select>台，"
    Response.Write "电扇<select name='HouseDianQi2'>"
    For i = 0 To 5
        Response.Write "<option value='" & i & "' "
        If get_midstr(rsHouseList("HouseDianQi"), "电扇", "台") = "" & i & "" Then Response.Write " selected "
        Response.Write ">" & i & "</option>"
    Next
    Response.Write "</select>台，"
    Response.Write "电视机<select name='HouseDianQi3'>"
    For i = 0 To 5
        Response.Write "<option value='" & i & "' "
        If get_midstr(rsHouseList("HouseDianQi"), "电视机", "台") = "" & i & "" Then Response.Write " selected "
        Response.Write ">" & i & "</option>"
    Next
    Response.Write "</select>台，"
    Response.Write "<input name='HouseDianQi4' type='checkbox' value='中央空调'"
    If chk_midstr(rsHouseList("HouseDianQi"), "中央空调") = True Then Response.Write " checked"
    Response.Write ">中央空调，"
    Response.Write "<input name='HouseDianQi4' type='checkbox' value='热水器'"
    If chk_midstr(rsHouseList("HouseDianQi"), "热水器") = True Then Response.Write " checked"
    Response.Write ">热水器，"
    Response.Write "<input name='HouseDianQi4' type='checkbox' value='冰箱'"
    If chk_midstr(rsHouseList("HouseDianQi"), "冰箱") = True Then Response.Write " checked"
    Response.Write ">冰箱，"
    Response.Write "<input name='HouseDianQi4' type='checkbox' value='洗衣机'"
    If chk_midstr(rsHouseList("HouseDianQi"), "洗衣机") = True Then Response.Write " checked"
    Response.Write ">洗衣机，"
    Response.Write "<input name='HouseDianQi4' type='checkbox' value='电脑'"
    If chk_midstr(rsHouseList("HouseDianQi"), "电脑") = True Then Response.Write " checked"
    Response.Write ">电脑，"
    Response.Write "<input name='HouseDianQi4' type='checkbox' value='电话'"
    If chk_midstr(rsHouseList("HouseDianQi"), "电话") = True Then Response.Write " checked"
    Response.Write ">电话"
    Response.Write "</td>"
    Response.Write "</tr>"
End Sub

Sub ExportHouseJiaJuStr_Modify()

    Dim i
    Response.Write "<tr class='tdbg'>"
    If ClassID = 1 Or ClassID = 2 Or ClassID = 5 Then
        Response.Write "<td width='120' align='right'><strong>配套家具：</strong></td>"
    Else
        Response.Write "<td width='120' align='right'><strong>期望家具：</strong></td>"
    End If
    If ClassID = 1 Then
        Response.Write "<td colspan='2'>"
        Response.Write "<input name='HouseJiaJu' type='checkbox' value='组合衣柜'"
        If chk_midstr(rsHouseList("HouseJiaJu"), "组合衣柜") = True Then Response.Write " checked"
        Response.Write "> 组合衣柜，"
        Response.Write "<input name='HouseJiaJu' type='checkbox' value='写字台'"
        If chk_midstr(rsHouseList("HouseJiaJu"), "写字台") = True Then Response.Write " checked"
        Response.Write "> 写字台，"
        Response.Write "<input name='HouseJiaJu' type='checkbox' value='沙发'"
        If chk_midstr(rsHouseList("HouseJiaJu"), "沙发") = True Then Response.Write " checked"
        Response.Write "> 沙发，"
        Response.Write "<input name='HouseJiaJu' type='checkbox' value='厨具'"
        If chk_midstr(rsHouseList("HouseJiaJu"), "厨具") = True Then Response.Write " checked"
        Response.Write "> 厨具，"
        Response.Write "<input name='HouseJiaJu' type='checkbox' value='办公家具'"
        If chk_midstr(rsHouseList("HouseJiaJu"), "办公家具") = True Then Response.Write " checked"
        Response.Write "> 办公家具"
        Response.Write "</td>"
    Else
        Response.Write "<td colspan='2' width='644'>"
        Response.Write "床<select name='HouseJiaJu1'>"
        For i = 0 To 5
            Response.Write "<option value='" & i & "'"
            If get_midstr(rsHouseList("HouseJiaJu"), "床", "张") = "" & i & "" Then Response.Write " selected"
            Response.Write ">" & i & "</option>"
        Next
        Response.Write "</select>张，"
        Response.Write "衣柜<select name='HouseJiaJu2'>"
        For i = 0 To 5
            Response.Write "<option value='" & i & "' "
            If get_midstr(rsHouseList("HouseJiaJu"), "衣柜", "个") = "" & i & "" Then Response.Write " selected "
            Response.Write ">" & i & "</option>"
        Next
        Response.Write "</select>个，"
        Response.Write "写字台<select name='HouseJiaJu3'>"
        For i = 0 To 5
            Response.Write "<option value='" & i & "' "
            If get_midstr(rsHouseList("HouseJiaJu"), "写字台", "张") = "" & i & "" Then Response.Write " selected "
            Response.Write ">" & i & "</option>"
        Next
        Response.Write "</select>张，"
        Response.Write "<input name='HouseJiaJu4' type='checkbox' value='沙发'"
        If chk_midstr(rsHouseList("HouseJiaJu"), "沙发") = True Then Response.Write " checked"
        Response.Write ">沙发，"
        Response.Write "<input name='HouseJiaJu4' type='checkbox' value='餐桌'"
        If chk_midstr(rsHouseList("HouseJiaJu"), "餐桌") = True Then Response.Write " checked"
        Response.Write ">餐桌，"
        Response.Write "<input name='HouseJiaJu4' type='checkbox' value='厨具'"
        If chk_midstr(rsHouseList("HouseJiaJu"), "厨具") = True Then Response.Write " checked"
        Response.Write ">厨具，"
        Response.Write "<input name='HouseJiaJu4' type='checkbox' value='油烟机'"
        If chk_midstr(rsHouseList("HouseJiaJu"), "油烟机") = True Then Response.Write " checked"
        Response.Write ">油烟机，"
        Response.Write "<input name='HouseJiaJu4' type='checkbox' value='煤气灶'"
        If chk_midstr(rsHouseList("HouseJiaJu"), "煤气灶") = True Then Response.Write " checked"
        Response.Write ">煤气灶"
        Response.Write "</td>"
    End If
    Response.Write "</tr>"
End Sub

Sub ExportHouseZhuangXiuStr_Modify(ZhuangXiuName)
    
    Dim i
    Response.Write "<tr class='tdbg'>"
    If ClassID = 3 Or ClassID = 4 Then
        Response.Write "<td width='120' align='right'><strong>期望装修：</strong></td>"
    Else
        Response.Write "<td width='120' align='right'><strong>装修程度：</strong></td>"
    End If
    Select Case ClassID
    Case 1, 3
        Response.Write "<td colspan='3'>"
        Response.Write "&nbsp;<select name='" & ZhuangXiuName & "1'>"
        Response.Write "<option value=''></option>"
        Response.Write "<option value='毛坯房'"
        If chk_midstr(rsHouseList("HouseZhuangXiu"), "毛坯房") = True Then Response.Write " selected"
        Response.Write ">毛坯房</option>"
        Response.Write "<option value='简单装修'"
        If chk_midstr(rsHouseList("HouseZhuangXiu"), "简单装修") = True Then Response.Write " selected"
        Response.Write ">简单装修</option>"
        Response.Write "<option value='标准装修'"
        If chk_midstr(rsHouseList("HouseZhuangXiu"), "标准装修") = True Then Response.Write " selected"
        Response.Write ">标准装修</option>"
        Response.Write "<option value='精美装修'"
        If chk_midstr(rsHouseList("HouseZhuangXiu"), "精美装修") = True Then Response.Write " selected"
        Response.Write ">精美装修</option>"
        Response.Write "<option value='豪华装修'"
        If chk_midstr(rsHouseList("HouseZhuangXiu"), "豪华装修") = True Then Response.Write " selected"
        Response.Write ">豪华装修</option>"
        Response.Write "</select>，家具:"
        If ClassID = 1 Then
            Response.Write "已住<select name='" & ZhuangXiuName & "2'>"
            Response.Write "<option value=''> </option>"
            For i = 1 To 9
                Response.Write "<option value='" & i & "' "
                If get_midstr(rsHouseList("HouseZhuangXiu"), "已住", "年") = "" & i & "" Then Response.Write " selected"
                Response.Write ">" & i & "</option>"
            Next
            Response.Write "</select>年"
        Else
            Response.Write "&nbsp;<select name='" & ZhuangXiuName & "1'>"
            Response.Write "<option value=''></option>"
            Response.Write "<option value='有全套家具'"
            If chk_midstr(rsHouseList("HouseZhuangXiu"), "有全套家具") = True Then Response.Write " selected"
            Response.Write ">有全套家具</option>"
            Response.Write "<option value='有部分家具'"
            If chk_midstr(rsHouseList("HouseZhuangXiu"), "有部分家具") = True Then Response.Write " selected"
            Response.Write ">有部分家具</option>"
            Response.Write "</select>"
        End If
        Response.Write "</td>"
    Case 2, 4, 5
        Response.Write "<td colspan='2' width='644'>"
        Response.Write "客厅地面<select name='" & ZhuangXiuName & "1'>"
        Response.Write "<option value=''> </option>"
        Response.Write "<option value='地砖'"
        If get_midstr(rsHouseList("HouseZhuangXiu"), "客厅", "") = "地砖" Then Response.Write " selected"
        Response.Write ">地砖</option>"
        Response.Write "<option value='地板'"
        If get_midstr(rsHouseList("HouseZhuangXiu"), "客厅", "") = "地板" Then Response.Write " selected"
        Response.Write ">地板</option>"
        Response.Write "<option value='水泥'"
        If get_midstr(rsHouseList("HouseZhuangXiu"), "客厅", "") = "水泥" Then Response.Write " selected"
        Response.Write ">水泥</option>"
        Response.Write "<option value='地毯'"
        If get_midstr(rsHouseList("HouseZhuangXiu"), "客厅", "") = "地毯" Then Response.Write " selected"
        Response.Write ">地毯</option>"
        Response.Write "<option value='胶垫'"
        If get_midstr(rsHouseList("HouseZhuangXiu"), "客厅", "") = "胶垫" Then Response.Write " selected"
        Response.Write ">胶垫</option>"
        Response.Write "</select>墙面<select name='" & ZhuangXiuName & "2'>"
        Response.Write "<option value=''> </option>"
        Response.Write "<option value='乳胶漆'"
        If get_midstr(rsHouseList("HouseZhuangXiu"), "房间墙面", "") = "乳胶漆" Then Response.Write " selected"
        Response.Write ">乳胶漆</option>"
        Response.Write "<option value='涂料'"
        If get_midstr(rsHouseList("HouseZhuangXiu"), "房间墙面", "") = "涂料" Then Response.Write " selected"
        Response.Write ">涂料</option>"
        Response.Write "<option value='墙纸'"
        If get_midstr(rsHouseList("HouseZhuangXiu"), "房间墙面", "") = "墙纸" Then Response.Write " selected"
        Response.Write ">墙纸</option>"
        Response.Write "<option value='墙砖'"
        If get_midstr(rsHouseList("HouseZhuangXiu"), "房间墙面", "") = "墙砖" Then Response.Write " selected"
        Response.Write ">墙砖</option>"
        Response.Write "<option value='白石灰'"
        If get_midstr(rsHouseList("HouseZhuangXiu"), "房间墙面", "") = "白石灰" Then Response.Write " selected"
        Response.Write ">白石灰</option>"
        Response.Write "</select>，"
        Response.Write "房间地面<select name='" & ZhuangXiuName & "3'>"
        Response.Write "<option value=''> </option>"
        Response.Write "<option value='地砖'"
        If get_midstr(rsHouseList("HouseZhuangXiu"), "房间", "") = "地砖" Then Response.Write " selected"
        Response.Write ">地砖</option>"
        Response.Write "<option value='地板'"
        If get_midstr(rsHouseList("HouseZhuangXiu"), "房间", "") = "地板" Then Response.Write " selected"
        Response.Write ">地板</option>"
        Response.Write "<option value='水泥'"
        If get_midstr(rsHouseList("HouseZhuangXiu"), "房间", "") = "水泥" Then Response.Write " selected"
        Response.Write ">水泥</option>"
        Response.Write "<option value='地毯'"
        If get_midstr(rsHouseList("HouseZhuangXiu"), "房间", "") = "地毯" Then Response.Write " selected"
        Response.Write ">地毯</option>"
        Response.Write "<option value='胶垫'"
        If get_midstr(rsHouseList("HouseZhuangXiu"), "房间", "") = "胶垫" Then Response.Write " selected"
        Response.Write ">胶垫</option>"
        Response.Write "</select>墙面<select name='" & ZhuangXiuName & "4'>"
        Response.Write "<option value=''> </option>"
        Response.Write "<option value='乳胶漆'"
        If get_midstr(rsHouseList("HouseZhuangXiu"), "房间墙面", "") = "乳胶漆" Then Response.Write " selected"
        Response.Write ">乳胶漆</option>"
        Response.Write "<option value='涂料'"
        If get_midstr(rsHouseList("HouseZhuangXiu"), "房间墙面", "") = "涂料" Then Response.Write " selected"
        Response.Write ">涂料</option>"
        Response.Write "<option value='墙纸'"
        If get_midstr(rsHouseList("HouseZhuangXiu"), "房间墙面", "") = "墙纸" Then Response.Write " selected"
        Response.Write ">墙纸</option>"
        Response.Write "<option value='墙砖'"
        If get_midstr(rsHouseList("HouseZhuangXiu"), "房间墙面", "") = "墙砖" Then Response.Write " selected"
        Response.Write ">墙砖</option>"
        Response.Write "<option value='白石灰'"
        If get_midstr(rsHouseList("HouseZhuangXiu"), "房间墙面", "") = "白石灰" Then Response.Write " selected"
        Response.Write ">白石灰</option>"
        Response.Write "</select>，"
        Response.Write "卫生间<select name='" & ZhuangXiuName & "5'>"
        Response.Write "<option value=''> </option>"
        Response.Write "<option value='毛胚'"
        If get_midstr(rsHouseList("HouseZhuangXiu"), "卫生间", "") = "毛胚" Then Response.Write " selected"
        Response.Write ">毛胚</option>"
        Response.Write "<option value='简装'"
        If get_midstr(rsHouseList("HouseZhuangXiu"), "卫生间", "") = "简装" Then Response.Write " selected"
        Response.Write ">简装</option>"
        Response.Write "<option value='精装'"
        If get_midstr(rsHouseList("HouseZhuangXiu"), "卫生间", "") = "精装" Then Response.Write " selected"
        Response.Write ">精装</option>"
        Response.Write "<option value='豪华'"
        If get_midstr(rsHouseList("HouseZhuangXiu"), "卫生间", "") = "豪华" Then Response.Write " selected"
        Response.Write ">豪华</option>"
        Response.Write "</select>，"
        Response.Write "<input name='" & ZhuangXiuName & "6' type='checkbox' value='门套窗套'"
        If chk_midstr(rsHouseList("HouseZhuangXiu"), "门套窗套") = True Then Response.Write " checked"
        Response.Write ">门套窗套"
        Response.Write "</td>"
    End Select
    Response.Write "</tr>"
End Sub

Sub ExportShiYouStr_Modify(ShiYou)
    Response.Write "<td colspan='2' width='644'>"
    Response.Write "<select name='" & ShiYou & "1'>"
    Response.Write "<option value='男'"
    If get_midstr(rsHouseList("" & "" & ShiYou & "" & ""), "性别", "") = "男" Then Response.Write " Selected"
    Response.Write ">男</option>"
    Response.Write "<option value='女'"
    If get_midstr(rsHouseList("" & "" & ShiYou & "" & ""), "性别", "") = "女" Then Response.Write "Selected"
    Response.Write ">女</option>"
    Response.Write "</select>， <select name='" & ShiYou & "2'>"
    Response.Write "<option value=''></option>"
    Response.Write "<option value='20岁左右'"
    If get_midstr(rsHouseList("" & "" & ShiYou & "" & ""), "年龄", "") = "20岁左右" Then Response.Write " selected"
    Response.Write ">20岁左右</option>"
    Response.Write "<option value='25岁左右'"
    If get_midstr(rsHouseList("" & "" & ShiYou & "" & ""), "年龄", "") = "25岁左右" Then Response.Write " selected"
    Response.Write ">25岁左右</option>"
    Response.Write "<option value='30岁左右'"
    If get_midstr(rsHouseList("" & "" & ShiYou & "" & ""), "年龄", "") = "30岁左右" Then Response.Write " selected"
    Response.Write ">30岁左右</option>"
    Response.Write "<option value='35岁左右'"
    If get_midstr(rsHouseList("" & "" & ShiYou & "" & ""), "年龄", "") = "35岁左右" Then Response.Write " selected"
    Response.Write ">35岁左右</option>"
    Response.Write "<option value='40岁左右'"
    If get_midstr(rsHouseList("" & "" & ShiYou & "" & ""), "年龄", "") = "40岁左右" Then Response.Write " selected"
    Response.Write ">40岁左右</option>"
    Response.Write "</select>， <select name='" & ShiYou & "3'>"
    Response.Write "<option value=''></option>"
    Response.Write "<option value='大本'"
    If get_midstr(rsHouseList("" & "" & ShiYou & "" & ""), "学历", "") = "大本" Then Response.Write " selected"
    Response.Write ">大本学历</option>"
    Response.Write "<option value='大专'"
    If get_midstr(rsHouseList("" & "" & ShiYou & "" & ""), "学历", "") = "大专" Then Response.Write " selected"
    Response.Write ">大专学历</option>"
    Response.Write "<option value='中专'"
    If get_midstr(rsHouseList("" & "" & ShiYou & "" & ""), "学历", "") = "中专" Then Response.Write " selected"
    Response.Write ">中专学历</option>"
    Response.Write "<option value='高中'"
    If get_midstr(rsHouseList("" & "" & ShiYou & "" & ""), "学历", "") = "高中" Then Response.Write " selected"
    Response.Write ">高中学历</option>"
    Response.Write "<option value='初中'"
    If get_midstr(rsHouseList("" & "" & ShiYou & "" & ""), "学历", "") = "初中" Then Response.Write " selected"
    Response.Write ">初中学历</option>"
    Response.Write "<option value='初中以下'"
    If get_midstr(rsHouseList("" & "" & ShiYou & "" & ""), "学历", "") = "初中以下" Then Response.Write " selected"
    Response.Write ">初中以下</option>"
    Response.Write "<option value='大本以上'"
    If get_midstr(rsHouseList("" & "" & ShiYou & "" & ""), "学历", "") = "大本以上" Then Response.Write " selected"
    Response.Write ">大本以上</option>"
    Response.Write "</select>， <select name='" & ShiYou & "4'>"
    Response.Write "<option value=''></option>"
    Response.Write "<option value='在校学生'"
    If get_midstr(rsHouseList("" & "" & ShiYou & "" & ""), "身份", "") = "在校学生" Then Response.Write " selected"
    Response.Write ">在校学生</option>"
    Response.Write "<option value='进修人员'"
    If get_midstr(rsHouseList("" & "" & ShiYou & "" & ""), "身份", "") = "进修人员" Then Response.Write " selected"
    Response.Write ">进修人员</option>"
    Response.Write "<option value='营销人员'"
    If get_midstr(rsHouseList("" & "" & ShiYou & "" & ""), "身份", "") = "营销人员" Then Response.Write " selected"
    Response.Write ">营销人员</option>"
    Response.Write "<option value='文职工作'"
    If get_midstr(rsHouseList("" & "" & ShiYou & "" & ""), "身份", "") = "文职工作" Then Response.Write " selected"
    Response.Write ">文职工作</option>"
    Response.Write "<option value='体力工作'"
    If get_midstr(rsHouseList("" & "" & ShiYou & "" & ""), "身份", "") = "体力工作" Then Response.Write " selected"
    Response.Write ">体力工作</option>"
    Response.Write "<option value='服务场所'"
    If get_midstr(rsHouseList("" & "" & ShiYou & "" & ""), "身份", "") = "服务场所" Then Response.Write " selected"
    Response.Write ">服务场所</option>"
    Response.Write "<option value='夜班工作'"
    If get_midstr(rsHouseList("" & "" & ShiYou & "" & ""), "身份", "") = "夜班工作" Then Response.Write " selected"
    Response.Write ">夜班工作</option>"
    Response.Write "<option value='其他工作'"
    If get_midstr(rsHouseList("" & "" & ShiYou & "" & ""), "身份", "") = "其他工作" Then Response.Write " selected"
    Response.Write ">其他工作</option>"
    Response.Write "</select>， <select name='" & ShiYou & "5'>"
    Response.Write "<option value=''></option>"
    Response.Write "<option value='单身'"
    If get_midstr(rsHouseList("" & "" & ShiYou & "" & ""), "配偶", "") = "单身" Then Response.Write " selected"
    Response.Write ">单身</option>"
    Response.Write "<option value='有恋人'"
    If get_midstr(rsHouseList("" & "" & ShiYou & "" & ""), "配偶", "") = "有恋人" Then Response.Write " selected"
    Response.Write ">有恋人</option>"
    Response.Write "<option value='配偶同住'"
    If get_midstr(rsHouseList("" & "" & ShiYou & "" & ""), "配偶", "") = "配偶同住" Then Response.Write " selected"
    Response.Write ">配偶同住</option>"
    Response.Write "<option value='配偶分居'"
    If get_midstr(rsHouseList("" & "" & ShiYou & "" & ""), "配偶", "") = "配偶分居" Then Response.Write " selected"
    Response.Write ">配偶分居</option>"
    Response.Write "<option value='伤心恋情'"
    If get_midstr(rsHouseList("" & "" & ShiYou & "" & ""), "配偶", "") = "伤心恋情" Then Response.Write " selected"
    Response.Write ">伤心恋情</option>"
    If ShiYou = "" & "" & ShiYou & "" & "" Then
        Response.Write "</select>，<input name='" & ShiYou & "6' type='checkbox' value='忌烟'"
        If chk_midstr(rsHouseList("" & "" & ShiYou & "" & ""), "忌烟") = True Then Response.Write " checked"
        Response.Write ">忌烟，<input name='" & ShiYou & "6' type='checkbox' value='忌酒'"
        If chk_midstr(rsHouseList("" & "" & ShiYou & "" & ""), "忌酒") = True Then Response.Write " checked"
        Response.Write ">忌酒，<input name='" & ShiYou & "6' type='checkbox' value='忌吵闹'"
        If chk_midstr(rsHouseList("" & "" & ShiYou & "" & ""), "忌吵闹") = True Then Response.Write " checked"
        Response.Write ">忌吵闹"
    Else
        Response.Write "</select>，<input name='" & ShiYou & "6' type='checkbox' value='活泼'"
        If chk_midstr(rsHouseList("HouseShiYou"), "活泼") = True Then Response.Write " checked"
        Response.Write ">活泼，<input name='" & ShiYou & "6' type='checkbox' value='文静'"
        If chk_midstr(rsHouseList("HouseShiYou"), "文静") = True Then Response.Write " checked"
        Response.Write ">文静，<input name='" & ShiYou & "6' type='checkbox' value='会家务'"
        If chk_midstr(rsHouseList("HouseShiYou"), "会家务") = True Then Response.Write " checked"
        Response.Write ">会家务"
    End If
    Response.Write "</td>"
End Sub

Sub ExportHouseWeiShengStr_Modify()
    Response.Write "<td colspan='2' width='644'> "
    Response.Write "<select name='HouseWeiSheng'>"
    Response.Write "<option value=' '> </option>"
    Response.Write "<option value='毛胚'"
    If rsHouseList("HouseWeiSheng") = "毛胚" Then Response.Write " selected"
    Response.Write "> 毛胚</option>"
    Response.Write "<option value='简易卫生间'"
    If rsHouseList("HouseWeiSheng") = "简易卫生间" Then Response.Write " selected"
    Response.Write "> 简易卫生间</option>"
    Response.Write "<option value='精美卫生间'"
    If rsHouseList("HouseWeiSheng") = "精美卫生间" Then Response.Write " selected"
    Response.Write "> 精美卫生间</option>"
    Response.Write "<option value='豪华卫生间'"
    If rsHouseList("HouseWeiSheng") = "豪华卫生间" Then Response.Write " selected"
    Response.Write "> 豪华卫生间</option>"
    Response.Write "</select>"
    Response.Write "</td>"
End Sub

Sub ExportHouseShiZhengStr_Modify()

    Response.Write "<tr class='tdbg'> "
    If ClassID = 3 Or ClassID = 4 Then
        Response.Write "<td width='120' align='right'><strong>期望附近：</strong></td>"
    Else
        Response.Write "<td width='120' align='right'><strong>附近配套：</strong></td>"
    End If
    Response.Write "<td colspan='2' > "
    If ClassID = 4 Then
        Response.Write "公交<input type='text' name='HouseShiZheng1' maxlength='80' size='15' value='" & get_midstr(rsHouseList("HouseShiZheng"), "公交", "路") & "'> 路，"
    End If
    If ClassID = 3 Then
        Response.Write "<input name='HouseShiZheng' type='checkbox' value='公交'"
        If chk_midstr(rsHouseList("HouseShiZheng"), "公交") = True Then Response.Write " checked"
        Response.Write ">公交，"
    End If
    Response.Write "<input name='HouseShiZheng' type='checkbox' value='公园'"
    If chk_midstr(rsHouseList("HouseShiZheng"), "公园") = True Then Response.Write " checked"
    Response.Write ">公园，"
    Response.Write "<input name='HouseShiZheng' type='checkbox' value='银行'"
    If chk_midstr(rsHouseList("HouseShiZheng"), "银行") = True Then Response.Write " checked"
    Response.Write ">银行，"
    Response.Write "<input name='HouseShiZheng' type='checkbox' value='医院'"
    If chk_midstr(rsHouseList("HouseShiZheng"), "医院") = True Then Response.Write " checked"
    Response.Write ">医院，"
    Response.Write "<input name='HouseShiZheng' type='checkbox' value='菜场'"
    If chk_midstr(rsHouseList("HouseShiZheng"), "菜场") = True Then Response.Write " checked"
    Response.Write ">菜场，"
    Response.Write "<input name='HouseShiZheng' type='checkbox' value='学校'"
    If chk_midstr(rsHouseList("HouseShiZheng"), "学校") = True Then Response.Write " checked"
    Response.Write ">学校，"
    Response.Write "<input name='HouseShiZheng' type='checkbox' value='邮局'"
    If chk_midstr(rsHouseList("HouseShiZheng"), "邮局") = True Then Response.Write " checked"
    Response.Write ">邮局，"
    Response.Write "<input name='HouseShiZheng' type='checkbox' value='超市'"
    If chk_midstr(rsHouseList("HouseShiZheng"), "超市") = True Then Response.Write " checked"
    Response.Write ">超市 "
    Response.Write "</td>"
    Response.Write "</tr>"
End Sub

Sub ExportHouseZuJinStr_Modify()

    Dim i
    Response.Write "<tr class='tdbg'>"
    If ClassID = 4 Then
        Response.Write "<td width='120' align='right'><strong>期望租金：</strong></td>"
    Else
        Response.Write "<td width='120' align='right'><strong>租金：</strong></td>"
    End If
    Response.Write "<td width='289'>"
    If ClassID = 4 Then
        Response.Write "<input type='text' name='HouseZuJin1' size='10'  maxlength='8' value=" & rsHouseList("HouseZuJin1") & ">-"
        Response.Write "<input type='text' name='HouseZuJin2' size='10'  maxlength='8' value=" & rsHouseList("HouseZuJin2") & ">"
    Else
        Response.Write "<input type='text' name='HouseZuJin' size='10'  maxlength='8' value=" & rsHouseList("HouseZuJin") & ">"
    End If
    Response.Write "<font color='#FF0000'>*</font>"
    If ClassID = 4 Then
        Response.Write "<select name='HouseZuJinType' onchange=change_value(1)>"
    Else
        Response.Write "<select name='HouseZuJinType' onchange=change_value(0)>"
    End If
    Response.Write "<option value='元/周'"
    If rsHouseList("HouseZuJinType") = "元/周" Then Response.Write " selected"
    Response.Write ">元/周</option>"
    Response.Write "<option value='元/月'"
    If rsHouseList("HouseZuJinType") = "元/月" Then Response.Write " selected"
    Response.Write ">元/月</option>"
    Response.Write "<option value='元/季'"
    If rsHouseList("HouseZuJinType") = "元/季" Then Response.Write " selected"
    Response.Write ">元/季</option>"
    Response.Write "<option value='元/年'"
    If rsHouseList("HouseZuJinType") = "元/年" Then Response.Write " selected"
    Response.Write ">元/年</option>"
    Response.Write "<option value='元/天'"
    If rsHouseList("HouseZuJinType") = "元/天" Then Response.Write " selected"
    Response.Write ">元/天</option>"
    Response.Write "<option value='价格面议'"
    If rsHouseList("HouseZuJinType") = "价格面议" Then Response.Write " selected"
    Response.Write ">价格面议</option>"
    Response.Write "</select>"
    Response.Write "</td>"
    Response.Write "<td width='348'><strong>租金支付：</strong>"
    Response.Write "<select name='HouseZhiFu'>"
    Response.Write "<option value='每月'"
    If rsHouseList("HouseZhiFu") = "每月" Then Response.Write " selected"
    Response.Write ">每月</option>"
    Response.Write "<option value='每季'"
    If rsHouseList("HouseZhiFu") = "每季" Then Response.Write " selected"
    Response.Write ">每季</option>"
    Response.Write "<option value='每半年'"
    If rsHouseList("HouseZhiFu") = "每半年" Then Response.Write " selected"
    Response.Write ">每半年</option>"
    Response.Write "<option value='每年'"
    If rsHouseList("HouseZhiFu") = "每年" Then Response.Write " selected"
    Response.Write ">每年</option>"
    Response.Write "<option value='每周'"
    If rsHouseList("HouseZhiFu") = "每周" Then Response.Write " selected"
    Response.Write ">每周</option>"
    Response.Write "</select>"
    Response.Write "一付"
    Response.Write "</td>"
    Response.Write "</tr>"
End Sub

Sub ExportTimeLimitStr_Modify(LimitName)
    
    Dim i
    If ClassID = 1 Or ClassID = 3 Then
        Response.Write "<tr class='tdbg'> "
        Response.Write "<td width='120' align='right'><strong>交房时间：</strong></td>"
        Response.Write "<td colspan='2' > "
    End If
    Response.Write "<select name='" & LimitName & "Year'>"
    Response.Write "<option value=''></option>"
    For i = 2006 To 2014
        Response.Write "<option value='" & i & "'"
        If Year(rsHouseList("" & LimitName & "Date")) = i Then Response.Write " selected"
        Response.Write ">" & i & "</option>"
    Next
    Response.Write "</select>年"
    Response.Write "<select name='" & LimitName & "Month'>"
    Response.Write "<option value=''></option>"
    For i = 1 To 12
        Response.Write "<option value='" & i & "'"
        If Month(rsHouseList("" & LimitName & "Date")) = i Then Response.Write " selected"
        Response.Write ">" & i & "</option>"
    Next
    Response.Write "</select>月"
    Response.Write "<select name='" & LimitName & "Day'>"
    Response.Write "<option value=''></option>"
    For i = 1 To 31
        Response.Write "<option value='" & i & "'"
        If Day(rsHouseList("" & LimitName & "Date")) = i Then Response.Write " selected"
        Response.Write ">" & i & "</option>"
    Next
    Response.Write "</select>日 <font color='#FF0000'>*</font>"
    If ClassID = 1 Or ClassID = 3 Then
        Response.Write "</td>"
        Response.Write "</tr>"
    End If
End Sub

Function add_str(str, addstr)
    If addstr = "" Or IsNull(addstr) Then
        add_str = str
        Exit Function
    End If
    If str = "" Or IsNull(str) Then
        add_str = addstr
    Else
        add_str = str & "," & addstr
    End If
End Function

Function get_midstr(str, startstr, endstr)
    Dim tempstr, arrstr, i
    tempstr = ""
    If str = "" Or IsNull(str) Then
        get_midstr = ""
        Exit Function
    End If
    If InStr(str, ",") > 0 Then
        arrstr = Split(str, ",")
        For i = 0 To UBound(arrstr)
            If Left(Trim(arrstr(i)), Len(startstr)) = startstr And Right(Trim(arrstr(i)), Len(endstr)) = endstr Then
                tempstr = Replace(arrstr(i), startstr, "")
                tempstr = Replace(tempstr, endstr, "")
                get_midstr = tempstr
                Exit For
            End If
        Next
    Else
        If Left(Trim(str), Len(startstr)) = startstr And Right(Trim(str), Len(endstr)) = endstr Then
            tempstr = Replace(str, startstr, "")
            tempstr = Replace(tempstr, endstr, "")
            get_midstr = tempstr
        End If
    End If
End Function

Function chk_midstr(str, chkstr)
    Dim arrstr, i
    chk_midstr = False
    If str = "" Or IsNull(str) Then
        chk_midstr = False
        Exit Function
    End If
    If InStr(str, ",") > 0 Then
        arrstr = Split(str, ",")
        For i = 0 To UBound(arrstr)
            If Trim(arrstr(i)) = chkstr Then
                chk_midstr = True
                Exit For
            End If
        Next
    Else
        If Trim(str) = chkstr Then
            chk_midstr = True
        End If
    End If
End Function

Sub ShowPath(RootName)
    Response.Write "&nbsp;" & ChannelName & "管理&nbsp;&gt;&gt;&nbsp;<a href='" & FileName & "'>" & RootName & "</a>&nbsp;&gt;&gt;&nbsp;"
    If ClassID > 0 Then
        Response.Write "<a href='" & FileName & "&ClassID=" & ClassID & "'><font color=red>" & ClassName & "</font></a>&nbsp;&gt;&gt;&nbsp;"
    End If
    If Keyword = "" Then
        If Status = 3 Then
            Response.Write "所有<font color=green>已审核</font>的" & ChannelShortName & ""
        ElseIf Status = 0 Then
            Response.Write "所有<font color=blue>未审核</font>的" & ChannelShortName & ""
        Else
            Response.Write "所有" & ChannelShortName & ""
        End If
    Else
        Select Case strField
        Case "HouseDiZhi"
            Response.Write "房产地址中含有 <font color=red>" & Keyword & "</font> "
        Case "HouseQuYu"
            Response.Write "房产区域中含有 <font color=red>" & Keyword & "</font> "
        Case "HouseHuXing"
            Response.Write "房产户型中含有 <font color=red>" & Keyword & "</font> "
        Case "Editor"
            Response.Write "<font color=red>" & Keyword & "</font> 添加"
        Case "ContactName"
            Response.Write "联系人是 <font color=red>" & Keyword & "</font> "
        Case Else
            Response.Write "房产地址中含有 <font color=red>" & Keyword & "</font> "
        End Select
        If Status = 3 Then
            Response.Write "并且<font color=green>已审核</font>的" & ChannelShortName & ""
        ElseIf Status = 0 Then
            Response.Write "并且<font color=blue>未审核</font>的" & ChannelShortName & ""
        Else
            Response.Write "的" & ChannelShortName
        End If
    End If
End Sub

%>
