<%@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 %> <% ' *** Edit Operations: declare variables MM_editAction = CStr(Request("URL")) If (Request.QueryString <> "") Then MM_editAction = MM_editAction & "?" & Request.QueryString End If ' boolean to abort record edit MM_abortEdit = false ' query string to execute MM_editQuery = "" %> <% ' *** Delete Record: declare variables if (CStr(Request("MM_delete")) <> "" And CStr(Request("MM_recordId")) <> "") Then MM_editConnection = MM_conRemax_STRING MM_editTable = "agents" MM_editColumn = "AgentID" MM_recordId = "" + Request.Form("MM_recordId") + "" MM_editRedirectUrl = "okaypage.asp" ' append the query string to the redirect URL If (MM_editRedirectUrl <> "" And Request.QueryString <> "") Then If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0 And Request.QueryString <> "") Then MM_editRedirectUrl = MM_editRedirectUrl & "?" & Request.QueryString Else MM_editRedirectUrl = MM_editRedirectUrl & "&" & Request.QueryString End If End If End If %> <% ' *** Delete Record: construct a sql delete statement and execute it If (CStr(Request("MM_delete")) <> "" And CStr(Request("MM_recordId")) <> "") Then ' create the sql delete statement MM_editQuery = "delete from " & MM_editTable & " where " & MM_editColumn & " = " & MM_recordId If (Not MM_abortEdit) Then ' execute the delete Set MM_editCmd = Server.CreateObject("ADODB.Command") MM_editCmd.ActiveConnection = MM_editConnection MM_editCmd.CommandText = MM_editQuery MM_editCmd.Execute MM_editCmd.ActiveConnection.Close If (MM_editRedirectUrl <> "") Then Response.Redirect(MM_editRedirectUrl) End If End If End If %> <% Dim agents__MMColParam agents__MMColParam = "1" If (Request.QueryString("AgentID") <> "") Then agents__MMColParam = Request.QueryString("AgentID") End If %> <% set agents = Server.CreateObject("ADODB.Recordset") agents.ActiveConnection = MM_conRemax_STRING agents.Source = "SELECT * FROM agents WHERE AgentID = " + Replace(agents__MMColParam, "'", "''") + "" agents.CursorType = 0 agents.CursorLocation = 2 agents.LockType = 3 agents.Open() agents_numRows = 0 %> Remax - Admin Tool
Agent Information - Delete An Agent
First Name
<%=(agents.Fields.Item("AgentName").Value)%>
Awards
Last Name <%=(agents.Fields.Item("AgentSurname").Value)%>
Miracle:
<%=(agents.Fields.Item("AwardMiracle").Value)%>
Designation <%=(agents.Fields.Item("Designation").Value)%>
President:
<%=(agents.Fields.Item("AwardPresident").Value)%>
Agent Since <%=(agents.Fields.Item("AgentYear").Value)%>
Executive:
<%=(agents.Fields.Item("AwardExecutive").Value)%>
Bus Number <%=(agents.Fields.Item("BusNumber").Value)%>
100%:
<%=(agents.Fields.Item("Award100").Value)%>
Fax Number <%=(agents.Fields.Item("FaxNumber").Value)%>
Hall of Fame:
<%=(agents.Fields.Item("AwardFame").Value)%>
E-mail <%=(agents.Fields.Item("EmailAddress").Value)%>
Platinum:
<%=(agents.Fields.Item("AwardPlatinum").Value)%>
Website URL <%=(agents.Fields.Item("WebsiteURL").Value)%>
Lifetime:
<%=(agents.Fields.Item("AwardUltimate").Value)%>
Website URL2 <%=(agents.Fields.Item("WebsiteURL2").Value)%>  
Agent Image <%=(agents.Fields.Item("AgentImage").Value)%>
Districts <%=(agents.Fields.Item("Districts").Value)%>
Specializations <%=(agents.Fields.Item("Specializations").Value)%>
OtherInterest <%=(agents.Fields.Item("OtherInterest").Value)%>
GeneralInfo <%=(agents.Fields.Item("GeneralInfo").Value)%>
Intranet Username <%=(agents.Fields.Item("IntraUsername").Value)%>
Intranet Password <%=(agents.Fields.Item("IntraPassword").Value)%>
">

 

 

 

<% agents.Close() %>