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

Const NeedCheckComeUrl = True   '是否需要检查外部访问

Const PurviewLevel = 2      '0--不检查，1--超级管理员，2--普通管理员
Const PurviewLevel_Channel = 3   '0--不检查，1--频道管理员，2--栏目总编，3--栏目管理员
Const PurviewLevel_Others = ""   '其他权限

If AdminPurview > 1 Then
    arrClass_View = arrKind_House(0) & ""
    arrClass_Input = arrKind_House(1) & ""
    arrClass_Check = arrKind_House(2) & ""
    arrClass_Manage = arrKind_House(3) & ""
End If
Dim ManageType
Dim InfoType
Dim Status
Dim HouseTableName
Dim PurviewChecked
Dim ClassID, SpecialID, OnTop, IsElite, IsHot, Created
Dim tClass, ClassName, RootID, ParentID, Depth, ParentPath, Child, arrChildID, ParentDir, ClassDir, ClassPurview
Dim HouseID, rsHouseList

ManageType = Trim(Request("ManageType"))
InfoType = Trim(Request("InfoType"))
Status = Trim(Request("Status"))
OnTop = Trim(Request("OnTop"))
IsElite = Trim(Request("IsElite"))
IsHot = Trim(Request("IsHot"))
ClassID = PE_CLng(Trim(Request("ClassID")))
SpecialID = PE_CLng(Trim(Request("SpecialID")))
HouseID = PE_CLng(Trim(Request("HouseID")))

If InfoType = "" Then
    InfoType = "ChuShou"
Else
    InfoType = ReplaceBadChar(InfoType)
End If
If ClassID < 1 Or ClassID > 5 Then
    ClassID = 1
End If
If Status = "" Then
    Status = 9
End If

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

FileName = "Admin_House.asp?ChannelID=" & ChannelID & "&Action=" & Action & "&ManageType=" & ManageType
strFileName = FileName & "&ClassID=" & ClassID & "&InfoType=" & InfoType & "&Field=" & strField & "&keyword=" & Keyword
strFileName = strFileName & "&OnTop=" & OnTop & "&IsElite=" & IsElite & "&IsHot=" & IsHot
    
    
Response.Write "<html><head><title>" & ChannelShortName & "管理</title>" & vbCrLf
Response.Write "<meta http-equiv='Content-Type' content='text/html; charset=gb2312'>" & vbCrLf
Response.Write "<link href='Admin_Style.css' rel='stylesheet' type='text/css'>" & vbCrLf
Response.Write "</head>" & vbCrLf
Response.Write "<body leftmargin='2' topmargin='0' marginwidth='0' marginheight='0'>" & vbCrLf
Response.Write "<table width='100%' border='0' align='center' cellpadding='2' cellspacing='1' class='border'>"
Dim strTitle
strTitle = ChannelName & "管理----"
Select Case Action
Case "Add"
    strTitle = strTitle & "添加" & ChannelShortName
Case "Modify"
    strTitle = strTitle & "修改" & ChannelShortName
Case "SaveAdd", "SaveModify"
    strTitle = strTitle & "保存" & ChannelShortName
Case "Move"
    strTitle = strTitle & "移动" & ChannelShortName
Case "AddArea"
    strTitle = strTitle & "添加区域"
Case "ModifyArea"
    strTitle = strTitle & "修改区域"
Case "ManageArea"
    strTitle = strTitle & "管理区域"
Case "Preview", "Show"
    strTitle = strTitle & "预览" & ChannelShortName
Case "ModifyConfig"
    strTitle = strTitle & ChannelShortName & "信息配置"
Case "Manage"
    Select Case ManageType
    Case "Check"
        strTitle = strTitle & ChannelShortName & "审核"
    Case "RecycleBin"
        strTitle = strTitle & ChannelShortName & "回收站管理"
    Case Else
        strTitle = strTitle & ChannelShortName & "管理首页"
    End Select
End Select
Call ShowPageTitle(strTitle, 10171)
Response.Write "<table width='100%' border='0' align='center' cellpadding='2' cellspacing='1' class='border'>"
If Action = "ManageArea" Or Action = "ModifyArea" Or Action = "AddArea" Then
    Response.Write "<form name='form4' method='Post' action='" & strFileName & "'><tr class='tdbg'>"
    Response.Write "  <td width='70' height='30'><strong>管理导航：</strong></td>"
    Response.Write "  <td ><a href='Admin_House.asp?ChannelID=" & ChannelID & "&Action=ManageArea'>区域管理首页</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href='Admin_House.asp?ChannelID=" & ChannelID & "&Action=AddArea'>添加区域</a></td></tr></table></form>"
End If
If Action = "Manage" Then
    Response.Write "<form name='form3' method='Post' action='" & strFileName & "'><tr class='tdbg'>"
    Response.Write "  <td width='70' height='30' ><strong>" & ChannelShortName & "选项：</strong></td><td>"
    Response.Write "  <input name='Status' type='radio' value=9 onclick='submit();'"
    If Status = 9 Then Response.Write " checked"
    Response.Write ">所有" & ChannelShortName & "&nbsp;&nbsp;&nbsp;&nbsp;<input name='Status' type='radio' value='0' onclick='submit();'"
    If Status = 0 Then Response.Write " checked"
    Response.Write ">未审核的" & ChannelShortName & "&nbsp;&nbsp;&nbsp;&nbsp;<input name='Status' type='radio' value=3 onclick='submit();'"
    If Status = 3 Then Response.Write " checked"
    Response.Write ">已审核的" & ChannelShortName & "</td><td><input name='OnTop' type='checkbox' value='True' onclick='submit()'"
    If OnTop = "True" Then Response.Write "checked"
    Response.Write "> 固顶" & ChannelShortName & "&nbsp;&nbsp;&nbsp;&nbsp;<input name='IsElite' type='checkbox' value='True' onclick='submit()'"
    If IsElite = "True" Then Response.Write "checked"
    Response.Write "> 推荐" & ChannelShortName & "&nbsp;&nbsp;&nbsp;&nbsp;<input name='IsHot' type='checkbox' value='True' onclick='submit()'"
    If IsHot = "True" Then Response.Write "checked"
    Response.Write "> 热门" & ChannelShortName
    Response.Write "</td></tr></form>" & vbCrLf
End If
Response.Write "</table><br>" & vbCrLf
Select Case Action
Case "Add"
    Call Add
Case "AddArea"
    Call AddArea
Case "ModifyArea"
    Call ModifyArea
Case "SaveArea", "SaveModifyArea"
    Call SaveArea
Case "ManageArea"
    Call ManageArea
Case "DelArea"
    Call DelArea
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 "SetOnTop", "CancelOnTop", "SetElite", "CancelElite", "SetStatus", "CancelStatus", "SetNew"
    Call SetProperty
Case "ModifyConfig"
    Call ModifyConfig
Case "SaveConfigModify"
    Call SaveConfigModify
Case "Show"
    Call Show
Case "Del"
    Call Del
Case "ConfirmDel"
    Call ConfirmDel
Case "ClearRecyclebin"
    Call ClearRecyclebin
Case "Restore"
    Call Restore
Case "RestoreAll"
    Call RestoreAll
Case "Manage"
    Call main
End Select
If FoundErr = True Then
    Call WriteErrMsg(ErrMsg, ComeUrl)
End If
Call CloseConn

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.HeZhuType.value=='')"
    Response.Write "{"
    Response.Write "    ShowTabs(0);" & vbCrLf
    Response.Write "alert('合租类型不能为空！');"
    Response.Write "document.myform.HeZhuType.focus();"
    Response.Write "return false;"
    Response.Write "}"
    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.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 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>" & vbCrLf
End Sub

Sub main()
    Dim arrUser, i, NotReceiveUser
    Dim rsHouse, sql, Querysql
    PurviewChecked = False
    If strField = "" And AdminPurview = 2 And AdminPurview_Channel = 3 Then
        If Not CheckPurview_Class(arrClass_Manage, ClassID) And Not CheckPurview_Class(arrClass_Check, ClassID) And Not CheckPurview_Class(arrClass_View, ClassID) Then
            FoundErr = True
            ErrMsg = ErrMsg & "<li>对不起，您没有在此频道管理" & ChannelShortName & "的权限！</li>"
            Exit Sub
        End If
    End If
    If ClassID > 0 And PurviewChecked = False Then
        Set tClass = Conn.Execute("select ClassName from PE_HouseConfig where ClassID=" & ClassID)
        If tClass.BOF And tClass.EOF Then
            FoundErr = True
            ErrMsg = ErrMsg & "<li>找不到指定的栏目</li>"
        Else
            ClassName = tClass(0)
        End If
        Set tClass = Nothing
        If ManageType = "Check" Then
            PurviewChecked = CheckPurview_Class(arrClass_Check, ClassID)
        Else
            PurviewChecked = CheckPurview_Class(arrClass_Manage, ClassID)
        End If
    End If
    If FoundErr = True Then Exit Sub
    
    Call ShowJS_Main(ChannelShortName)
    Response.Write "<table width='100%' border='0' align='center' cellpadding='0' cellspacing='0'>"
    Response.Write "  <tr><td height='22'>"
    If ManageType = "Check" Then
        Call ShowContentManagePath(ChannelShortName & "审核")
    ElseIf ManageType = "RecycleBin" Then
        Call ShowContentManagePath(ChannelShortName & "回收站管理")
    Else
        Call ShowContentManagePath(ChannelShortName & "管理")
    End If
    Response.Write "</td><td width='200' 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>出售房源</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 "    </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='Admin_House.asp?ChannelID=" & ChannelID & "&ClassID=" & ClassID & "' 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 InfoType
    Case "ChuShou"
        Response.Write "<td align='center'><strong>房产地址</strong></td>"
        Response.Write "<td align='center'><strong>户型</strong></td>"
        Response.Write "<td align='center'><strong>售价</strong></td>"
    Case "ChuZhu"
        Response.Write "<td align='center'><strong>房产地址</strong></td>"
        Response.Write "<td align='center'><strong>户型</strong></td>"
        Response.Write "<td align='center'><strong>租金</strong></td>"
    Case "QiuGou"
        Response.Write "<td align='center'><strong>欲购地段</strong></td>"
        Response.Write "<td align='center'><strong>欲购户型</strong></td>"
        Response.Write "<td align='center'><strong>期望价格</strong></td>"
    Case "QiuZhu"
        Response.Write "<td align='center'><strong>欲租地址</strong></td>"
        Response.Write "<td align='center'><strong>欲租户型</strong></td>"
        Response.Write "<td align='center'><strong>租金范围</strong></td>"
    Case "HeZhu"
        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'><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'><strong>有效期</strong></td>"
    Response.Write "<td align='center'><strong>审核</strong></td>"
    Response.Write "<td align='center'><strong>操作</strong></td>"
    Response.Write "          </tr>"
    
    Select Case InfoType
    Case "ChuShou"
        sql = "select top " & MaxPerPage & "  F.HouseID,F.ClassID,C.ClassName,C.ClassDir,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 "ChuZhu"
         sql = "select top " & MaxPerPage & " F.HouseID,F.ClassID,C.ClassName,C.ClassDir,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 "QiuGou"
         sql = "select top " & MaxPerPage & " F.HouseID,F.ClassID,C.ClassName,C.ClassDir,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 "QiuZhu"
         sql = "select top " & MaxPerPage & " F.HouseID,F.ClassID,C.ClassName,C.ClassDir,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 "HeZhu"
         sql = "select top " & MaxPerPage & " F.HouseID,F.ClassID,C.ClassName,C.ClassDir,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
        ErrMsg = ErrMsg & "参数错误！"
        Exit Sub
    End Select
    Querysql = Querysql & " where F.ChannelID=" & ChannelID & ""
    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 ManageType = "MyHouse" Then
        Querysql = Querysql & " and F.Editor='" & UserName & "' "
    Else
        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
    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 Child = 0 Then
            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
            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></td></tr>"
            End If
        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='Admin_House.asp?ChannelID=" & ChannelID & "&Action=Show&ClassID=" & ClassID & "&HouseID=" & rsHouse("HouseID") & "&Editor=" & rsHouse("Editor") & "'"
            Response.Write "'>" & rsHouse("HouseDiZhi")
            Response.Write "</a>"
            Response.Write "</td>"
            Response.Write "        <td align='center'>"
            Response.Write "<a href='Admin_House.asp?ChannelID=" & ChannelID & "&Action=Show&ClassID=" & ClassID & "&HouseID=" & rsHouse("HouseID") & "&Editor=" & rsHouse("Editor") & "'"
            Response.Write "'>" & rsHouse("HouseHuXing")
            Response.Write "</a>"
            Response.Write "</td>"
            Select Case InfoType
            Case "ChuShou"
                Response.Write "<td align='center'>" & rsHouse("TotalPrice") & " " & rsHouse("HousePriceType") & "</td>"
            Case "ChuZhu", "HeZhu"
                Response.Write "<td align='center'>" & rsHouse("HouseZuJin") & " " & rsHouse("HouseZuJinType") & "</td>"
            Case "QiuGou"
                Response.Write "<td align='center'>" & rsHouse("HousePrice1") & "-" & rsHouse("HousePrice2") & " " & rsHouse("HousePriceType") & "</td>"
            Case "QiuZhu"
                Response.Write "<td align='center'>" & rsHouse("HouseZuJin1") & "-" & rsHouse("HouseZuJin2") & " " & rsHouse("HouseZuJinType") & "</td>"
            End Select
            Response.Write "      <td align='center'>" & rsHouse("Editor") & "</td>"
            Response.Write "      <td align='center'>" & rsHouse("contactPhone") & "</td>"
            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'>" & 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>"
            Select Case ManageType
            Case "RecycleBin"
                Response.Write "<td width='100' align='center'>"
                Response.Write "<a href='Admin_House.asp?ChannelID=" & ChannelID & "&Action=ConfirmDel&ClassID=" & ClassID & "&HouseID=" & rsHouse("HouseID") & "' onclick=""return confirm('确定要彻底删除此" & ChannelShortName & "信息吗？彻底删除后将无法还原！');"">彻底删除</a> "
                Response.Write "<a href='Admin_House.asp?ChannelID=" & ChannelID & "&Action=Restore&ClassID=" & ClassID & "&HouseID=" & rsHouse("HouseID") & "'>还原</a>"
                Response.Write "</td>"
            Case Else
                Response.Write "    <td width='180' align='left'>&nbsp;"
                If AdminPurview = 1 Or AdminPurview_Channel <= 2 Or CheckPurview_Class(arrClass_Manage, ClassID) Or UserName = rsHouse("Editor") Then
                    Response.Write "<a href='Admin_House.asp?ChannelID=" & ChannelID & "&Action=Modify&ClassID=" & ClassID & "&HouseID=" & rsHouse("HouseID") & "'>修改</a>&nbsp;"
                Else
                    Response.Write ""
                End If
                If AdminPurview = 1 Or AdminPurview_Channel <= 2 Or CheckPurview_Class(arrClass_Manage, ClassID) Or UserName = rsHouse("Editor") Then
                    Response.Write "<a href='Admin_House.asp?ChannelID=" & ChannelID & "&ClassID=" & ClassID & "&Action=Del&HouseID=" & rsHouse("HouseID") & "' onclick=""return confirm('确定要删除此" & ChannelShortName & "信息吗？删除后你还可以从回收站中还原。');"">删除</a>&nbsp;"
                Else
                    Response.Write ""
                End If
                If AdminPurview = 1 Or AdminPurview_Channel <= 2 Or CheckPurview_Class(arrClass_Manage, ClassID) Then
                    If rsHouse("OnTop") = False Then
                        Response.Write "<a href='Admin_House.asp?ChannelID=" & ChannelID & "&ClassID=" & ClassID & "&Action=SetOnTop&HouseID=" & rsHouse("HouseID") & "'>固顶</a>&nbsp;"
                    Else
                        Response.Write "<a href='Admin_House.asp?ChannelID=" & ChannelID & "&ClassID=" & ClassID & "&Action=CancelOnTop&HouseID=" & rsHouse("HouseID") & "'>解固</a>&nbsp;"
                    End If
                    If rsHouse("Elite") = False Then
                        Response.Write "<a href='Admin_House.asp?ChannelID=" & ChannelID & "&ClassID=" & ClassID & "&Action=SetElite&HouseID=" & rsHouse("HouseID") & "'>设为推荐</a>&nbsp;"
                    Else
                        Response.Write "<a href='Admin_House.asp?ChannelID=" & ChannelID & "&ClassID=" & ClassID & "&Action=CancelElite&HouseID=" & rsHouse("HouseID") & "'>取消推荐</a>&nbsp;"
                    End If
                    Response.Write "<a href='Admin_House.asp?ChannelID=" & ChannelID & "&ClassID=" & ClassID & "&Action=SetNew&HouseID=" & rsHouse("HouseID") & "'>提升</a>"
                End If
                Response.Write "</td>"
            End Select
            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>"
    If ManageType = "RecycleBin" Then
        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='ConfirmDel'"" value='彻底删除选定的" & ChannelShortName & "'>&nbsp;"
        Response.Write "<input name='Submit2' type='submit' id='Submit2' onClick=""document.myform.Action.value='ClearRecyclebin'"" value='清空回收站'>&nbsp;&nbsp;&nbsp;&nbsp;"
        Response.Write "<input name='Submit3' type='submit' id='Submit3' onClick=""document.myform.Action.value='Restore'"" value='还原选定的" & ChannelShortName & "'>&nbsp;"
        Response.Write "<input name='Submit4' type='submit' id='Submit4' onClick=""document.myform.Action.value='RestoreAll'"" value='还原所有" & ChannelShortName & "'>"
    Else
        Response.Write "<input name='ClassID' type='hidden' id='ClassID' value=" & ClassID & ">"
        If AdminPurview = 1 Or (AdminPurview = 2 And AdminPurview_Channel = 1) Or CheckPurview_Class(arrClass_Manage, ClassID) Then Response.Write "<input name='submit1' type='submit' value='删除选定的" & ChannelShortName & "' onClick=""document.myform.Action.value='Del'"">&nbsp;&nbsp;"
        If AdminPurview = 1 Or (AdminPurview = 2 And AdminPurview_Channel = 1) Or CheckPurview_Class(arrClass_Check, ClassID) Then Response.Write "<input name='submit1' type='submit' id='submit1' onClick=""document.myform.Action.value='SetStatus'"" value='审核通过选定的" & ChannelShortName & "'>&nbsp;&nbsp;"
        If AdminPurview = 1 Or (AdminPurview = 2 And AdminPurview_Channel = 1) Or CheckPurview_Class(arrClass_Check, ClassID) Then Response.Write "<input name='submit2' type='submit' id='submit2' onClick=""document.myform.Action.value='CancelStatus'"" value='取消审核选定的" & ChannelShortName & "'>&nbsp;&nbsp;"
    End If
    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' id='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 ManageArea()
    Dim rsAreaList, sql, totalPut, Querysql
    If AdminPurview = 2 And AdminPurview_Channel > 2 Then
        FoundErr = True
        ErrMsg = ErrMsg & "<li>对不起，你没权限访问此页面！</li>"
        Exit Sub
    End If
    Call ShowJS_Main(ChannelShortName)
    Response.Write "    <form name='myform' method='Post' action='Admin_House.asp?ChannelID=" & ChannelID & "' onsubmit='return ConfirmDel();'>"
    Response.Write "<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><td width='200' align='center'><strong>区 域 名</strong></td><td width='200' align='center'><strong>所 属 省 份</strong></td><td width='100' align='center'><strong>操 作</strong></td></tr>"

    Set rsAreaList = Server.CreateObject("adodb.recordset")
    sql = "select top " & MaxPerPage & " * from PE_HouseArea where 1=1"
    totalPut = PE_CLng(Conn.Execute("select Count(*) from PE_HouseArea ")(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 AreaID < (select min(AreaID) from (select top " & ((CurrentPage - 1) * MaxPerPage) & " AreaID from PE_HouseArea order by AreaID desc) as QueryArea) "
    End If
    sql = sql & Querysql & " order by AreaID desc"
    rsAreaList.open sql, Conn, 1, 1
    If rsAreaList.EOF Then
        Response.Write "<tr class='tdbg'><td colspan='5' align='center'><br><p>没有任何区域</p><br></td></tr>"
    Else
        Do While Not rsAreaList.EOF
            Response.Write "      <tr class='tdbg' onmouseout=""this.style.backgroundColor=''"" onmouseover=""this.style.backgroundColor='#BFDFFF'"">"
            Response.Write "        <td width='30' align='center'><input name='AreaID' type='checkbox' onclick='unselectall()' id='AreaID' value='" & rsAreaList("AreaID") & "'></td>"
            Response.Write "        <td width='25' align='center'>" & rsAreaList("AreaID") & "</td>"
            Response.Write "        <td width='200' align='center'>" & rsAreaList("AreaName") & "</td>"
            Response.Write "        <td width='200' align='center'>" & rsAreaList("Province") & "</td>"
            Response.Write "        <td width='100' align='center'><a href=Admin_House.asp?ChannelID=" & ChannelID & "&Action=ModifyArea&AreaID=" & rsAreaList("AreaID") & ">修改</a>&nbsp;&nbsp;<a href=Admin_House.asp?ChannelID=" & ChannelID & "&Action=DelArea&AreaID=" & rsAreaList("AreaID") & ">删除</a></td>"
            rsAreaList.MoveNext
        Loop
    End If
    Response.Write "</tr></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'>选中本页显示的所有区域</td><td>"
    Response.Write "<input name='submit1' type='submit' value='删除选定的区域' onClick=""document.myform.Action.value='DelArea'"">"
    Response.Write "    <input type='hidden' name='Action' id='Action'>"
    Response.Write "</tr></table></form>"
    If totalPut > 0 Then
        Response.Write ShowPage(strFileName, totalPut, MaxPerPage, CurrentPage, True, True, "个区域" & "", True)
    End If
    rsAreaList.Close
    Set rsAreaList = Nothing
End Sub

Sub AddArea()
    Response.Write "<table width='100%'><tr><td align='left'>您现在的位置：<a href='Admin_House.asp?ChannelID=" & ChannelID & "'>" & ChannelName & "管理</a>&nbsp;&gt;&gt;&nbsp;<font color=red>添加区域</font></td></tr></table>"
    Response.Write "<form method='POST' name='myform' action='Admin_House.asp?ChannelID=" & ChannelID & "' target='_self'>"
    Response.Write "<table class='border' border='0' cellspacing='1' width='100%' cellpadding='0'>"
    Response.Write "    <tr class='title'> "
    Response.Write "      <td height='22' colspan='2'> <div align='center'><strong>添 加 区 域</strong></div></td>"
    Response.Write "    </tr>"
    Response.Write "    <tr class='tdbg'> "
    Response.Write "      <td width='40%' align='right' class='tdbg'><strong> 区 域 名 称：</strong></td><td><input name='AreaName' type='text'> <font color='#FF0000'>*</font>填写区或市名，如:宣武区</td>"
    Response.Write "    </tr>"
    Response.Write "    <tr class='tdbg'> "
    Response.Write "      <td width='40%' align='right' class='tdbg'><strong> 所 属 省 份：</strong></td><td><input name='Province' type='text'> <font color='#FF0000'>*</font></td>"
    Response.Write "    </tr>"
    Response.Write "  <tr>"
    Response.Write "  <td height='40' colspan='2' align='center' class='tdbg'>"
    Response.Write "    <input name='Action' type='hidden' id='Action' value='SaveArea'>"
    Response.Write "    <input  type='submit' name='Submit' value=' 添 加 ' style='cursor:hand;'>&nbsp;<input name='Cancel' type='button' id='Cancel' value=' 取 消 ' onClick=""window.location.href='Admin_House.asp?ChannelID=" & ChannelID & "&Action=AddArea';"" style='cursor:hand;'></td>"
    Response.Write "  </tr>"
    Response.Write "</table></form>"
End Sub

Sub ModifyArea()
    Dim rsArea, AreaID
    AreaID = Trim(Request("AreaID"))
    If AreaID = "" Then
        FoundErr = True
        ErrMsg = "请指定区域的ID！"
        Exit Sub
    Else
        AreaID = PE_CLng(AreaID)
    End If
    Set rsArea = Conn.Execute("select * from PE_HouseArea where AreaID=" & AreaID & "")
    Response.Write "<table width='100%'><tr><td align='left'>您现在的位置：<a href='Admin_House.asp?ChannelID=" & ChannelID & "'>" & ChannelName & "管理</a>&nbsp;&gt;&gt;&nbsp;<font color=red>修改区域</font></td></tr></table>"
    Response.Write "<form method='POST' name='myform' action='Admin_House.asp?ChannelID=" & ChannelID & "&AreaID=" & AreaID & "' target='_self'>"
    Response.Write "<table class='border' border='0' cellspacing='1' width='100%' cellpadding='0'>"
    Response.Write "    <tr class='title'> "
    Response.Write "      <td height='22' colspan='2'> <div align='center'><strong>修 改 区 域</strong></div></td>"
    Response.Write "    </tr>"
    Response.Write "    <tr class='tdbg'> "
    Response.Write "      <td width='40%' align='right' class='tdbg'><strong> 区 域 名 称：</strong></td><td><input name='AreaName' type='text' value=" & rsArea("AreaName") & "> <font color='#FF0000'>*</font>填写区或市名，如:宣武区</td>"
    Response.Write "    </tr>"
    Response.Write "    <tr class='tdbg'> "
    Response.Write "      <td width='40%' align='right' class='tdbg'><strong> 所 属 省 份：</strong></td><td><input name='Province' type='text' value=" & rsArea("Province") & "> <font color='#FF0000'>*</font></td>"
    Response.Write "    </tr>"
    Response.Write "  <tr>"
    Response.Write "  <td height='40' colspan='2' align='center' class='tdbg'>"
    Response.Write "    <input name='Action' type='hidden' id='Action' value='SaveModifyArea'>"
    Response.Write "    <input  type='submit' name='Submit' value=' 修 改 ' style='cursor:hand;'>&nbsp;<input name='Cancel' type='button' id='Cancel' value=' 取 消 ' onClick=""window.location.href='Admin_House.asp?ChannelID=" & ChannelID & "&Action=AddArea';"" style='cursor:hand;'></td>"
    Response.Write "  </tr>"
    Response.Write "</table></form>"
End Sub

Sub Add()
    Dim i, ViewAllPurview, rsClass, rsHouseArea
    If AdminPurview_Channel > 1 And AdminPurview = 2 And Not CheckPurview_Class(arrClass_Input, ClassID) Then
        FoundErr = True
        ErrMsg = ErrMsg & "<li>对不起，您没有这项操作的权限！</li>"
        Exit Sub
    End If
    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
    ClassID = PE_CLng(Request("ClassID"))
    If ClassID = 0 Then
        ClassID = 1
    End If
    Set rsClass = Conn.Execute("select ClassName,ClassDir from PE_HouseConfig where ClassID=" & ClassID & "")
    Response.Write "<table width='100%'><tr><td align='left'>您现在的位置：<a href='Admin_House.asp?ChannelID=" & ChannelID & "'>" & ChannelName & "管理</a>&nbsp;&gt;&gt;&nbsp;添加<font color=red>" & rsClass("ClassName") & "</font>信息</td></tr></table>"
    Response.Write "<form method='POST' name='myform' onSubmit='return CheckForm" & rsClass("ClassDir") & "();' action='Admin_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' bgColor=#ffffff>"
    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'>"
    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 "<tr class='tdbg'> "
        Response.Write "<td width='120' align='right'><strong>房产属性：</strong></td>"
        Response.Write "<td colspan='2' >"
        Response.Write "<input name='OnTop' type='checkbox' id='OnTop' value='yes'>"
        Response.Write "精选固顶&nbsp;&nbsp;&nbsp;"
        Response.Write "<input name='Hot' type='checkbox' id='Hot' value='yes' onclick=""javascript:document.myform.Hits.value='" & HitsOfHot & "'"">"
        Response.Write "热门房产&nbsp;&nbsp;&nbsp; "
        Response.Write "<input name='Elite' type=checkbox id='Elite' value='yes'>"
        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' > "
        Response.Write "<select name='ViewAll'>"
        Response.Write "<option value='yes' "
        If ViewAllPurview = "Yes" Then Response.Write "selected"
        Response.Write ">浏览全部</option>"
        Response.Write "<option value='no' "
        If ViewAllPurview = "No" Then Response.Write "selected"
        Response.Write ">浏览部分</option>"
        Response.Write "</select>"
        Response.Write "&nbsp;&nbsp;<font color='#000000'>（浏览部分是指VIP级以下的会员无法看到该信息详细地址和联系方式等）</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 "<input name='UpdateTime' type='text' id='UpdateTime' value='" & Now() & "' maxlength='50' size='20'>"
        Response.Write "</td>"
        Response.Write "<td width='348'> "
        Response.Write "<strong>点击次数：</strong><input name='Hits' type='text' id='Hits' size='10' maxlength='10' value='0'>"
        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 name='Passed' type='checkbox' id='Passed' value='yes' checked>"
        Response.Write "是<font color='#000000'>（如果选中的话将直接发布，否则审核后才能发布。）</font></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='Admin_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, rsClass
    Call ShowJS_House
    If HouseID = 0 Then
        FoundErr = True
        ErrMsg = ErrMsg & "<br><li>请指定要修改的房产信息ID</li>"
        Call CloseConn
        Exit Sub
    End If
    Set rsClass = Conn.Execute("select ClassName,ClassDir from PE_HouseConfig where ClassID=" & ClassID & "")
    Response.Write "<table width='100%'><tr><td align='left'>您现在的位置：<a href='Admin_House.asp?ChannelID=" & ChannelID & "'>" & ChannelName & "管理</a>&nbsp;&gt;&gt;&nbsp;修改<font color=red>" & rsClass("ClassName") & "</font>信息</td></tr></table>"
    Response.Write "<form method='POST' name='myform' onSubmit='return CheckForm" & rsClass("ClassDir") & "();' action=Admin_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' bgColor=#ffffff>"
    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='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='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'>" & ReplaceJSImage(Server.HTMLEncode(FilterJS(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 "<tr class='tdbg'> "
    Response.Write "<td width='120' align='right'><strong>房产属性：</strong></td>"
    Response.Write "<td colspan='2' >"
    Response.Write "<input name='OnTop' type='checkbox' id='OnTop' value='yes'"
    If rsHouseList("OnTop") = True Then Response.Write "Checked"
    Response.Write ">"
    Response.Write "精选固顶&nbsp;&nbsp;&nbsp;"
    Response.Write "<input name='Hot' type='checkbox' id='Hot' value='yes' onclick=""javascript:document.myform.Hits.value=" & HitsOfHot & """"
    If rsHouseList("Hot") = True Then Response.Write "Checked"
    Response.Write ">"
    Response.Write "热门房产&nbsp;&nbsp;&nbsp; "
    Response.Write "<input name='Elite' type=checkbox id='Elite' value='yes'"
    If rsHouseList("Elite") = True Then Response.Write "Checked"
    Response.Write ">"
    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' > "
    Response.Write "<select name='ViewAll'>"
    Response.Write "<option value='yes' "
    If rsHouseList("ViewAll") = True Then Response.Write "selected"
    Response.Write ">浏览全部</option>"
    Response.Write "<option value='no' "
    If rsHouseList("ViewAll") = False Then Response.Write "selected"
    Response.Write ">浏览部分</option>"
    Response.Write "</select>"
    Response.Write "&nbsp;&nbsp;<font color='#000000'>（浏览部分是指游客无法看到该信息详细地址和联系方式等）</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 "<input name='UpdateTime' type='text' id='UpdateTime' value='" & Now() & "' maxlength='50' size='20'>"
    Response.Write "</td>"
    Response.Write "<td width='348'> "
    Response.Write "<strong>点击次数：</strong><input name='Hits' type='text' id='Hits' size='10' maxlength='10' value=" & rsHouseList("Hits") & ">"
    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 name='Passed' type='checkbox' id='Passed' value='yes' checked>"
    Response.Write "是<font color='#000000'>（如果选中的话将直接发布，否则审核后才能发布。）</font></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='Admin_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

    Dim Editor, UpdateTime, ViewAll, OnTop, Hot, Elite, Hits, Passed
    FoundErr = False

    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 Trim(Request.Form("HouseHuXing1")) <> "0" Then
        HouseHuXing = add_str(HouseHuXing, PE_CLng(Trim(Request.Form("HouseHuXing1"))) & "房")
    End If
    If Trim(Request.Form("HouseHuXing2")) <> "0" Then
        HouseHuXing = add_str(HouseHuXing, PE_CLng(Trim(Request.Form("HouseHuXing2"))) & "厅")
    End If
    If Trim(Request.Form("HouseHuXing3")) <> "0" Then
        HouseHuXing = add_str(HouseHuXing, PE_CLng(Trim(Request.Form("HouseHuXing3"))) & "卫")
    End If
    If Trim(Request.Form("HouseHuXing4")) <> "0" Then
        HouseHuXing = add_str(HouseHuXing, PE_CLng(Trim(Request.Form("HouseHuXing4"))) & "厨")
    End If
    If Trim(Request.Form("HouseHuXing5")) <> "0" Then
        HouseHuXing = add_str(HouseHuXing, PE_CLng(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 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
    If Trim(Request.Form("HouseChaoXiang1")) <> "" Then
        HouseChaoXiang = add_str(HouseChaoXiang, "客厅" & PE_HTMLEncode(Replace(Request.Form("HouseChaoXiang1"), ",", "，")))
    End If
    If Trim(Request.Form("HouseChaoXiang2")) <> "" Then
        HouseChaoXiang = add_str(HouseChaoXiang, "主卧" & PE_HTMLEncode(Replace(Request.Form("HouseChaoXiang2"), ",", "，")))
    End If
    If Trim(Request.Form("HouseChaoXiang3")) <> "" Then
        HouseChaoXiang = add_str(HouseChaoXiang, "次卧" & PE_HTMLEncode(Replace(Request.Form("HouseChaoXiang3"), ",", "，")))
    End If
    If 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 Trim(Request.Form("HouseZhuangXiu1")) <> "" Then
        HouseZhuangXiu = add_str(HouseZhuangXiu, PE_HTMLEncode(Replace(Trim(Request.Form("HouseZhuangXiu1")), " ", "")))
    End If
    If Trim(Request.Form("HouseZhuangXiu2")) <> "" Then
        HouseZhuangXiu = add_str(HouseZhuangXiu, "已住" & PE_CLng(Request.Form("HouseZhuangXiu2")) & "年")
    End If
    HouseShuiDian = PE_HTMLEncode(Replace(Trim(Request.Form("HouseShuiDian")), " ", ""))
    If Trim(Request.Form("HouseDianQi1")) <> "0" Then
        HouseDianQi = add_str(HouseDianQi, "空调" & PE_CLng(Replace(Request.Form("HouseDianQi1"), ",", "，")) & "台")
    End If
    If Trim(Request.Form("HouseDianQi2")) <> "0" Then
        HouseDianQi = add_str(HouseDianQi, "电扇" & PE_CLng(Replace(Request.Form("HouseDianQi2"), ",", "，")) & "台")
    End If
    If Trim(Request.Form("HouseDianQi3")) <> "0" Then
        HouseDianQi = add_str(HouseDianQi, "电视机" & PE_CLng(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
    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_CLng(Trim(Request.Form("JiaoFangStartYear"))) & "-" & PE_CLng(Trim(Request.Form("JiaoFangStartMonth"))) & "-" & PE_CLng(Trim(Request.Form("JiaoFangStartDay")))
    TotalPrice = PE_CDbl(Trim(Request.Form("TotalPrice")))
    OtherPrice = PE_CLng(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 = 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_CLng(Trim(Request.Form("Hits")))
    If Hits >= HitsOfHot Then Hot = "yes"
    Passed = PE_HTMLEncode(Trim(Request.Form("Passed")))
    
    If Action = "" Then
        FoundErr = True
        ErrMsg = ErrMsg & "<br><li>参数不足</li>"
    Else
        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 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

        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
            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
        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
    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
    If ViewAll = "yes" Then
        rs("ViewAll") = True
    Else
        rs("ViewAll") = False
    End If
    If Passed = "yes" Then
        rs("Passed") = True
    Else
        rs("Passed") = False
    End If
    If OnTop = "yes" Then
        rs("OnTop") = True
    Else
        rs("OnTop") = False
    End If
    If Hot = "yes" Then
        rs("Hot") = True
    Else
        rs("Hot") = False
    End If
    If Elite = "yes" Then
        rs("Elite") = True
    Else
        rs("Elite") = False
    End If
    rs("Editor") = Editor
    rs.Update
    HouseID = rs("HouseID")
    Passed = rs("Passed")
    rs.Close
    Call UpdateChannelData(ChannelID)
    If Action = "SaveAdd" Then
        If Passed = True Then
            Conn.Execute ("Update PE_HouseConfig set ItemCount=ItemCount+1 where ClassID=" & ClassID & "")
        End If
    End If
    Call SaveSuccess(HouseHuXing, HouseDiZhi, HouseXiangXiDiZhi, HouseLeiXing, ContactName, Keyword, Passed, HouseID)
    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

    FoundErr = False
    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 Trim(Request.Form("HouseHuXing1")) <> "0" Then
        HouseHuXing = add_str(HouseHuXing, PE_CLng(Trim(Request.Form("HouseHuXing1"))) & "房")
    End If
    If Trim(Request.Form("HouseHuXing2")) <> "0" Then
        HouseHuXing = add_str(HouseHuXing, PE_CLng(Trim(Request.Form("HouseHuXing2"))) & "厅")
    End If
    If Trim(Request.Form("HouseHuXing3")) <> "0" Then
        HouseHuXing = add_str(HouseHuXing, PE_CLng(Trim(Request.Form("HouseHuXing3"))) & "卫")
    End If
    If Trim(Request.Form("HouseHuXing4")) <> "0" Then
        HouseHuXing = add_str(HouseHuXing, PE_CLng(Trim(Request.Form("HouseHuXing4"))) & "厨")
    End If
    If Trim(Request.Form("HouseHuXing5")) <> "0" Then
        HouseHuXing = add_str(HouseHuXing, PE_CLng(Trim(Request.Form("HouseHuXing5"))) & "阳台")
    End If
    If HouseHuXing = "" Then
        HouseHuXing = "未知"
    End If
    HouseMianJi = PE_CDbl(Trim(Request.Form("HouseMianJi")))
    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")))
    HouseJiChu = PE_HTMLEncode(Replace(Trim(Request.Form("HouseJiChu")), " ", ""))
    If Trim(Request.Form("HouseJiaJu1")) <> "0" Then
        HouseJiaJu = add_str(HouseJiaJu, "床" & PE_CLng(Replace(Request.Form("HouseJiaJu1"), ",", "，")) & "张")
    End If
    If Trim(Request.Form("HouseJiaJu2")) <> "0" Then
        HouseJiaJu = add_str(HouseJiaJu, "衣柜" & PE_CLng(Replace(Request.Form("HouseJiaJu2"), ",", "，")) & "个")
    End If
    If Trim(Request.Form("HouseJiaJu3")) <> "0" Then
        HouseJiaJu = add_str(HouseJiaJu, "写字台" & PE_CLng(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
    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_CLng(Replace(Request.Form("HouseDianQi1"), ",", "，")) & "台")
    End If
    If Trim(Request.Form("HouseDianQi2")) <> "0" Then
        HouseDianQi = add_str(HouseDianQi, "电扇" & PE_CLng(Replace(Request.Form("HouseDianQi2"), ",", "，")) & "台")
    End If
    If Trim(Request.Form("HouseDianQi3")) <> "0" Then
        HouseDianQi = add_str(HouseDianQi, "电视机" & PE_CLng(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_CLng(Trim(Request.Form("ZuLinStartYear"))) & "-" & PE_CLng(Trim(Request.Form("ZuLinStartMonth"))) & "-" & PE_CLng(Trim(Request.Form("ZuLinStartDay")))
    ZuLinEndDate = PE_CLng(Trim(Request.Form("ZuLinEndYear"))) & "-" & PE_CLng(Trim(Request.Form("ZuLinEndMonth"))) & "-" & PE_CLng(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 = 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_CLng(Trim(Request.Form("Hits")))
    If Hits >= HitsOfHot Then Hot = "yes"
    Passed = PE_HTMLEncode(Trim(Request.Form("Passed")))

    If Action = "" Then
        FoundErr = True
        ErrMsg = ErrMsg & "<br><li>参数不足</li>"
    Else
        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
            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
        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
    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
    If ViewAll = "yes" Then
        rs("ViewAll") = True
    Else
        rs("ViewAll") = False
    End If
    If Passed = "yes" Then
        rs("Passed") = True
    Else
        rs("Passed") = False
    End If
    If OnTop = "yes" Then
        rs("OnTop") = True
    Else
        rs("OnTop") = False
    End If
    If Hot = "yes" Then
        rs("Hot") = True
    Else
        rs("Hot") = False
    End If
    If Elite = "yes" Then
        rs("Elite") = True
    Else
        rs("Elite") = False
    End If

    rs("Editor") = Editor
    rs.Update
    HouseID = rs("HouseID")
    Passed = rs("Passed")
    rs.Close
    Set rs = Nothing
    Call UpdateChannelData(ChannelID)
    If Action = "SaveAdd" Then
        If Passed = True Then
            Conn.Execute ("Update PE_HouseConfig set ItemCount=ItemCount+1 where ClassID=" & ClassID & "")
        End If
    End If
    Call SaveSuccess(HouseHuXing, HouseDiZhi, HouseXiangXiDiZhi, HouseLeiXing, ContactName, Keyword, Passed, HouseID)
    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

    FoundErr = False
    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 Trim(Request.Form("HouseHuXing1")) <> "0" Then
        HouseHuXing = add_str(HouseHuXing, PE_CLng(Trim(Request.Form("HouseHuXing1"))) & "房")
    End If
    If Trim(Request.Form("HouseHuXing2")) <> "0" Then
        HouseHuXing = add_str(HouseHuXing, PE_CLng(Trim(Request.Form("HouseHuXing2"))) & "厅")
    End If
    If Trim(Request.Form("HouseHuXing3")) <> "0" Then
        HouseHuXing = add_str(HouseHuXing, PE_CLng(Trim(Request.Form("HouseHuXing3"))) & "卫")
    End If
    If Trim(Request.Form("HouseHuXing4")) <> "0" Then
        HouseHuXing = add_str(HouseHuXing, PE_CLng(Trim(Request.Form("HouseHuXing4"))) & "厨")
    End If
    If Trim(Request.Form("HouseHuXing5")) <> "0" Then
        HouseHuXing = add_str(HouseHuXing, PE_CLng(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 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
    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 = 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_CLng(Trim(Request.Form("Hits")))
    If Hits >= HitsOfHot Then Hot = "yes"
    Passed = PE_HTMLEncode(Trim(Request.Form("Passed")))

    If Action = "" Then
        FoundErr = True
        ErrMsg = ErrMsg & "<br><li>参数不足</li>"
    Else
        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
            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
        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>"
                    rs.Close
                End If
            End If
        Else
            FoundErr = True
            ErrMsg = "<br><li>参数错误!</li>"
        End If
    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
    If ViewAll = "yes" Then
        rs("ViewAll") = True
    Else
        rs("ViewAll") = False
    End If
    If Passed = "yes" Then
        rs("Passed") = True
    Else
        rs("Passed") = False
    End If
    If OnTop = "yes" Then
        rs("OnTop") = True
    Else
        rs("OnTop") = False
    End If
    If Hot = "yes" Then
        rs("Hot") = True
    Else
        rs("Hot") = False
    End If
    If Elite = "yes" Then
        rs("Elite") = True
    Else
        rs("Elite") = False
    End If

    rs("Editor") = Editor
    rs.Update
    HouseID = rs("HouseID")
    Passed = rs("Passed")
    rs.Close
    Set rs = Nothing
    Call UpdateChannelData(ChannelID)
    If Action = "SaveAdd" Then
        If Passed = True Then
            Conn.Execute ("Update PE_HouseConfig set ItemCount=ItemCount+1 where ClassID=" & ClassID & "")
        End If
    End If
    Call SaveSuccess(HouseHuXing, HouseDiZhi, HouseXiangXiDiZhi, HouseLeiXing, ContactName, Keyword, Passed, HouseID)

    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

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

    FoundErr = False
    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 Trim(Request.Form("HouseHuXing1")) <> "0" Then
        HouseHuXing = add_str(HouseHuXing, PE_CLng(Trim(Request.Form("HouseHuXing1"))) & "房")
    End If
    If Trim(Request.Form("HouseHuXing2")) <> "0" Then
        HouseHuXing = add_str(HouseHuXing, PE_CLng(Trim(Request.Form("HouseHuXing2"))) & "厅")
    End If
    If Trim(Request.Form("HouseHuXing3")) <> "0" Then
        HouseHuXing = add_str(HouseHuXing, PE_CLng(Trim(Request.Form("HouseHuXing3"))) & "卫")
    End If
    If Trim(Request.Form("HouseHuXing4")) <> "0" Then
        HouseHuXing = add_str(HouseHuXing, PE_CLng(Trim(Request.Form("HouseHuXing4"))) & "厨")
    End If
    If Trim(Request.Form("HouseHuXing5")) <> "0" Then
        HouseHuXing = add_str(HouseHuXing, PE_CLng(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 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")))
    HouseJiChu = PE_HTMLEncode(Replace(Trim(Request.Form("HouseJiChu")), " ", ""))
    If Trim(Request.Form("HouseJiaJu1")) <> "0" Then
        HouseJiaJu = add_str(HouseJiaJu, "床" & PE_CLng(Replace(Request.Form("HouseJiaJu1"), ",", "，")) & "张")
    End If
    If Trim(Request.Form("HouseJiaJu2")) <> "0" Then
        HouseJiaJu = add_str(HouseJiaJu, "衣柜" & PE_CLng(Replace(Request.Form("HouseJiaJu2"), ",", "，")) & "个")
    End If
    If Trim(Request.Form("HouseJiaJu3")) <> "0" Then
        HouseJiaJu = add_str(HouseJiaJu, "写字台" & PE_CLng(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
    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_CLng(Replace(Request.Form("HouseDianQi1"), ",", "，")) & "台")
    End If
    If Trim(Request.Form("HouseDianQi2")) <> "0" Then
        HouseDianQi = add_str(HouseDianQi, "电扇" & PE_CLng(Replace(Request.Form("HouseDianQi2"), ",", "，")) & "台")
    End If
    If Trim(Request.Form("HouseDianQi3")) <> "0" Then
        HouseDianQi = add_str(HouseDianQi, "电视机" & PE_CLng(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")), " ", ""))
    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_CLng(Trim(Request.Form("ZuLinStartYear"))) & "-" & PE_CLng(Trim(Request.Form("ZuLinStartMonth"))) & "-" & PE_CLng(Trim(Request.Form("ZuLinStartDay")))
    ZuLinEndDate = PE_CLng(Trim(Request.Form("ZuLinEndYear"))) & "-" & PE_CLng(Trim(Request.Form("ZuLinEndMonth"))) & "-" & PE_CLng(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 = 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_CLng(Trim(Request.Form("Hits")))
    If Hits >= HitsOfHot Then Hot = "yes"
    Passed = PE_HTMLEncode(Trim(Request.Form("Passed")))

    If Action = "" Then
        FoundErr = True
        ErrMsg = ErrMsg & "<br><li>参数不足</li>"
    Else
        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
            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
        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
    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
    If ViewAll = "yes" Then
        rs("ViewAll") = True
    Else
        rs("ViewAll") = False
    End If
    If Passed = "yes" Then
        rs("Passed") = True
    Else
        rs("Passed") = False
    End If
    If OnTop = "yes" Then
        rs("OnTop") = True
    Else
        rs("OnTop") = False
    End If
    If Hot = "yes" Then
        rs("Hot") = True
    Else
        rs("Hot") = False
    End If
    If Elite = "yes" Then
        rs("Elite") = True
    Else
        rs("Elite") = False
    End If
    rs("Editor") = Editor
    rs.Update
    HouseID = rs("HouseID")
    Passed = rs("Passed")
    rs.Close
    Set rs = Nothing
    Call UpdateChannelData(ChannelID)
    If Action = "SaveAdd" Then
        If Passed = True Then
            Conn.Execute ("Update PE_HouseConfig set ItemCount=ItemCount+1 where ClassID=" & ClassID & "")
        End If
    End If
    Call SaveSuccess(HouseHuXing, HouseDiZhi, HouseXiangXiDiZhi, HouseLeiXing, ContactName, Keyword, Passed, HouseID)

    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

    FoundErr = False
    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_CLng(PE_CLng(Request.Form("Hits")))
    If Hits >= HitsOfHot Then Hot = "yes"
    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_CLng(Trim(Request.Form("HouseHuXing1"))) & "房")
    End If
    If Trim(Request.Form("HouseHuXing2")) <> "0" Then
        HouseHuXing = add_str(HouseHuXing, PE_CLng(Trim(Request.Form("HouseHuXing2"))) & "厅")
    End If
    If Trim(Request.Form("HouseHuXing3")) <> "0" Then
        HouseHuXing = add_str(HouseHuXing, PE_CLng(Trim(Request.Form("HouseHuXing3"))) & "卫")
    End If
    If Trim(Request.Form("HouseHuXing4")) <> "0" Then
        HouseHuXing = add_str(HouseHuXing, PE_CLng(Trim(Request.Form("HouseHuXing4"))) & "厨")
    End If
    If Trim(Request.Form("HouseHuXing5")) <> "0" Then
        HouseHuXing = add_str(HouseHuXing, PE_CLng(Trim(Request.Form("HouseHuXing4"))) & "阳台")
    End If

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

    If Trim(Request.Form("HouseHuXing21")) <> "0" Then
        HouseHuXing2 = add_str(HouseHuXing2, PE_CLng(Trim(Request.Form("HouseHuXing21"))) & "房")
    End If
    If Trim(Request.Form("HouseHuXing22")) <> "0" Then
        HouseHuXing2 = add_str(HouseHuXing2, PE_CLng(Trim(Request.Form("HouseHuXing22"))) & "厅")
    End If
    If Trim(Request.Form("HouseHuXing23")) <> "0" Then
        HouseHuXing2 = add_str(HouseHuXing2, PE_CLng(Trim(Request.Form("HouseHuXing23"))) & "卫")
    End If
    If Trim(Request.Form("HouseHuXing24")) <> "0" Then
        HouseHuXing2 = add_str(HouseHuXing2, PE_CLng(Trim(Request.Form("HouseHuXing24"))) & "厨")
    End If
    If Trim(Request.Form("HouseHuXing25")) <> "0" Then
        HouseHuXing2 = add_str(HouseHuXing2, PE_CLng(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_CLng(Replace(Request.Form("HouseJiaJu1"), ",", "，")) & "张")
    End If
    If Trim(Request.Form("HouseJiaJu2")) <> "0" Then
        HouseJiaJu = add_str(HouseJiaJu, "衣柜" & PE_CLng(Replace(Request.Form("HouseJiaJu2"), ",", "，")) & "个")
    End If
    If Trim(Request.Form("HouseJiaJu3")) <> "0" Then
        HouseJiaJu = add_str(HouseJiaJu, "写字台" & PE_CLng(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

    ViewAll = PE_HTMLEncode(Trim(Request.Form("ViewAll")))
    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 = Trim(Request.Form("HouseQiTa"))
    Editor = UserName

    If Action = "" Then
        FoundErr = True
        ErrMsg = ErrMsg & "<br><li>参数不足</li>"
    Else
        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
            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
        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
    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
    If ViewAll = "yes" Then
        rs("ViewAll") = True
    Else
        rs("ViewAll") = False
    End If
    If Passed = "yes" Then
        rs("Passed") = True
    Else
        rs("Passed") = False
    End If
    If OnTop = "yes" Then
        rs("OnTop") = True
    Else
        rs("OnTop") = False
    End If
    If Hot = "yes" Then
        rs("Hot") = True
    Else
        rs("Hot") = False
    End If
    If Elite = "yes" Then
        rs("Elite") = True
    Else
        rs("Elite") = False
    End If

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

Sub SaveArea()
    Dim AreaName, Province, rsArea, MaxID, sql
    AreaName = ReplaceBadChar(Trim(Request.Form("AreaName")))
    Province = ReplaceBadChar(Trim(Request.Form("Province")))
    If AreaName = "" Then
        FoundErr = True
        ErrMsg = ErrMsg & "<li>区域名不能为空。</li>"
        Exit Sub
    End If
    If Province = "" Then
        FoundErr = True
        ErrMsg = ErrMsg & "<li>所属省份不能为空。</li>"
        Exit Sub
    End If
    Set rsArea = Server.CreateObject("adodb.recordset")
    If Action = "SaveArea" Then
        MaxID = Conn.Execute("select Max(AreaID) from PE_HouseArea")(0)
        sql = "select * from PE_HouseArea"
        rsArea.open sql, Conn, 1, 3
        rsArea.AddNew
        rsArea("AreaID") = PE_CLng(MaxID) + 1
    Else
        sql = "Select * from PE_HouseArea where AreaID=" & PE_CLng(Request("AreaID")) & ""
        rsArea.open sql, Conn, 1, 3
        If rsArea.EOF Then
            FoundErr = True
            ErrMsg = ErrMsg & "<li>找不到此区域！。</li>"
            Exit Sub
        End If
    End If
    rsArea("AreaName") = AreaName
    rsArea("Province") = Province
    rsArea.Update
    rsArea.Close
    Set rsArea = Nothing
    Call WriteSuccessMsg("<li>保存区域成功！</li>", "Admin_House.asp?Action=ManageArea&ChannelID=" & ChannelID)
End Sub

Sub SaveSuccess(HouseHuXing, HouseDiZhi, HouseXiangXiDiZhi, HouseLeiXing, ContactName, Keyword, Passed, HouseID)
    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 ClassID
    Case 1
        Response.Write "出售信息 成功</b></FONT></td>"
    Case 2
        Response.Write "出租信息 成功</b></FONT></td>"
    Case 3
        Response.Write "求购信息 成功</b></FONT></td>"
    Case 4
        Response.Write "求租信息 成功</b></FONT></td>"
    Case 5
        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=Admin_House.asp?ChannelID=" & ChannelID & "&Action=Modify&ClassID=" & ClassID & "&HouseID=" & HouseID & ">修改此信息</a>】&nbsp;【<a href=Admin_House.asp?ChannelID=" & ChannelID & "&Action=Add&ClassID=" & ClassID & ">继续添加信息</a>】&nbsp;【<a href=Admin_House.asp?ChannelID=" & ChannelID & "&Action=Manage&ClassID=" & ClassID & ">房产信息管理</a>】&nbsp;【<a href=Admin_House.asp?ChannelID=" & ChannelID & "&Action=Show&ClassID=" & ClassID & "&HouseID=" & HouseID & ">预览房产信息</a>】</td>"
    Response.Write "</tr>"
    Response.Write "</table>"
End Sub

Sub DelArea()
    Dim AreaID
    AreaID = Trim(Request("AreaID"))
    If IsValidID(AreaID) = False Then
        FoundErr = True
        ErrMsg = ErrMsg & "<li>请指定要删除的区域ID</li>"
        Exit Sub
    End If
    If InStr(AreaID, ",") > 0 Then
        Conn.Execute ("delete from PE_HouseArea where AreaID in (" & AreaID & ")")
    Else
        Conn.Execute ("delete from PE_HouseArea where AreaID=" & AreaID & "")
    End If
    Call CloseConn
    Response.Redirect "Admin_House.asp?ChannelID=" & ChannelID & "&Action=ManageArea"
End Sub

Sub ModifyConfig()

    Response.Write "<SCRIPT Language=JavaScript>" & 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
    Response.Write "<table width='100%'><tr><td align='left'>您现在的位置：房产信息配置</td></tr></table>"
    Response.Write "<form name='form2' method='post' action='Admin_House.asp?ChannelID=" & ChannelID & "'>"
    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 id='TabTitle' class='title5' onclick='ShowTabs(3)' style='cursor:hand;' >求租</td>" & vbCrLf
    Response.Write "    <td id='TabTitle' class='title5' onclick='ShowTabs(4)' 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' align='center' cellpadding='5' cellspacing='1' class='border'><tr class='tdbg'><td height='100' valign='top'>"
    Response.Write "<table width='95%' align='center' cellpadding='2' cellspacing='1' bgcolor='#FFFFFF'>"
    Response.Write " <tbody id='Tabs' style='display:'>" & vbCrLf
    Call ShowConfigForm(1)
    Response.Write "</tbody>"
    Response.Write " <tbody id='Tabs' style='display:none'>" & vbCrLf
    Call ShowConfigForm(2)
    Response.Write "</tbody>"
    Response.Write " <tbody id='Tabs' style='display:none'>" & vbCrLf
    Call ShowConfigForm(3)
    Response.Write "</tbody>"
    Response.Write " <tbody id='Tabs' style='display:none'>" & vbCrLf
    Call ShowConfigForm(4)
    Response.Write "</tbody>"
    Response.Write " <tbody id='Tabs' style='display:none'>" & vbCrLf
    Call ShowConfigForm(5)
    Response.Write "</tbody>"

    Response.Write "</table>" & vbCrLf
    Response.Write "</td></tr></table>" & vbCrLf
    Response.Write "<table width='100%' border='0' align='center'>"
    Response.Write "  <tr class='tdbg'> "
    Response.Write "    <td height='40' colspan='2' align='center'><input name='Action' type='hidden' id='Action' value='SaveConfigModify'>"
    Response.Write "        <input name='Submit' type='submit' value=' 保存修改结果 ' style='cursor:hand;'>&nbsp;&nbsp;<input name='Cancel' type='button' id='Cancel' value=' 取 消 ' onClick=""window.location.href='Admin_House.asp?ChannelID=" & ChannelID & "&ClassID=" & ClassID & "'"" style='cursor:hand;'> "
    Response.Write "    </td>"
    Response.Write "  </tr>"
    Response.Write "</table>"
    Response.Write "</form>"
   ' Call WriteJS
End Sub

Sub ShowConfigForm(ClassID)
    Dim sql, rsClass
    sql = "select * from PE_HouseConfig where ClassID=" & ClassID
    Set rsClass = Server.CreateObject("Adodb.recordset")
    rsClass.open sql, Conn, 1, 3
    If rsClass.BOF And rsClass.EOF Then
        FoundErr = True
        ErrMsg = ErrMsg & "<li>找不到指定的栏目！</li>"
        rsClass.Close
        Set rsClass = Nothing
        Exit Sub
    End If

    Response.Write "    <tr class='tdbg'> "
    Response.Write "      <td width='300' class='tdbg5'><strong>栏目名称：</strong></td>"
    Response.Write "      <td><input name='ClassName_" & ClassID & "' type='text' value='" & rsClass("ClassName") & "' size='8' maxlength='3'></td>"
    Response.Write "    </tr>"
    Response.Write "    <tr class='tdbg'>"
    Response.Write "      <td width='300' class='tdbg5'><strong>每发布一条信息的扣点数：</strong><br>会员在此栏目发布一条信息时将扣除的点数</td>"
    Response.Write "      <td> <input name='ReleaseDeductPoint_" & ClassID & "' type='text' value='" & rsClass("ReleaseDeductPoint") & "' size='4' maxlength='4' style='text-align:center' onBlur=""if(this.value<0)alert('点数不能为负数!');""> 点</td>"
    Response.Write "    </tr>" & vbCrLf
    Response.Write "    <tr class='tdbg'>"
    Response.Write "      <td width='300' class='tdbg5'><strong>信息每提升一天的扣点数：</strong><br><font color=red>建议小于每发布一信息的扣点数。</font></td>"
    Response.Write "      <td> <input name='UpgradePoint_" & ClassID & "' type='text' value='" & rsClass("UpgradePoint") & "' size='4' maxlength='4' style='text-align:center' onBlur=""if(this.value<0)alert('点数不能为负数!');""> 点</td>"
    Response.Write "    </tr>" & vbCrLf
    Response.Write "    <tr class='tdbg'>"
    Response.Write "      <td width='300' class='tdbg5'><strong>信息每推荐一天的扣点数：</strong></td>"
    Response.Write "      <td> <input name='CommendClassPoint_" & ClassID & "' type='text' value='" & rsClass("CommendClassPoint") & "' size='4' maxlength='4' style='text-align:center' onBlur=""if(this.value<0)alert('点数不能为负数!');""> 点</td>"
    Response.Write "    </tr>" & vbCrLf
    Response.Write "    <tr class='tdbg'>"
    Response.Write "      <td width='300' class='tdbg5'><strong>打开方式：</strong></td>"
    Response.Write "      <td><input type='radio' name='OpenType_" & ClassID & "' value=0"
    If rsClass("OpenType") = 0 Then Response.Write " checked"
    Response.Write " checked"
    Response.Write ">在原窗口打开&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input name='OpenType_" & ClassID & "' type='radio' value=1"
    If rsClass("OpenType") = 1 Then Response.Write " checked"
    Response.Write ">在新窗口打开</td>"
    Response.Write "    </tr>" & vbCrLf
    Response.Write "    <tr class='tdbg'>"
    Response.Write "      <td width='300' class='tdbg5'><strong>每页显示的房产信息数：</strong></td>"
    Response.Write "      <td> <input name='MaxPerPage_" & ClassID & "' type='text' value='" & rsClass("MaxPerPage") & "' size='6' maxlength='6' style='text-align:center' onBlur=""if(this.value<0)alert('条数不能为负数!');""> 条</td>"
    Response.Write "    </tr>" & vbCrLf
    Response.Write "    <tr class='tdbg'>"
    Response.Write "      <td width='300' class='tdbg5'><strong>是否在顶部导航栏显示：</strong><br>此选项只对一级栏目有效。</td>"
    Response.Write "      <td><input name='ShowOnTop_" & ClassID & "' type='radio' value='Yes'"
    If rsClass("ShowOnTop") = True Then Response.Write " checked"
    Response.Write ">是&nbsp;&nbsp;&nbsp;&nbsp; <input type='radio' name='ShowOnTop_" & ClassID & "' value='No'"
    If rsClass("ShowOnTop") = False Then Response.Write " checked"
    Response.Write ">否</td>"
    Response.Write "    </tr>" & vbCrLf
    Response.Write "    <tr class='tdbg'>"
    Response.Write "      <td width='300' class='tdbg5'><strong>栏目配色风格：</strong><br>相关模板中包含CSS、颜色、图片等信息</td>"
    Response.Write "      <td><select name='SkinID_" & ClassID & "' id='SkinID_" & ClassID & "'>" & GetSkin_Option(rsClass("SkinID")) & "</td>"
    Response.Write "    </tr>"
    Response.Write "    <tr class='tdbg'> "
    Response.Write "      <td width='300' class='tdbg5'><strong>栏目模板：</strong><br>相关模板中包含了栏目设计的版式等信息，如果是自行添加的设计模板，可能会导致“栏目配色风格”失效。 </td>"
    Response.Write "      <td><select name='TemplateID_" & ClassID & "' id='TemplateID_" & ClassID & "'>" & GetTemplate_Option(ChannelID, 2, rsClass("TemplateID")) & "</select></td>"
    Response.Write "    </tr>"
    Response.Write "    <tr class='tdbg'>"
    Response.Write "      <td width='300' class='tdbg5'><strong>此栏目下的" & ChannelShortName & "的默认配色风格：</strong><br>相关模板中包含CSS、颜色、图片等信息</td>"
    Response.Write "      <td><select name='DefaultItemSkin_" & ClassID & "' id='DefaultItemSkin_" & ClassID & "'>" & GetSkin_Option(rsClass("DefaultItemSkin")) & "</td>"
    Response.Write "    </tr>" & vbCrLf
    Response.Write "    <tr class='tdbg'>"
    Response.Write "      <td width='300' class='tdbg5'><strong>此栏目下的" & ChannelShortName & "的默认模板：</strong></td>"
    Select Case ClassID
    Case 1
        Response.Write "      <td><select name='DefaultItemTemplate_" & ClassID & "' id='DefaultItemTemplate_" & ClassID & "'>" & GetTemplate_Option(ChannelID, 30, rsClass("DefaultItemTemplate")) & "</select></td>"
    Case 2
        Response.Write "      <td><select name='DefaultItemTemplate_" & ClassID & "' id='DefaultItemTemplate_" & ClassID & "'>" & GetTemplate_Option(ChannelID, 31, rsClass("DefaultItemTemplate")) & "</select></td>"
    Case 3
        Response.Write "      <td><select name='DefaultItemTemplate_" & ClassID & "' id='DefaultItemTemplate_" & ClassID & "'>" & GetTemplate_Option(ChannelID, 32, rsClass("DefaultItemTemplate")) & "</select></td>"
    Case 4
        Response.Write "      <td><select name='DefaultItemTemplate_" & ClassID & "' id='DefaultItemTemplate_" & ClassID & "'>" & GetTemplate_Option(ChannelID, 33, rsClass("DefaultItemTemplate")) & "</select></td>"
    Case 5
        Response.Write "      <td><select name='DefaultItemTemplate_" & ClassID & "' id='DefaultItemTemplate_" & ClassID & "'>" & GetTemplate_Option(ChannelID, 34, rsClass("DefaultItemTemplate")) & "</select></td>"
    Case Else
        Response.Write "      <td><select name='DefaultItemTemplate_" & ClassID & "' id='DefaultItemTemplate_" & ClassID & "'>" & GetTemplate_Option(ChannelID, 30, rsClass("DefaultItemTemplate")) & "</select></td>"
    End Select
    Response.Write "    </tr>" & vbCrLf
    Response.Write "    <tr class='tdbg'>"
    Response.Write "      <td width='300' class='tdbg5'><b>此栏目下的" & ChannelShortName & "打开方式：</b></td>"
    Response.Write "      <td><select name='ItemOpenType_" & ClassID & "'>" & GetOpenType_Option(rsClass("ItemOpenType")) & "</select></td>"
    Response.Write "    </tr>" & vbCrLf
    Response.Write "    <tr class='tdbg'>" & vbCrLf
    Response.Write "      <td width='300' class='tdbg5'><strong>栏目META关键词：</strong><br>针对搜索引擎设置的关键词</td>" & vbCrLf
    Response.Write "      <td><textarea name='Meta_Keywords_" & ClassID & "' cols='60' rows='2' id='Meta_Keywords_" & ClassID & "'>" & rsClass("Meta_Keywords") & "</textarea></td>" & vbCrLf
    Response.Write "    </tr>" & vbCrLf
    Response.Write "    <tr class='tdbg'>" & vbCrLf
    Response.Write "      <td width='300' class='tdbg5'><strong>栏目META网页描述：</strong><br>针对搜索引擎设置的网页描述</td>" & vbCrLf
    Response.Write "      <td><textarea name='Meta_Description_" & ClassID & "' cols='60' rows='2' id='Meta_Description_" & ClassID & "'>" & rsClass("Meta_Description") & "</textarea></td>" & vbCrLf
    Response.Write "    </tr>" & vbCrLf
    rsClass.Close
    Set rsClass = Nothing
End Sub

Sub SaveConfigModify()
    Dim ClassID, ClassName, LinkUrl, CommendClassPoint
    Dim ReleaseDeductPoint, OpenType, SkinID, TemplateID, ShowOnTop, UpgradePoint
    Dim MaxPerPage, DefaultItemSkin, DefaultItemTemplate, ItemOpenType
    Dim sql, rsClass, i, trs, OldClassName, isModified, Meta_Keywords, Meta_Description

    isModified = False
    For i = 1 To 5
        ClassName = ReplaceBadChar(Trim(Request("ClassName_" & i & "")))
        ReleaseDeductPoint = PE_CLng(Trim(Request("ReleaseDeductPoint_" & i & "")))
        OpenType = PE_CLng(Trim(Request("OpenType_" & i & "")))
        ShowOnTop = Trim(Request("ShowOnTop_" & i & ""))
        SkinID = PE_CLng(Trim(Request("SkinID_" & i & "")))
        TemplateID = PE_CLng(Trim(Request("TemplateID_" & i & "")))
        MaxPerPage = PE_CLng(Trim(Request("MaxPerPage_" & i & "")))
        DefaultItemSkin = PE_CLng(Trim(Request("DefaultItemSkin_" & i & "")))
        DefaultItemTemplate = PE_CLng(Trim(Request("DefaultItemTemplate_" & i & "")))
        'ItemListOrderType = PE_CLng(Trim(Request("ItemListOrderType_" & i & "")))
        ItemOpenType = PE_CLng(Trim(Request("ItemOpenType_" & i & "")))
        UpgradePoint = PE_CLng(Trim(Request("UpgradePoint_" & i & "")))
        CommendClassPoint = PE_CLng(Trim(Request("CommendClassPoint_" & i & "")))
        Meta_Keywords = Trim(Request("Meta_Keywords_" & i & ""))
        Meta_Description = Trim(Request("Meta_Description_" & i & ""))

        If ClassName = "" Then
            FoundErr = True
            ErrMsg = ErrMsg & "<li>栏目名称不能为空！</li>"
        Else
            ClassName = ReplaceBadChar(ClassName)
        End If
        If ShowOnTop = "Yes" Then
            ShowOnTop = True
        Else
            ShowOnTop = False
        End If
        If FoundErr = True Then
            Exit Sub
        End If
        sql = "select * from PE_HouseConfig where ClassID=" & i
        Set rsClass = Server.CreateObject("Adodb.recordset")
        rsClass.open sql, Conn, 1, 3
        If rsClass.BOF And rsClass.EOF Then
            FoundErr = True
            ErrMsg = ErrMsg & "<li>找不到指定的栏目！</li>"
            rsClass.Close
            Set rsClass = Nothing
            Exit Sub
        End If
        OldClassName = rsClass("ClassName")
        If OldClassName <> ClassName Then
            isModified = True
        End If

        rsClass("ClassName") = ClassName
        rsClass("ReleaseDeductPoint") = ReleaseDeductPoint
        rsClass("OpenType") = OpenType
        rsClass("ShowOnTop") = ShowOnTop
        rsClass("SkinID") = SkinID
        rsClass("TemplateID") = TemplateID
        rsClass("MaxPerPage") = MaxPerPage
        rsClass("DefaultItemTemplate") = DefaultItemTemplate
        rsClass("DefaultItemSkin") = DefaultItemSkin
        rsClass("UpgradePoint") = UpgradePoint
        rsClass("ItemOpenType") = ItemOpenType
        rsClass("CommendClassPoint") = CommendClassPoint
        rsClass("Meta_Keywords") = Meta_Keywords
        rsClass("Meta_Description") = Meta_Description
        rsClass.Update
        rsClass.Close
        Set rsClass = Nothing

        If FoundErr = True Then Exit Sub
    Next

    Call ClearSiteCache(0)
    Call CreateClassMenu_Js
    If isModified = True Then
        Call ReloadLeft("Admin_House.asp?ChannelID=" & ChannelID & "&Action=ModifyConfig")
    End If
    Call WriteSuccessMsg("修改成功！", ComeUrl)
End Sub

Sub CreateClassMenu_Js()
    Dim rsClass, strClassMenu
    Set rsClass = Conn.Execute("select * from PE_HouseConfig where ShowOnTop=" & PE_True & "")
    strClassMenu = "<table border='0' cellpadding='0' cellspacing='2'><tr valign='bottom'><td>|&nbsp;<a href='Index.asp'>&nbsp;<font color=#000000>" & ChannelName & "首页&nbsp;</font></a>|&nbsp;</td>"
    Do While Not rsClass.EOF
        strClassMenu = strClassMenu & "<td><a href='ShowClass.asp?ClassID=" & rsClass("ClassID") & "'"
        If rsClass("OpenType") = 0 Then
            strClassMenu = strClassMenu & " target='_self'"
        Else
            strClassMenu = strClassMenu & " target='_blank'"
        End If
        strClassMenu = strClassMenu & " ><font color=#000000>" & rsClass("ClassName") & "</font></a>&nbsp;|&nbsp;</td>"
        rsClass.MoveNext
    Loop
    strClassMenu = strClassMenu & "</tr></table>"
    If Not fso.FolderExists(Server.MapPath(InstallDir & ChannelDir & "/js")) Then
        fso.CreateFolder Server.MapPath(InstallDir & ChannelDir & "/js")
    End If
    Call WriteToFile(InstallDir & ChannelDir & "/js/ShowClass_Menu.js", "document.write(""" & strClassMenu & """);")
End Sub

Function GetClassName()
    Dim str, rsClassName
    Set rsClassName = Conn.Execute("select ClassID,ClassName from PE_HouseConfig")
    If Not rsClassName.EOF Then
        Do While Not rsClassName.EOF
            str = str & " <input name='ClassID' type='radio' value=" & rsClassName("ClassID") & " onclick='submit();'"
            If ClassID = rsClassName(0) Then
               str = str & " Checked"
            End If
            str = str & ">" & rsClassName("ClassName")
        rsClassName.MoveNext
        Loop
    End If
    rsClassName.Close
    Set rsClassName = Nothing
    GetClassName = str
End Function

Function GetSkin_Option(iSkinID)
    Dim sqlSkin, rsSkin, strSkin
    If IsNull(iSkinID) Then iSkinID = 0
    strSkin = ""
    sqlSkin = "select * from PE_Skin"
    Set rsSkin = Conn.Execute(sqlSkin)
    If rsSkin.BOF And rsSkin.EOF Then
        strSkin = strSkin & "<option value=''>请先添加风格</option>"
    Else
        If iSkinID = 0 Then
            strSkin = strSkin & "<option value='0' selected>系统默认风格</option>"
        Else
            strSkin = strSkin & "<option value='0'>系统默认风格</option>"
        End If
        Do While Not rsSkin.EOF
            strSkin = strSkin & "<option value='" & rsSkin("SkinID") & "'"
            If rsSkin("SkinID") = iSkinID Then
                strSkin = strSkin & " selected"
            End If
            strSkin = strSkin & ">" & rsSkin("SkinName")
            If rsSkin("IsDefault") = True Then
                strSkin = strSkin & "（默认）"
            End If
            strSkin = strSkin & "</option>"
            rsSkin.MoveNext
        Loop
    End If
    rsSkin.Close
    Set rsSkin = Nothing
    GetSkin_Option = strSkin
End Function


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
        FoundErr = True
        ErrMsg = ErrMsg & "<li>请先选定" & ChannelShortName & "！</li>"
        Exit Sub
    End If
   
    Dim sqlProperty, rsProperty
    If InStr(HouseID, ",") > 0 Then
        sqlProperty = "select F.OnTop,F.UpdateTime,F.Elite,F.ViewAll,F.Passed,F.Editor,F.HouseID,F.HouseDiZhi,F.CommendClassDays,C.CommendClassPoint,C.ReleaseDeductPoint from " & HouseTableName & " F left join PE_HouseConfig C on F.ClassID=C.ClassID where HouseID in (" & HouseID & ")"
    Else
        sqlProperty = "select F.OnTop,F.UpdateTime,F.Elite,F.ViewAll,F.Passed,F.CommendClassDays,F.Editor,F.HouseID,F.HouseDiZhi,C.CommendClassPoint,C.ReleaseDeductPoint from " & HouseTableName & " F left join PE_HouseConfig C on F.ClassID=C.ClassID where HouseID=" & HouseID
    End If
    Set rsProperty = Server.CreateObject("ADODB.Recordset")
    rsProperty.open sqlProperty, Conn, 1, 3
    Do While Not rsProperty.EOF
        Select Case Action
        Case "SetOnTop"
            rsProperty("OnTop") = True
        Case "CancelOnTop"
            rsProperty("OnTop") = False
        Case "SetElite"
            rsProperty("Elite") = True
        Case "CancelElite"
            rsProperty("Elite") = False
        Case "SetNew"
            rsProperty("UpdateTime") = Now()
        Case "SetStatus"
            If rsProperty("passed") = False Then
                Conn.Execute ("update PE_Channel set ItemChecked=ItemChecked+1 where ChannelID=" & ChannelID & "")
                If rsProperty("Elite") = True Then
                    Conn.Execute ("update PE_User set UserPoint=UserPoint-(" & rsProperty("CommendClassDays") & " * " & rsProperty("CommendClassPoint") & "+" & rsProperty("ReleaseDeductPoint") & ") where UserName='" & rsProperty("Editor") & "'")
                    Call AddConsumeLog(AdminName, ModuleType, rsProperty("Editor"), PE_CLng(rsProperty("HouseID")), UserName, rsProperty("CommendClassPoint") * rsProperty("CommendClassDays") + rsProperty("ReleaseDeductPoint"), 2, "用于发表和推荐" & ClassName & "信息：" & rsProperty("HouseDiZhi"))
                Else
                    Conn.Execute ("update PE_User set UserPoint=UserPoint-" & rsProperty("ReleaseDeductPoint") & " where UserName='" & rsProperty("Editor") & "'")
                    Call AddConsumeLog(AdminName, ModuleType, rsProperty("Editor"), PE_CLng(rsProperty("HouseID")), rsProperty("ReleaseDeductPoint"), 2, "用于发表" & ClassName & "信息：" & rsProperty("HouseDiZhi"))
                End If
            End If
            rsProperty("passed") = True
        Case "CancelStatus"
            If rsProperty("passed") = True Then
                Conn.Execute ("update PE_Channel set ItemChecked=ItemChecked-1 where ChannelID=" & ChannelID & "")
                'Conn.Execute ("update PE_User set PassedItems=PassedItems-1,UserExp=UserExp-" & rsProperty("PresentExp") & " where UserName='" & rsProperty("Inputer") & "'")
            End If
            rsProperty("passed") = False
        End Select
        rsProperty.Update
        rsProperty.MoveNext
    Loop
    rsProperty.Close
    Set rsProperty = Nothing
    'Call CreateAllJS
    Call ClearSiteCache(0)
    If FoundErr = False Then
        Response.Redirect ComeUrl
    End If
End Sub

Sub Del()
    HouseID = Trim(Request("HouseID"))
    If IsValidID(HouseID) = False Then
        FoundErr = True
        ErrMsg = ErrMsg & "<li>请先选定" & ChannelShortName & "！</li>"
        Exit Sub
    End If
    
    Dim sqlDel, rsDel, HousePath
    sqlDel = "select F.HouseID,F.UpdateTime,F.Editor,F.Passed,F.Deleted,F.ClassID,C.ClassDir from " & HouseTableName & " F left join PE_HouseConfig C on F.ClassID=C.ClassID"

    If InStr(HouseID, ",") > 0 Then
        sqlDel = sqlDel & " where F.HouseID in (" & HouseID & ") order by F.HouseID"
    Else
        sqlDel = sqlDel & " where F.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_Channel set ItemCount=ItemCount-1,ItemChecked=ItemChecked-1 where ChannelID=" & ChannelID & "")
            Conn.Execute ("update PE_HouseConfig set ItemCount=ItemCount-1 where ClassID=" & rsDel("ClassID") & "")
            'Conn.Execute ("update PE_User set PostItems=PostItems-1,PassedItems=PassedItems-1,UserExp=UserExp-" & rsDel("PresentExp") & " where UserName='" & rsDel("Inputer") & "'")
        Else
            Conn.Execute ("update PE_Channel set ItemCount=ItemCount-1 where ChannelID=" & ChannelID & "")
            'Conn.Execute ("update PE_User set PostItems=PostItems-1 where UserName='" & rsDel("Inputer") & "'")
        End If
        rsDel("Deleted") = True
        rsDel.Update
        rsDel.MoveNext
    Loop
    rsDel.Close
    Set rsDel = Nothing
    'Call CreateAllJS
    Call ClearSiteCache(0)
    If FoundErr = False Then
        Response.Redirect "Admin_House.asp?ChannelID=" & ChannelID & "&Action=Manage&ClassID=" & ClassID & ""
    End If
End Sub

Sub ConfirmDel()
    If AdminPurview = 2 And AdminPurview_Channel > 2 Then
        FoundErr = True
        ErrMsg = ErrMsg & "<li>对不起，你没权限访问此页面！</li>"
        Exit Sub
    End If
    HouseID = Trim(Request("HouseID"))
    If IsValidID(HouseID) = False Then
        FoundErr = True
        ErrMsg = ErrMsg & "<li>请先选定" & ChannelShortName & "！</li>"
        Exit Sub
    End If
    
    Dim sqlDel, rsDel, strUploadFiles
    Conn.Execute ("delete from " & HouseTableName & " where HouseID in (" & HouseID & ")")
    Call CloseConn
    Response.Redirect ComeUrl
End Sub

Sub Restore()
    If AdminPurview = 2 And AdminPurview_Channel > 2 Then
        FoundErr = True
        ErrMsg = ErrMsg & "<li>对不起，你没权限访问此页面！</li>"
        Exit Sub
    End If
    HouseID = Trim(Request("HouseID"))
    If IsValidID(HouseID) = False Then
        FoundErr = True
        ErrMsg = ErrMsg & "<li>请先选定" & ChannelShortName & "！</li>"
        Exit Sub
    End If
    
    Dim sqlDel, rsDel
    If InStr(HouseID, ",") > 0 Then
        sqlDel = "select * from " & HouseTableName & " where HouseID in (" & HouseID & ")"
    Else
        sqlDel = "select * from " & HouseTableName & " where HouseID=" & HouseID
    End If
    Set rsDel = Server.CreateObject("ADODB.Recordset")
    rsDel.open sqlDel, Conn, 1, 3
    Do While Not rsDel.EOF
        If rsDel("Passed") = True Then
            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") & "")
            'Conn.Execute ("update PE_User set PostItems=PostItems+1,PassedItems=PassedItems+1,UserExp=UserExp+" & rsDel("PresentExp") & " where UserName='" & rsDel("Inputer") & "'")
        Else
            Conn.Execute ("update PE_Channel set ItemCount=ItemCount+1 where ChannelID=" & ChannelID & "")
            'Conn.Execute ("update PE_User set PostItems=PostItems+1 where UserName='" & rsDel("Inputer") & "'")
        End If
        rsDel("Deleted") = False
        rsDel.Update
        rsDel.MoveNext
    Loop
    rsDel.Close
    Set rsDel = Nothing
    'Call CreateAllJS
    Call ClearSiteCache(0)
    Call CloseConn
    Response.Redirect ComeUrl
End Sub

Sub RestoreAll()
    If AdminPurview = 2 And AdminPurview_Channel > 2 Then
        FoundErr = True
        ErrMsg = ErrMsg & "<li>对不起，你没权限访问此页面！</li>"
        Exit Sub
    End If
    
    Dim sqlDel, rsDel
    sqlDel = "select * from " & HouseTableName & " where Deleted=" & PE_True & ""
    Set rsDel = Server.CreateObject("ADODB.Recordset")
    rsDel.open sqlDel, Conn, 1, 3
    Do While Not rsDel.EOF
        If rsDel("Passed") = True Then
            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") & "")
            'Conn.Execute ("update PE_User set PostItems=PostItems+1,PassedItems=PassedItems+1,UserExp=UserExp+" & rsDel("PresentExp") & " where UserName='" & rsDel("Inputer") & "'")
        Else
            Conn.Execute ("update PE_Channel set ItemCount=ItemCount+1 where ChannelID=" & ChannelID & "")
            'Conn.Execute ("update PE_User set PostItems=PostItems+1 where UserName='" & rsDel("Inputer") & "'")
        End If
        rsDel("Deleted") = False
        rsDel.Update
        rsDel.MoveNext
    Loop
    rsDel.Close
    Set rsDel = Nothing
    'Call CreateAllJS
    Call ClearSiteCache(0)
    Call CloseConn
    Response.Redirect ComeUrl
End Sub

Sub ClearRecyclebin()
    If AdminPurview = 2 And AdminPurview_Channel > 2 Then
        FoundErr = True
        ErrMsg = ErrMsg & "<li>对不起，你没权限访问此页面！</li>"
        Exit Sub
    End If
    
    Dim sqlDel, rsDel
    Conn.Execute ("delete from " & HouseTableName & " where Deleted=" & PE_True & " and ChannelID=" & ChannelID & "")
    Call CloseConn
    Response.Redirect ComeUrl
End Sub

Sub Show()
    Dim rs, rsClass, InfoEditor

    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
    InfoEditor = ReplaceBadChar(Request("Editor"))
    If AdminPurview = 2 And Not CheckPurview_Class(arrClass_View, ClassID) And AdminPurview_Channel > 1 And UserName <> InfoEditor And Not CheckPurview_Class(arrClass_Manage, ClassID) And Not CheckPurview_Class(arrClass_Check, ClassID) Then
        FoundErr = True
        ErrMsg = ErrMsg & "<li>对不起，您没有这项操作的权限！</li>"
        Exit Sub
    End If
    Set rsClass = Conn.Execute("select ClassName 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=Admin_House.asp?ChannelID=" & ChannelID & "&Action=Manage&ClassID=" & ClassID & "><font color=red>" & rsClass(0) & "</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&ClassID=" & ClassID & "><font color=red>" & rsClass(0) & "</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&ClassID=" & ClassID & "><font color=red>" & rsClass(0) & "</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>"
        If Trim(rs("HouseZhuangXiu")) = "," Then
            Response.Write "<td width='150'></td>"
        Else
            Response.Write "<td width='150'>" & rs("HouseZhuangXiu") & "</td>"
        End If
        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&ClassID=" & ClassID & "><font color=red>" & rsClass(0) & "</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&ClassID=" & ClassID & "><font color=red>" & rsClass(0) & "</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'>" & FilterJS(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>"
    Dim i
    i = 0
    If AdminPurview = 2 And CheckPurview_Class(arrClass_Manage, ClassID) Or (AdminPurview = 2 And AdminPurview_Channel = 1) Or AdminPurview = 1 Or UserName = rs("Editor") Then
        i = 1
        Response.Write "<a href=Admin_House.asp?ChannelID=" & ChannelID & "&Action=Modify&ClassID=" & ClassID & "&HouseID=" & rs("HouseID") & ">修改</a>&nbsp;&nbsp;"
        Response.Write "<a href=Admin_House.asp?ChannelID=" & ChannelID & "&ClassID=" & ClassID & "&Action=Del&HouseID=" & rs("HouseID") & ">删除</a>&nbsp;&nbsp;"
    End If
    If AdminPurview = 2 And CheckPurview_Class(arrClass_Manage, ClassID) Or (AdminPurview = 2 And AdminPurview_Channel = 1) Or AdminPurview = 1 Then
        i = 1
        If rs("OnTop") = False Then
            Response.Write "<a href=Admin_House.asp?ChannelID=" & ChannelID & "&ClassID=" & ClassID & "&Action=SetOnTop&HouseID=" & rs("HouseID") & ">固顶</a>&nbsp;&nbsp;"
        Else
            Response.Write "<a href=Admin_House.asp?ChannelID=" & ChannelID & "&ClassID=" & ClassID & "&Action=CancelOnTop&HouseID=" & rs("HouseID") & ">解固</a>&nbsp;&nbsp;"
        End If
        If rs("Elite") = False Then
            Response.Write "<a href=Admin_House.asp?ChannelID=" & ChannelID & "&ClassID=" & ClassID & "&Action=SetElite&HouseID=" & rs("HouseID") & ">设为推荐</a>&nbsp;&nbsp;"
        Else
            Response.Write "<a href=Admin_House.asp?ChannelID=" & ChannelID & "&Action=CancelElite&HouseID=" & rs("HouseID") & ">取消推荐</a>&nbsp;&nbsp;"
        End If
        Response.Write "<a href=Admin_House.asp?ChannelID=" & ChannelID & "&Action=SetNew&HouseID=" & rs("HouseID") & ">提升</a>&nbsp;&nbsp;"
    End If
    If AdminPurview = 2 And CheckPurview_Class(arrClass_Check, ClassID) Or (AdminPurview = 2 And AdminPurview_Channel = 1) Or AdminPurview = 1 Then
        i = 1
        If rs("Passed") = False Then
            Response.Write "<a href=Admin_House.asp?ChannelID=" & ChannelID & "&ClassID=" & ClassID & "&Action=SetStatus&HouseID=" & rs("HouseID") & ">通过审核</a>&nbsp;&nbsp;"
        Else
            Response.Write "<a href=Admin_House.asp?ChannelID=" & ChannelID & "&ClassID=" & ClassID & "&Action=CancelStatus&HouseID=" & rs("HouseID") & ">取消审核</a>&nbsp;&nbsp;"
        End If
    End If
    If i = 0 Then Response.Write "无任何操作权限"
    Response.Write "    </td>"
    Response.Write "</tr>"
    Response.Write "</TABLE>"
End Sub

Function CheckClassPurview(Action, ClassID)
    Dim PurviewType, tClass, PurviewChecked, ParentID, Child, CheckParentPath
    PresentExp = 0
    If ClassID = "" Or IsNull(ClassID) Or Not IsNumeric(ClassID) Then
        FoundErr = True
        ErrMsg = ErrMsg & "<li>未指定所属栏目，或者指定的栏目不允许此操作！</li>"
    Else
        PurviewType = LCase(Action)
        ClassID = PE_CLng(ClassID)
        Select Case ClassID
        Case 0
            FoundErr = True
            ErrMsg = ErrMsg & "<li>未指定所属栏目，或者指定的栏目不允许此操作！</li>"
        Case -1
            If AdminPurview = 2 And AdminPurview_Channel >= 3 And PurviewType <> "show" And PurviewType <> "preview" Then
                FoundErr = True
                ErrMsg = ErrMsg & "<li>对不起，你没权限访问此页面！</li>"
            Else
                ClassName = "不指定任何栏目"
            End If
        Case Else
            Set tClass = Conn.Execute("select ClassName from PE_HouseConfig where ClassID=" & ClassID)
            If tClass.BOF And tClass.EOF Then
                FoundErr = True
                ErrMsg = ErrMsg & "<li>找不到指定的栏目！</li>"
            Else
                ClassName = tClass("ClassName")

                If PurviewType = "saveadd" Or PurviewType = "savemodify" Or PurviewType = "input" Then
                    If Child > 0 And tClass("EnableAdd") = False Then
                        FoundErr = True
                        ErrMsg = ErrMsg & "<li>指定的栏目不允许添加" & ChannelShortName & "</li>"
                    End If
                End If
                If AdminPurview = 2 And AdminPurview_Channel = 3 Then
                    CheckParentPath = ClassID
                    Select Case PurviewType
                    Case "show", "preview"
                        PurviewChecked = CheckPurview_Class(arrClass_View, CheckParentPath)
                    Case "saveadd", "savemodify", "input"
                        PurviewChecked = CheckPurview_Class(arrClass_Input, CheckParentPath)
                    Case "SetStatus", "cancelStatus", "check"
                        PurviewChecked = CheckPurview_Class(arrClass_Check, CheckParentPath)
                    Case Else
                        PurviewChecked = CheckPurview_Class(arrClass_Manage, CheckParentPath)
                    End Select
                    If PurviewChecked = False Then
                        FoundErr = True
                        ErrMsg = ErrMsg & "<li>对不起，你没有栏目的相应操作权限！</li>"
                    End If
                End If
            End If
            Set tClass = Nothing
        End Select
    End If
    If FoundErr = True Then
        CheckClassPurview = False
    Else
        CheckClassPurview = True
    End If
End Function

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 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 ReloadLeft(strUrl)
    Response.Write "<script language='JavaScript' type='text/JavaScript'>" & vbCrLf
    Response.Write "  parent.left.location.reload();" & vbCrLf
    Response.Write "  window.location.href='" & strUrl & "';"
    Response.Write "</script>" & vbCrLf
End Sub

Function ReplaceJSImage(ByVal Content)
    If Content = "" Then
        ReplaceJSImage = Content
        Exit Function
    End If
    Dim strTemp
    
    '图片替换JS
    regEx.Pattern = "(\<Script)(.[^\<]*)(\<\/Script\>)"
    Set Matches = regEx.Execute(Content)
    For Each Match In Matches
        strTemp = Replace(Match.value, "<", "[!")
        strTemp = Replace(strTemp, ">", "!]")
        strTemp = Replace(strTemp, "'", """")
        strTemp = "<IMG alt='#" & strTemp & "#' src=""" & InstallDir & "editor/images/jscript.gif"" border=0 $>"
        Content = Replace(Content, Match.value, strTemp)
    Next
    ReplaceJSImage = Content
End Function

Function GetPath(RootName)
    Dim strPath
    strPath = "您现在的位置：&nbsp;" & ChannelName & "管理&nbsp;&gt;&gt;&nbsp;<a href='" & FileName & "'>" & RootName & "</a>&nbsp;&gt;&gt;&nbsp;"
    If ClassID > 0 Then
        strPath = strPath & "<a href='" & FileName & "&ClassID=" & ClassID & "'><font color=red>" & ClassName & "</font></a>&nbsp;&gt;&gt;&nbsp;"
    End If
    If ManageType = "MyHouse" Then   '此处各模块中不同
        strPath = strPath & "<font color=red>" & UserName & "</font> 添加的" & ChannelShortName & ""
    Else
        If Keyword = "" Then
            If Status = 3 Then
                strPath = strPath & "所有<font color=green>已审核</font>的" & ChannelShortName & ""
            ElseIf Status = 0 Then
                strPath = strPath & "所有<font color=blue>未审核</font>的" & ChannelShortName & ""
            Else
                strPath = strPath & "所有" & ChannelShortName & "信息"
            End If
        Else
            Select Case strField
            Case "HouseDiZhi"
                strPath = strPath & "房产地址中含有 <font color=red>" & Keyword & "</font> "
            Case "HouseQuYu"
                strPath = strPath & "房产区域中含有 <font color=red>" & Keyword & "</font> "
            Case "HouseHuXing"
                strPath = strPath & "房产户型中含有 <font color=red>" & Keyword & "</font> "
            Case "Editor"
                strPath = strPath & "<font color=red>" & Keyword & "</font> 添加"
            Case "ContactName"
                strPath = strPath & "联系人是 <font color=red>" & Keyword & "</font> "
            Case Else
                strPath = strPath & "房产地址中含有 <font color=red>" & Keyword & "</font> "
            End Select
            If Status = 3 Then
                strPath = strPath & "并且<font color=green>已审核</font>的" & ChannelShortName & ""
            ElseIf Status = 0 Then
                strPath = strPath & "并且<font color=blue>未审核</font>的" & ChannelShortName & ""
            Else
                strPath = strPath & "的" & ChannelShortName
            End If
        End If
    End If
    GetPath = strPath
End Function
%>
