%@LANGUAGE="VBSCRIPT"%> <% ' *** Restrict Access To Page: Grant or deny access to this page MM_authorizedUsers="" MM_authFailedURL="login.asp" MM_grantAccess=false If Session("MM_Username") <> "" Then If (true Or CStr(Session("MM_UserAuthorization"))="") Or _ (InStr(1,MM_authorizedUsers,Session("MM_UserAuthorization"))>=1) Then MM_grantAccess = true End If End If If Not MM_grantAccess Then MM_qsChar = "?" If (InStr(1,MM_authFailedURL,"?") >= 1) Then MM_qsChar = "&" MM_referrer = Request.ServerVariables("URL") if (Len(Request.QueryString()) > 0) Then MM_referrer = MM_referrer & "?" & Request.QueryString() MM_authFailedURL = MM_authFailedURL & MM_qsChar & "accessdenied=" & Server.URLEncode(MM_referrer) Response.Redirect(MM_authFailedURL) End If %> <% Dim combo__HomePick combo__HomePick = "1" if (Request.QueryString("HomeID") <> "") then combo__HomePick = Request.QueryString("HomeID") %> <% 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.HomeID = " + Replace(combo__HomePick, "'", "''") + "" combo.CursorType = 0 combo.CursorLocation = 2 combo.LockType = 3 combo.Open() combo_numRows = 0 %> <% Dim combo_2ndagent__HomePick combo_2ndagent__HomePick = "1" if (Request.QueryString("HomeID") <> "") then combo_2ndagent__HomePick = Request.QueryString("HomeID") %> <% set combo_2ndagent = Server.CreateObject("ADODB.Recordset") combo_2ndagent.ActiveConnection = MM_conRemax_STRING combo_2ndagent.Source = "SELECT agents.AgentName, agents.AgentSurname FROM agents, homes WHERE agents.AgentID = homes.AgentID2 and homes.HomeID = " + Replace(combo_2ndagent__HomePick, "'", "''") + "" combo_2ndagent.CursorType = 0 combo_2ndagent.CursorLocation = 2 combo_2ndagent.LockType = 3 combo_2ndagent.Open() combo_2ndagent_numRows = 0 %> <% Dim homes__MMColParam homes__MMColParam = "1" If (Request.QueryString("HomeID") <> "") Then homes__MMColParam = Request.QueryString("HomeID") End If %> <% Dim homes Dim homes_numRows Set homes = Server.CreateObject("ADODB.Recordset") homes.ActiveConnection = MM_conRemax_STRING homes.Source = "SELECT * FROM homes WHERE HomeID = " + Replace(homes__MMColParam, "'", "''") + "" homes.CursorType = 0 homes.CursorLocation = 2 homes.LockType = 1 homes.Open() homes_numRows = 0 %> <% Dim MM_paramName %> <% ' *** 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 %>
![]() |
|||
<% combo.Close() %> <% combo_2ndagent.Close() %> <% homes.Close() Set homes = Nothing %>