📄 powereasy.house.asp
字号:
<%
'**************************************************************
' Software name: PowerEasy SiteWeaver
' Web: http://www.powereasy.net
' Copyright (C) 2005-2008 佛山市动易网络科技有限公司 版权所有
'**************************************************************
Dim HouseID, InfoType
Class House
Private MoreCorrelative
Public Sub Init()
ClassID = PE_CLng(Trim(Request("ClassID")))
SpecialID = PE_CLng(Trim(Request("SpecialID")))
HouseID = PE_CLng(Request("HouseID"))
ChannelShortName = "房产"
'*****************************
'读取语言包中的字符设置
strListStr_Font = XmlText_Class("HouseList/UpdateTimeColor_New", "color=""red""")
'*****************************
strPageTitle = SiteTitle
Call GetChannel(ChannelID)
HtmlDir = InstallDir & ChannelDir
If Trim(ChannelName) <> "" And ShowNameOnPath <> False Then
strNavPath = strNavPath & " " & strNavLink & " <a class='LinkPath' href='" & ChannelUrl & "/Index.asp'>" & ChannelName & "</a>"
strPageTitle = strPageTitle & " >> " & ChannelName
End If
Call GetClass
End Sub
'=================================================
'函数名:ShowChannelCount
'作 用:显示频道统计信息
'参 数:无
'=================================================
Private Function GetChannelCount()
Dim rs, Count_All, Count_CZ, Count_CS, Count_QG, Count_QZ, Count_HZ
Set rs = Conn.Execute("select Count(0) from PE_HouseCZ")
Count_CZ = rs(0)
rs.Close
Set rs = Nothing
Set rs = Conn.Execute("select Count(0) from PE_HouseCS")
Count_CS = rs(0)
rs.Close
Set rs = Nothing
Set rs = Conn.Execute("select Count(0) from PE_HouseQG")
Count_QG = rs(0)
rs.Close
Set rs = Nothing
Set rs = Conn.Execute("select Count(0) from PE_HouseQZ")
Count_QZ = rs(0)
rs.Close
Set rs = Nothing
Set rs = Conn.Execute("select Count(0) from PE_HouseHZ")
Count_HZ = rs(0)
rs.Close
Set rs = Nothing
Count_All = Count_CZ + Count_CS + Count_QG + Count_QZ + Count_HZ
GetChannelCount = Replace(Replace(Replace(Replace(Replace(Replace(R_XmlText_Class("ChannelCount", "信息总数: {$Count_All} 条<br>出租信息: {$Count_CZ} 条<br>出售信息: {$Count_CS} 条<br>求租信息: {$Count_QZ} 条<br>求购信息: {$Count_QG} 条<br>合租信息: {$Count_HZ} 条"), "{$Count_All}", Count_All), "{$Count_CZ}", Count_CZ), "{$Count_CS}", Count_CS), "{$Count_QZ}", Count_QZ), "{$Count_QG}", Count_QG), "{$Count_HZ}", Count_HZ)
End Function
Private Function GetAreaList()
Dim sql, rsArealist, strAreaList, i
Set rsArealist = Server.CreateObject("adodb.recordset")
sql = "select * from PE_HouseArea"
rsArealist.Open sql, Conn, 1, 3
If rsArealist.EOF Then
strAreaList = "<li>没有任何区域</li>"
Else
strAreaList = "<table width=100% ><tr>"
Do While Not rsArealist.EOF
strAreaList = strAreaList & "<td><a href='Search.asp?InfoType=" & ClassID & "&HouseQuYu=" & rsArealist("AreaName") & "'>" & rsArealist("AreaName") & "</td>"
i = i + 1
If (i Mod 10) = 0 Then
strAreaList = strAreaList & "</tr><tr>"
End If
rsArealist.MoveNext
Loop
strAreaList = strAreaList & "</tr></table>"
End If
GetAreaList = strAreaList
End Function
Public Function GetHouseList(ClassID, HouseSource, Num, isHot, isElite, isContactName, isDiZhi, isHuXing, isLeiXing, isPrice, isMianJi, isUpdateTime, isSource)
Dim sqlstr, rsHouseList, strHouseList, UserPage, strThisClass, OpenType, iCount, iYouXiaoQi, CssName
Call GetClass
strThisClass = ""
iCount = 1
CurrentPage = PE_CLng(Trim(Request("page")))
If Num <> 0 Then
sqlstr = "select Top " & Num & " "
Else
sqlstr = "select "
End If
Select Case PE_CLng(ClassID)
Case 1
sqlstr = sqlstr & "HouseID,HouseDiZhi,HouseSource,HouseHuXing,HouseLeiXing,CommendClassDays,YouXiaoQi,TotalPrice,HousePriceType,HouseMianJi,Elite,UpdateTime,Deleted from PE_HouseCS "
Case 2
sqlstr = sqlstr & "HouseID,HouseDiZhi,Elite,HouseSource,HouseHuXing,HouseLeiXing,CommendClassDays,YouXiaoQi,HouseMianJI,HouseZuJin,HouseZuJinType,HouseZhuangXiu,UpdateTime,Deleted from PE_HouseCZ "
Case 3
sqlstr = sqlstr & "HouseID,HouseDiZhi,Elite,HouseLeiXing,HouseHuXing,HouseSource,CommendClassDays,YouXiaoQi,HouseMianJi1,HouseMianJi2,HousePrice1,HousePrice2,HousePriceType,UpdateTime,ContactName,Deleted from PE_HouseQG "
Case 4
sqlstr = sqlstr & "HouseID,HouseDiZhi,Elite,HouseSource,HouseHuXing,HouseLeiXing,CommendClassDays,YouXiaoQi,HouseMianJi1,HouseMianJi2,UpdateTime,Elite,HouseZuJin1,HouseZuJin2,ContactName,HouseZuJinType,Deleted from PE_HouseQZ "
Case 5
sqlstr = sqlstr & "HouseID,HeZhuType,HouseDiZhi,HouseLeiXing,Elite,HouseHuXing,HouseSource,CommendClassDays,YouXiaoQi,HouseZuJin,HouseMianJi1,UpdateTime,HouseZuJinType,ContactName,Deleted from PE_HouseHZ "
Case Else
FoundErr = True
GetHouseList = "<li>参数丢失!</li>"
Exit Function
End Select
sqlstr = sqlstr & " Where Passed=" & PE_True & " and Deleted=" & PE_False & ""
Select Case PE_CLng(HouseSource)
Case 1
sqlstr = sqlstr & " and HouseSource='中介'"
Case 2
sqlstr = sqlstr & " and HouseSource='个人'"
End Select
If isHot = True Then
sqlstr = sqlstr & " and Hot=" & PE_True & ""
End If
If isElite = True Then
sqlstr = sqlstr & " and Elite=" & PE_True & ""
End If
If ItemOpenType = 0 Then
OpenType = "_self"
Else
OpenType = "_blank"
End If
Set rsHouseList = Server.CreateObject("ADODB.Recordset")
sqlstr = sqlstr & " order by OnTop " & PE_OrderType & ",UpdateTime Desc"
rsHouseList.Open sqlstr, Conn, 1, 3
If rsHouseList.BOF And rsHouseList.EOF Then
If UserPage = True Then totalPut = 0
If isHot = False And isElite = False And MoreCorrelative = False Then
strHouseList = "<li>" & strThisClass & XmlText_Class("HouseList/t1", "没有") & ChannelShortName & "</li>"
ElseIf isHot = True And isElite = False Then
strHouseList = "<li>" & strThisClass & XmlText_Class("HouseList/t1", "没有") & XmlText_Class("HouseList/t2", "热门") & ChannelShortName & "</li>"
ElseIf isHot = False And isElite = True Then
strHouseList = "<li>" & strThisClass & XmlText_Class("HouseList/t1", "没有") & XmlText_Class("HouseList/t3", "推荐") & ChannelShortName & "</li>"
Else
strHouseList = "<li>" & strThisClass & XmlText_Class("HouseList/t1", "没有") & XmlText_Class("HouseList/t2", "热门") & XmlText_Class("HouseList/t3", "推荐") & ChannelShortName & "</li>"
End If
rsHouseList.Close
Set rsHouseList = Nothing
GetHouseList = strHouseList
Exit Function
Else
totalPut = rsHouseList.RecordCount
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
If (CurrentPage - 1) * MaxPerPage < totalPut Then
rsHouseList.Move (CurrentPage - 1) * MaxPerPage
Else
CurrentPage = 1
End If
End If
End If
CssName = "houselistbg"
strHouseList = "<table class='housetable' width=100% ><tr>"
If isContactName = True Then
strHouseList = strHouseList & "<td align='center' class='houseth'>联系人</td>"
End If
If ClassID = 5 Then
strHouseList = strHouseList & "<td align='center' class='houseth'>合租类型</td>"
End If
If isDiZhi = True Then
strHouseList = strHouseList & "<td align='center' class='houseth'>地址</td>"
End If
If isHuXing = True Then
strHouseList = strHouseList & "<td align='center' class='houseth'>户型</td>"
End If
If isLeiXing = True Then
strHouseList = strHouseList & "<td align='center' class='houseth'>类型</td>"
End If
If isPrice = True Then
If ClassID = 1 Or ClassID = 3 Then
strHouseList = strHouseList & "<td align='center' class='houseth'>价格</td>"
Else
strHouseList = strHouseList & "<td align='center' class='houseth'>租金</td>"
End If
End If
If isMianJi = True Then
strHouseList = strHouseList & "<td align='center' class='houseth'>面积</td>"
End If
If isUpdateTime = True Then
strHouseList = strHouseList & "<td align='center' class='houseth'>发布时间</td>"
End If
If isSource = True Then
strHouseList = strHouseList & "<td align='center' class='houseth'>来源</td>"
End If
strHouseList = strHouseList & "</tr>"
Do While Not rsHouseList.EOF
Select Case rsHouseList("YouXiaoQi")
Case "一周"
iYouXiaoQi = 7
Case "半个月"
iYouXiaoQi = 14
Case "一个月"
iYouXiaoQi = 30
Case "两个月"
iYouXiaoQi = 61
Case "半年"
iYouXiaoQi = 183
Case "一年"
iYouXiaoQi = 365
End Select
If DateDiff("D", rsHouseList("UpdateTime"), Now()) > iYouXiaoQi Then
rsHouseList("Deleted") = PE_True
rsHouseList.Update
Else
If isElite = True And DateDiff("D", rsHouseList("UpdateTime"), Now()) > rsHouseList("CommendClassDays") Then
rsHouseList("CommendClassDays") = 0
rsHouseList("Elite") = PE_False
rsHouseList.Update
Else
strHouseList = strHouseList & "<tr>"
If isContactName = True Then
strHouseList = strHouseList & "<td align='center' class='" & CssName & "'>" & rsHouseList("ContactName") & "</td>"
End If
If ClassID = 5 Then
strHouseList = strHouseList & "<td align='center' class='" & CssName & "'>" & rsHouseList("HeZhuType") & "</td>"
End If
If isDiZhi = True Then
strHouseList = strHouseList & "<td align='center' class='" & CssName & "'><a href='ShowHouse.asp?ClassID=" & ClassID & "&HouseID=" & rsHouseList("HouseID") & "' target='" & OpenType & "'>" & rsHouseList("HouseDiZhi") & "</a></td>"
End If
If isHuXing = True Then
strHouseList = strHouseList & "<td align='center' class='" & CssName & "'><a href='ShowHouse.asp?ClassID=" & ClassID & "&HouseID=" & rsHouseList("HouseID") & "' target='" & OpenType & "'>" & Replace(PE_HTMLEncode(rsHouseList("HouseHuXing")), ",", "") & "</a></td>"
End If
If isLeiXing = True Then
If rsHouseList("HouseLeiXing") = "" Then
strHouseList = strHouseList & "<td align='center' class='" & CssName & "'>不详</td>"
Else
strHouseList = strHouseList & "<td align='center' class='" & CssName & "'>" & rsHouseList("HouseLeiXing") & "</td>"
End If
End If
If isPrice = True Then
Select Case PE_CLng(ClassID)
Case 1
strHouseList = strHouseList & "<td align='center' class='" & CssName & "'>" & rsHouseList("TotalPrice") & rsHouseList("HousePriceType") & "</td>"
Case 2
strHouseList = strHouseList & "<td align='center' class='" & CssName & "'>"
If rsHouseList("HouseZuJinType") = "价格面议" Then
strHouseList = strHouseList & rsHouseList("HouseZuJinType") & "</td>"
Else
strHouseList = strHouseList & rsHouseList("HouseZuJin") & "" & rsHouseList("HouseZuJinType") & "</td>"
End If
Case 3
strHouseList = strHouseList & "<td align='center' class='" & CssName & "'>" & rsHouseList("HousePrice1") & "-" & rsHouseList("HousePrice2") & "" & rsHouseList("HousePriceType") & "</td>"
Case 4
strHouseList = strHouseList & "<td align='center' class='" & CssName & "'>"
If rsHouseList("HouseZuJinType") = "价格面议" Then
strHouseList = strHouseList & rsHouseList("HouseZuJinType") & "</td>"
Else
strHouseList = strHouseList & rsHouseList("HouseZuJin1") & "-" & rsHouseList("HouseZuJin2") & "" & rsHouseList("HouseZuJinType") & "</td>"
End If
Case 5
strHouseList = strHouseList & "<td align='center' class='" & CssName & "'>"
If rsHouseList("HouseZuJinType") = "价格面议" Then
strHouseList = strHouseList & rsHouseList("HouseZuJinType") & "</td>"
Else
strHouseList = strHouseList & rsHouseList("HouseZuJin") & "" & rsHouseList("HouseZuJinType") & "</td>"
End If
End Select
End If
If isMianJi = True Then
Select Case PE_CLng(ClassID)
Case 1
strHouseList = strHouseList & "<td align='center' class='" & CssName & "'>" & rsHouseList("HouseMianJi") & "㎡</td>"
Case 2
strHouseList = strHouseList & "<td align='center' class='" & CssName & "'>" & rsHouseList("HouseMianJi") & "㎡</td>"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -