%@LANGUAGE="VBSCRIPT"%> <% Dim rs_city__MMColParam rs_city__MMColParam = "Agricultural" If (Request("MM_EmptyValue") <> "") Then rs_city__MMColParam = Request("MM_EmptyValue") End If %> <% set rs_city = Server.CreateObject("ADODB.Recordset") rs_city.ActiveConnection = MM_conRemax_STRING rs_city.Source = "SELECT DISTINCT HomeCity FROM homes WHERE HomeCategory = '" + Replace(rs_city__MMColParam, "'", "''") + "' ORDER BY HomeCity ASC" rs_city.CursorType = 0 rs_city.CursorLocation = 2 rs_city.LockType = 3 rs_city.Open() rs_city_numRows = 0 %> <% Dim rs_price__MMColParam rs_price__MMColParam = "Agricultural" If (Request("MM_EmptyValue") <> "") Then rs_price__MMColParam = Request("MM_EmptyValue") End If %> <% set rs_price = Server.CreateObject("ADODB.Recordset") rs_price.ActiveConnection = MM_conRemax_STRING rs_price.Source = "SELECT DISTINCT HomePrice FROM homes WHERE HomeCategory = '" + Replace(rs_price__MMColParam, "'", "''") + "' ORDER BY HomePrice DESC" rs_price.CursorType = 0 rs_price.CursorLocation = 2 rs_price.LockType = 3 rs_price.Open() rs_price_numRows = 0 %> <% Dim combo__CityPick combo__CityPick = "%" if (Request.QueryString("HomeCity") <> "") then combo__CityPick = Request.QueryString("HomeCity") %> <% Dim combo__PriceLow combo__PriceLow = "0" if (Request.QueryString("PriceLow") <> "") then combo__PriceLow = Request.QueryString("PriceLow") %> <% Dim combo__PriceHigh combo__PriceHigh = "999999999" if (Request.QueryString("PriceHigh") <> "") then combo__PriceHigh = Request.QueryString("PriceHigh") %> <% set combo = Server.CreateObject("ADODB.Recordset") combo.ActiveConnection = MM_conRemax_STRING combo.Source = "SELECT agents.AgentName, agents.AgentSurname, homes.* FROM agents, homes WHERE agents.AgentID = homes.AgentID and homes.HomeCity LIKE '" + Replace(combo__CityPick, "'", "''") + "' and homes.HomePrice >= '" + Replace(combo__PriceLow, "'", "''") + "' and homes.HomePrice <= '" + Replace(combo__PriceHigh, "'", "''") + "' AND homes.HomeCategory = 'Agricultural' ORDER BY homes.homeprice ASC" combo.CursorType = 0 combo.CursorLocation = 2 combo.LockType = 3 combo.Open() combo_numRows = 0 %> <% Dim Repeat1__numRows Repeat1__numRows = -1 Dim Repeat1__index Repeat1__index = 0 combo_numRows = combo_numRows + Repeat1__numRows %> <% ' *** Go To Record and Move To Record: create strings for maintaining URL and Form parameters ' create the list of parameters which should not be maintained MM_removeList = "&index=" If (MM_paramName <> "") Then MM_removeList = MM_removeList & "&" & MM_paramName & "=" MM_keepURL="":MM_keepForm="":MM_keepBoth="":MM_keepNone="" ' add the URL parameters to the MM_keepURL string For Each Item In Request.QueryString NextItem = "&" & Item & "=" If (InStr(1,MM_removeList,NextItem,1) = 0) Then MM_keepURL = MM_keepURL & NextItem & Server.URLencode(Request.QueryString(Item)) End If Next ' add the Form variables to the MM_keepForm string For Each Item In Request.Form NextItem = "&" & Item & "=" If (InStr(1,MM_removeList,NextItem,1) = 0) Then MM_keepForm = MM_keepForm & NextItem & Server.URLencode(Request.Form(Item)) End If Next ' create the Form + URL string and remove the intial '&' from each of the strings MM_keepBoth = MM_keepURL & MM_keepForm if (MM_keepBoth <> "") Then MM_keepBoth = Right(MM_keepBoth, Len(MM_keepBoth) - 1) if (MM_keepURL <> "") Then MM_keepURL = Right(MM_keepURL, Len(MM_keepURL) - 1) if (MM_keepForm <> "") Then MM_keepForm = Right(MM_keepForm, Len(MM_keepForm) - 1) ' a utility function used for adding additional parameters to these strings Function MM_joinChar(firstItem) If (firstItem <> "") Then MM_joinChar = "&" Else MM_joinChar = "" End If End Function %>
![]() |
||||||||||||
<% If Not combo.EOF Or Not combo.BOF Then %>
|
||||||||||||
|