% Dim strgroup,foundagencybol strgroup = Request("GRP") If strgroup <> "" Then strgroup = Cint(strgroup) End if 'Varible Conversions for FINIS update+++++++++++++++++++ Select Case strgroup Case 15 strgroup = 13 Case 5 strgroup = 44 Case 20 strgroup = 18 End Select 'Varible Conversions for FINIS update+++++++++++++++++++ foundagencybol = False Function FigurePayment(principal) Dim P 'Payment Dim I 'Interest Dim L 'Loan Term In Years Dim J Dim N Dim M 'Total of Loan Amount P = principal 'Interest Rate I = 7 'Loan term in years L = 30 'Calculate Monthly Interest J = I/(12 * 100) 'Length of loan in Months N = L * 12 'Now the magic..... M = P * ( J / (1 - (1 + J) ^ -N)) FigurePayment = FormatCurrency(Round(M, 2),0,0) End Function Dim MyFileObj,MLS_RS,myListingsSQL,OnAgency,myAgencySQL,OnFeatures,sqlnew Dim allfeatures,maxcounter,counter,marker Set MyFileObj = Server.CreateObject("Scripting.FileSystemObject") set MLS_RS = Server.CreateObject("ADODB.Recordset") If Request("MODE") = "inhouse" AND Request("IH") = "yes" Then myListingsSQL = "SELECT * FROM " & strIHlistingstable & " WHERE MLS =" & Request.Querystring("MLS") Else myListingsSQL = "SELECT * FROM " & strlistingstable & " WHERE MLS =" & Request.Querystring("MLS") End if MLS_RS.cursorlocation = aduseclient MLS_RS.cachesize = 5 MLS_RS.open myListingsSQL,Connect set OnAgency = Server.CreateObject("ADODB.Recordset") myAgencySQL = "SELECT * FROM " & stragencytable & " WHERE grouping =" & strgroup OnAgency.cursorlocation = aduseclient OnAgency.cachesize = 5 OnAgency.open myAgencySQL,Connect 'Broker reiprocity listing, get agency data ......................... If OnAgency.EOF AND OnAgency.BOF Then foundagencybol = False Else Dim agid,agagency,aggrouping,agaddress,agcity,agstate,agzip,agphone Dim agfax,agemail,agother,aglogo,agextra1,agextra2,agextra3,agextra4,agextra5 foundagencybol = True agid = OnAgency.Fields("id") agagency = OnAgency.Fields("agency") aggrouping = OnAgency.Fields("grouping") agaddress = OnAgency.Fields("address") agcity = OnAgency.Fields("city") agstate = OnAgency.Fields("state") agzip = OnAgency.Fields("zip") agphone = OnAgency.Fields("phone") agfax = OnAgency.Fields("fax") agemail = OnAgency.Fields("email") agother = OnAgency.Fields("other") aglogo = OnAgency.Fields("logo") agextra1 = OnAgency.Fields("extra1") agextra2 = OnAgency.Fields("extra2") agextra3 = OnAgency.Fields("extra3") agextra4 = OnAgency.Fields("extra4") agextra5 = OnAgency.Fields("extra5") End if IF ISNull(MLS_RS.Fields("FEATURES")) Then 'Do Nothing Null Field Else If Trim(MLS_RS.Fields("FEATURES")) <> "" Then sqlnew = "SELECT * FROM " & strfeaturestable & " INNER JOIN " & strfeaturecatstable & " ON " & strfeaturestable & ".CatID = " & strfeaturecatstable & ".CatID WHERE" allfeatures = Split(Trim(MLS_RS.Fields("FEATURES")),"|") maxcounter = ubound(allfeatures) FOR counter = 0 TO maxcounter If Trim(allfeatures(counter)) <> "" Then If counter = 0 then sqlnew = sqlnew & " " & strfeaturestable & ".FeatureID = " & Cint(allfeatures(counter)) Else sqlnew = sqlnew & " OR " & strfeaturestable & ".FeatureID = " & Cint(allfeatures(counter)) End if End if Next sqlnew = sqlnew & " ORDER BY " & strfeaturestable & ".CatID ASC, " & strfeaturecatstable & ".Description" set OnFeatures = Server.CreateObject("ADODB.Recordset") OnFeatures.cursorlocation = aduseclient OnFeatures.cachesize = 5 OnFeatures.open sqlnew,Connect End if End if If foundagencybol Then %>
|
|
<%=agagency%> Phone: <%=agphone%> Fax: <%=agfax%> <%=agemail%> <%=agaddress%> <%=agcity%>, <%=agstate%> <%=agzip%> |
Features:
<% If ISNull(MLS_RS.Fields("FEATURES")) Then 'Do Nothing, null Filed Else If Trim(MLS_RS.Fields("FEATURES")) <> "" Then If Not OnFeatures.BOF Then OnFeatures.MoveFirst Do Until OnFeatures.EOF If marker <> OnFeatures.Fields(6) Then Response.Write("------" & OnFeatures.Fields(6) & "------ ") End if Response.Write(" " & OnFeatures.Fields(1) & " ") marker = OnFeatures.Fields(1) OnFeatures.MoveNext Loop End if End if End if %> *Estimated Payment: Assuming 0% down, 30 year fixed rate of 7.00% <% If strgroup <> MLS_RS.Fields("GROUPING") Then %> **This listing courtesy of: <%=stragentfirst%> <%=stragentlast%> <% If Trim(MLS_RS.Fields("Agent")) <> Trim(MLS_RS.Fields("OFFICE")) Then Response.Write("of " & Trim(MLS_RS.Fields("OFFICE"))) End if %> , <%=MLS_RS.Fields("OFFICEPHONE")%>
![]() Data Updated on: <%=FormatDateTime(MyFileObj.GetFile(Server.MapPath("/IDX/listings-residential.txt")).DateLastModified,2)%> ") End if Connect.Close Set Connect = Nothing Set MLS_RS = Nothing Set OnAgency = Nothing Set OnFeatures = Nothing Set MyFileObj = Nothing %> |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||