<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> <% ' *** Redirect If Session Variable Does Not Exist ' *** MagicBeat Server Behavior - 2016 - by Jag S. Sidhu - www.magicbeat.com If Session("svAdmin") = "" Then Response.Redirect("login.asp?error=fail") End If %> <% Dim rsResults__MMColParam rsResults__MMColParam = "%" if (Request.QueryString("pid") <> "") then rsResults__MMColParam = Request.QueryString("pid") %> <% Dim rsResults__MMColParam2 rsResults__MMColParam2 = "%" if (Request.QueryString("type") <> "") then rsResults__MMColParam2 = Request.QueryString("type") %> <% Dim rsResults__MMColParam3 rsResults__MMColParam3 = "%" if (Request.QueryString("beds") <> "") then rsResults__MMColParam3 = Request.QueryString("beds") %> <% set rsResults = Server.CreateObject("ADODB.Recordset") rsResults.ActiveConnection = MM_connCapRes_STRING rsResults.Source = "SELECT * FROM Property_Details WHERE PID LIKE '%" + Replace(rsResults__MMColParam, "'", "''") + "%' AND Property_Type LIKE '%" + Replace(rsResults__MMColParam2, "'", "''") + "%' AND Number_of_Bedrooms LIKE '%" + Replace(rsResults__MMColParam3, "'", "''") + "%' ORDER BY Property_Price ASC" rsResults.CursorType = 0 rsResults.CursorLocation = 2 rsResults.LockType = 3 rsResults.Open() rsResults_numRows = 0 %> <% Dim Repeat1__numRows Repeat1__numRows = -1 Dim Repeat1__index Repeat1__index = 0 rsResults_numRows = rsResults_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 %> /// Capital Residence Administration \\\
VIEW PENDING PROPERTIES | SEARCH ALL PROPERTIES

SEARCH RESULTS

<% While ((Repeat1__numRows <> 0) AND (NOT rsResults.EOF)) %>
<%=(rsResults.Fields.Item("Property_Country").Value)%> <%=(rsResults.Fields.Item("Property_Type").Value)%> : <%=(rsResults.Fields.Item("Property_Style").Value)%> <%=(rsResults.Fields.Item("Property_Price").Value)%> "> VIEW | ">DELETE
<% Repeat1__index=Repeat1__index+1 Repeat1__numRows=Repeat1__numRows-1 rsResults.MoveNext() Wend %> <% If rsResults.EOF And rsResults.BOF Then %>
Sorry
Your search produced no results
<% End If ' end rsResults.EOF And rsResults.BOF %> <% rsResults.Close() %>