<%@page language="java" import="java.sql.*" %> <%@page errorPage="../tools/RCRErrorPage.jsp"%> <%@page import="com.darwinsys.util.*"%> <%@ include file="realestate.jsp" %> <% String parcellocation__thisparcel = "none"; if ("" !=null) {parcellocation__thisparcel = (String)"";} %> <% Driver Driverparcellocation = (Driver)Class.forName(MM_realestate_DRIVER).newInstance(); Connection Connparcellocation = DriverManager.getConnection(MM_realestate_STRING,MM_realestate_USERNAME,MM_realestate_PASSWORD); PreparedStatement Statementparcellocation = Connparcellocation.prepareStatement("SELECT location FROM location WHERE parcelnum= '" + parcellocation__thisparcel + "'"); ResultSet parcellocation = Statementparcellocation.executeQuery(); boolean parcellocation_isEmpty = !parcellocation.next(); boolean parcellocation_hasData = !parcellocation_isEmpty; Object parcellocation_data; int parcellocation_numRows = 0; %> <% String gccount__thiscourse = "Rio Secco"; if (request.getParameter("gcname") !=null) {gccount__thiscourse = (String)request.getParameter("gcname") ;} %> <% %> <%@page import="java.util.*"%> <% boolean sendemail = true; %> Golf Course Search <% String gchomes__MMgcname = ""; if (request.getParameter("gcname") !=null) {gchomes__MMgcname = (String)request.getParameter("gcname") ;} %> <% String gchomes__MMpropertytype = "%RESIDENTIAL%"; if (request.getParameter("propertytype") !=null) {gchomes__MMpropertytype = (String)request.getParameter("propertytype") ;} %> <% Driver Drivergchomes = (Driver)Class.forName(MM_realestate_DRIVER).newInstance(); Connection Conngchomes = DriverManager.getConnection(MM_realestate_STRING,MM_realestate_USERNAME,MM_realestate_PASSWORD); PreparedStatement Statementgchomes = Conngchomes.prepareStatement("SELECT dwellingrecord.parcelnum, lastsold, lastprice, totalliving FROM dwellingrecord left join gcparcel on gcparcel.parcelnum=dwellingrecord.parcelnum WHERE ( dwellingrecord.lastsold>0 AND dwellingrecord.landuse LIKE '" + gchomes__MMpropertytype + "' AND gcparcel.coursename='" + gchomes__MMgcname + "' ) ORDER BY LASTSOLD DESC ;"); ResultSet gchomes = Statementgchomes.executeQuery(); boolean gchomes_isEmpty = !gchomes.next(); boolean gchomes_hasData = !gchomes_isEmpty; Object gchomes_data; %> <% Driver Drivergcnames = (Driver)Class.forName(MM_realestate_DRIVER).newInstance(); Connection Conngcnames = DriverManager.getConnection(MM_realestate_STRING,MM_realestate_USERNAME,MM_realestate_PASSWORD); PreparedStatement Statementgcnames = Conngcnames.prepareStatement("select DISTINCT coursename from gcparcel ORDER BY coursename"); ResultSet gcnames = Statementgcnames.executeQuery(); boolean gcnames_isEmpty = !gcnames.next(); boolean gcnames_hasData = !gcnames_isEmpty; Object gcnames_data; int gcnames_numRows = 0; %> <% %> <% Driver Drivergccount = (Driver)Class.forName(MM_realestate_DRIVER).newInstance(); Connection Conngccount = DriverManager.getConnection(MM_realestate_STRING,MM_realestate_USERNAME,MM_realestate_PASSWORD); PreparedStatement Statementgccount = Conngccount.prepareStatement("SELECT count(*) FROM gcparcel WHERE coursename = '" + gccount__thiscourse + "'"); ResultSet gccount = Statementgccount.executeQuery(); boolean gccount_isEmpty = !gccount.next(); boolean gccount_hasData = !gccount_isEmpty; Object gccount_data; int gccount_numRows = 0; %>


Price Search for Homes/Vacant Lots on a Golf Course

Use this search to find out what homes are selling for on a particular golf course. Please note that these are only homes/lots that are adjacent to the golf course property.
Search Entry Form
1) Enter Golf Course Name:  
2) Enter Type of Property  
 
<% String resultsStr =""; String resultsStr2 =""; String formName = request.getParameter("form1"); if ( formName!= null) { if ( formName.compareTo("golfcourse") == 0 ) { String propStr = "Vacant Lots"; if ( gchomes__MMpropertytype.compareTo("%RESIDENTIAL%") == 0 ) { propStr = "Homes"; } resultsStr ="Homes that have recently sold(last 12 months) for " + propStr + " on " + gchomes__MMgcname + " are listed below. "; resultsStr2 = "Total number of parcels on the golf course for " + gchomes__MMgcname + " = " + gccount.getInt(1) + " "; if ( sendemail ) { String message ="" ; String mailhost = "localhost"; String recipient = "gcsearch@royalcastlerealty.com"; String sender = "gcsearch@royalcastlerealtycom"; String subject = "Golf Course Search "; message += "golfcourse=" + gchomes__MMgcname + "\n"; message += "type="+ propStr + "\n"; message += "remoteIP="+ request.getRemoteAddr() + "\n"; message += "remoteHost="+ request.getRemoteHost() + "\n"; try { Mailer.send(mailhost,recipient,sender,subject,message); } catch ( javax.mail.MessagingException ex) { //ex.printStackTrace(); } } %>
<%=resultsStr2%>
<% while ((gchomes_hasData)) { %> <% parcellocation__thisparcel = gchomes.getObject("parcelnum").toString(); Statementparcellocation = Connparcellocation.prepareStatement("select location from location where parcelnum= '" + parcellocation__thisparcel + "'"); parcellocation = Statementparcellocation.executeQuery(); parcellocation_hasData = parcellocation.next(); %> <% gchomes_hasData = gchomes.next(); } %>
<%=resultsStr%>
location lastsold lastprice total living space
<%=(((parcellocation_data = parcellocation.getObject("location"))==null || parcellocation.wasNull())?"":parcellocation_data)%> <%=(((gchomes_data = gchomes.getObject("lastsold"))==null || gchomes.wasNull())?"":gchomes_data)%> <%=(((gchomes_data = gchomes.getObject("lastprice"))==null || gchomes.wasNull())?"":gchomes_data)%> <%=(((gchomes_data = gchomes.getObject("totalliving"))==null || gchomes.wasNull())?"":gchomes_data)%>
This data is provided as a courtesy of Royal Castle Realty/Chet Pressler. For informational purposes only.

 

<% } } %> <% gcnames.close(); Statementgcnames.close(); Conngcnames.close(); %> <% gccount.close(); Statementgccount.close(); Conngccount.close(); %> <% parcellocation.close(); Statementparcellocation.close(); Connparcellocation.close(); %> <% gchomes.close(); Statementgchomes.close(); Conngchomes.close(); %>