'$0', 'searchPlotPrice_max'=>'No Limit', 'searchStyles'=>'', 'searchSubdivisions'=>'', 'searchStatus'=>'', 'searchCity'=>'City name.', 'searchLot'=>'Lot No.', 'searchAddress'=>'Address', 'searchBedrooms'=>'', 'searchBathrooms'=>'', 'searchGarage'=>'', 'searchSQFT'=>'', ); // Incoming from lots if ( isset($_GET['subID']) && (int)$_GET['subID'] > 0 && isset($_GET['plotID']) && (int)$_GET['plotID'] > 0 ){ $select = " SELECT modelID FROM homes WHERE subID = '".mysql_real_escape_string($_GET['subID'])."' AND plotID = '".mysql_real_escape_string($_GET['plotID'])."' "; $result = mysql_query($select) or die('MYSQL Error'); if (mysql_num_rows($result) > 0 ){ $row = mysql_fetch_assoc($result); $_REQUEST['modelID'] = $row['modelID']; } unset($select,$result,$row); } // View Home // Ajax Response if ( isset($_REQUEST['modelID']) && (int)$_REQUEST['modelID'] > 0 ) { $viewHome = ''; $select = "SELECT s.subName, h.modelDescription AS `modelDescription_h`, h.modelMLS, " . " h.modelLot, h.modelBlock, h.modelCity, p.plotPrice, modelAddress, realtorID, "."\n" . " s.subMapLat, s.subMapLng, s.subMapZoom, p.plotMapDataJSON, modelStatus, modelStyle, " . " s.subID, p.plotID " . " FROM subDivisions AS s " . " INNER JOIN plots AS p ON s.subID = p.subID " . " INNER JOIN homes AS h ON ( s.subID = h.subID AND p.plotID = h.plotID ) " . " WHERE modelID = '".mysql_real_escape_string($_REQUEST['modelID'])."' "; $result = mysql_query($select) or die('MYSQL Error'); if (mysql_num_rows($result) > 0 ){ $row = mysql_fetch_assoc($result); $displayFiles = array(); // Find the files for this home $selectFiles = "SELECT fileName, fileType, fileText FROM homeFiles WHERE ownerID = '".mysql_real_escape_string($_REQUEST['modelID'])."'"; $resultFiles = mysql_query($selectFiles) or die('Cant find home files'); if (mysql_num_rows($resultFiles) > 0 ){ $homeImage = ''; $otherImages = array(); while($rowFiles = mysql_fetch_assoc($resultFiles)){ $fileTitle = ''; switch(strtolower($rowFiles['fileType'])){ case 'jpg': if ( $homeImage == '' ){ // Nick - Lightbox items in this section - Base image $homeImage = ''; } else { $otherImages[] = $rowFiles; } break; case 'spe': $fileTitle = 'Spec Sheet'; break; case 'flo': $fileTitle = 'Floorplan'; break; case 'fin': $fileTitle = 'Financing Info'; break; case 'pri': $fileTitle = 'Pricing Sheet'; break; case 'pdf': $fileTitle = $rowFiles['fileText']; break; } if ( $fileTitle != '' ){ $displayFiles[] = ''.$fileTitle.''; } } } $homeLinks = array( 'print'=>' Print ', // 'search'=>' Back to Search ', 'search'=>' Back to Search ', 'subdivision'=>' Subdivision Page ', ); /// Figureout what to show as price if ( $row['modelStatus'] == 3 ){ // SOLD $priceListing = 'SOLD'; } else { $priceListing = ( ( $row['plotPrice'] != '' ) ? '$'. number_format(preg_replace('/[^-0-9|.]/i', '', $row['plotPrice']),2) : ' N/A ' ); } // Lets try to get some output $viewHome .= '
' . '
' . '

'.$row['subName'].'


' . '

Address: '.$row['modelAddress'].'

' // . '

Lot '.$row['modelLot'].', Block '.$row['modelBlock'].' / '.$row['modelCity'].'

' . '

City: '.$row['modelCity'].'

' . '

Type: '.$row['modelStyle'].'

' . '
' . implode('',$homeLinks).'
' . '
'.$priceListing.'
' . '
Description
'.nl2br($row['modelDescription_h']).'
'; $viewHome .= ( (count($displayFiles) > 0 ) ? '
PDF Documents available for download:
'. implode('', $displayFiles).'
' : '' ); // Find Realtor if( isset($row['realtorID']) && (int)$row['realtorID'] > 0 ){ $realtorSelect = "SELECT realtorName, realtorPhone1, realtorPhone2, realtorEmail, realtorPhoto, companyTitle, companyLogo " . " FROM realtors AS r " . " LEFT JOIN realtorCompany AS rc ON r.realtorCompany = rc.companyID " . " WHERE realtorID = '". mysql_real_escape_string($row['realtorID']) ."'"; $realtorResult = mysql_query($realtorSelect) or die('Cant find realtor'); if(mysql_num_rows($realtorResult) > 0 ){ $realtorRow = mysql_fetch_assoc($realtorResult); $viewHome .= '
This property is listed with:' . '
' . '
'.( ( isset($realtorRow['realtorPhoto']) && is_file('../apps/models/realtors/'.$realtorRow['realtorPhoto']) ) ? '' : '' ).''.$realtorRow['realtorName'].'('.$realtorRow['companyTitle'].')
' . ( ( isset($realtorRow['realtorPhone1']) && trim($realtorRow['realtorPhone1']) != '' ) ? '
'.$realtorRow['realtorPhone1'].'
' : '') . ( ( isset($realtorRow['realtorPhone2']) && trim($realtorRow['realtorPhone2']) != '' ) ? '
'.$realtorRow['realtorPhone2'].'
' : '') . ( ( isset($realtorRow['realtorEmail']) && trim($realtorRow['realtorEmail']) != '' ) ? '
'.$realtorRow['realtorEmail'].'
' : '') . '
'; } } $viewHome .= '
'; // Does MLS actually there if($row['modelMLS']) { $api = new SparkAPI_APIAuth(SPARK_KEY, SPARK_SECRET); $api->SetApplicationName("Bigelow-Aquire-Info"); $api->SetDeveloperMode(false); $resultMLS = $api->GetListings( array( '_pagination' => 1, '_limit' => 1, '_page' => 1, '_filter' => "ListingId Eq '".$row['modelMLS']."'", ) ); // Figure out if we have results if ( isset($resultMLS) && is_array($resultMLS) && count($resultMLS) > 0 ){ // Get MLS Photos $mls_photos = $api->GetListingPhotos($resultMLS[0]['Id']); if ( is_array($mls_photos) && count($mls_photos) > 0 ){ $viewHome .= '
' . $homeImage.'
'; // Nick - Lightbox items in this section foreach($otherImages as $otherImage){ //''; $viewHome .= '
' . '' . '' . '' . '
'; } // Nick - Lightbox items in this section foreach($mls_photos as $photoArr){ $viewHome .= '
' . '' . '' . '' . '
'; } $viewHome .= '
'; $viewHome .= '

'; } } } else { $viewHome .= '
' . $homeImage.'
'; // Nick - Lightbox items in this section foreach($otherImages as $otherImage){ //''; $viewHome .= '
' . '' . '' . '' . '
'; } $viewHome .= '
'; $viewHome .= '

'; } } else { $viewHome .= 'Cannot Find Home/Model'; } if ( isset($_POST['task']) && $_POST['task'] == md5('view') ){ echo $viewHome; exit; } } if ( isset($_POST['task']) && $_POST['task'] == md5('search') ){ /*/ LET MAKE SOME CONTENT $select = "SELECT modelID, plotPrice, modelStyle, subName, modelLot, modelBlock, modelCity, " . " (modelMain+modelUpper+modelLower) AS `modelSQFT`, " . " modelBeds, modelBath, modelGarage, modelMLS, modelAddress, modelStatus " . " FROM subDivisions AS s " . " INNER JOIN plots AS p ON s.subID = p.subID " . " INNER JOIN homes AS h ON ( s.subID = h.subID AND p.plotID = h.plotID ) " . " WHERE s.status = 1 " //. " AND (modelStatus = 4) " . " AND ( soldDate = 0 )" ; // AND (plotStatus != 4 AND plotStatus != 5 ) // OR DATE_FORMAT(FROM_UNIXTIME(soldDate),'%Y') = DATE_FORMAT(NOW(),'%Y') //. " AND (modelStatus != 4 AND modelStatus != 5 ) "; //*/ $select = "SELECT modelID, plotPrice, modelStyle, subName, modelLot, modelBlock, modelCity, " . " (modelMain+modelUpper+modelLower) AS `modelSQFT`, " . " modelBeds, modelBath, modelGarage, modelMLS, modelAddress, modelStatus " . " FROM homes AS h " . " INNER JOIN subDivisions AS s ON h.subID = s.subID " . " INNER JOIN plots AS p ON (h.plotID = p.plotID AND h.subID = p.subID) " . " WHERE s.status = 1 " . " AND ( soldDate = 0 )"; // Ajax Response $where = ""; if ( isset($_POST['task']) && $_POST['task'] == md5('search') ){ foreach( $searchDefaults as $field => $value){ if ( isset($_POST[$field]) && $_POST[$field] != $value ){ // Generically save search results $_SESSION['search_homes'][$field] = $_POST[$field]; switch ($field) { case 'searchPlotPrice_min': if ($_POST['searchPlotPrice_min'] == $searchDefaults['searchPlotPrice_min'] ){ unset($_SESSION['search_homes'][$field]);// clear out default search, I know... super cheesy $_POST['searchPlotPrice_min'] = '0.00'; } $where .= " AND CAST(plotPrice AS DECIMAL(12,2)) >= '".mysql_real_escape_string(preg_replace('/[^-0-9|.]/i', '', $_POST[$field]))."' "; //preg_replace('/[^-0-9]/i', '', $_POST[$field]); // doubleval($_POST[$field]) break; case 'searchPlotPrice_max': if ($_POST['searchPlotPrice_max'] == $searchDefaults['searchPlotPrice_max'] ){ unset($_SESSION['search_homes'][$field]);// clear out default search, I know... super cheesy $_POST['searchPlotPrice_max'] = '9999999999.99'; // SETUP THE DEFAULT SINCE THIS SYSTEM THINKS STRING = NUMBER } $where .= " AND CAST(plotPrice AS DECIMAL(12,2)) <= '".mysql_real_escape_string(preg_replace('/[^-0-9|.]/i', '', $_POST[$field]))."' "; break; case 'searchStyles': $where .= " AND modelStyle LIKE '".mysql_real_escape_string($_POST[$field])."' "; break; case 'searchSubdivisions': $where .= " AND s.subID = '".mysql_real_escape_string((int)$_POST[$field])."' "; break; case 'searchStatus': $where .= " AND modelStatus = '".mysql_real_escape_string((int)$_POST[$field])."' "; break; case 'searchCity': $where .= " AND modelCity LIKE '".mysql_real_escape_string($_POST[$field])."%' "; break; case 'searchLot': $where .= " AND modelLot LIKE '".mysql_real_escape_string($_POST[$field])."%' "; break; case 'searchAddress': $where .= " AND modelBlock LIKE '".mysql_real_escape_string($_POST[$field])."%' "; break; case 'searchBedrooms': $where .= " AND modelBeds >= '".mysql_real_escape_string((int)$_POST[$field])."' "; break; case 'searchBathrooms': $where .= " AND modelBath >= '".mysql_real_escape_string((int)$_POST[$field])."' "; break; case 'searchGarage': $where .= " AND modelGarage >= '".mysql_real_escape_string((int)$_POST[$field])."' "; break; case 'searchSQFT': $where .= " AND (modelMain+modelUpper+modelLower) >= '".mysql_real_escape_string((int)$_POST[$field])."' "; break; } } } } // Add Where $select .= $where; // Figure out GroupBy? //$select .= " GROUP BY subName "; // Figure out sort $sortClass = ''; if ( isset($sort) && trim($sort) != '' ){ // Check sort and setup order by switch($sort){ case 'plotPrice': $select .= " ORDER BY CAST( REPLACE(REPLACE(plotPrice,'$',''),',','') AS DECIMAL(12,2)) ".mysql_real_escape_string($sortDir)." "; break; case 'modelLot': default: $select .= " ORDER BY `".mysql_real_escape_string($sort)."` ".mysql_real_escape_string($sortDir)." "; break; } $sortClass = 'sort'.$sortDir; $_SESSION['search_homes']['sort'] = $sort; $_SESSION['search_homes']['sortDir'] = $sortDir; } else { $select .= " ORDER BY CAST( REPLACE(REPLACE(plotPrice,'$',''),',','') AS DECIMAL(12,2))"; $sort = 'plotPrice'; $sortDir = 'ASC'; $sortClass = 'sort'.$sortDir; $_SESSION['search_homes']['sort'] = 'plotPrice'; $_SESSION['search_homes']['sortDir'] = 'ASC'; } //echo $select; $result = mysql_query($select) or die(mysql_error()); $outputTable = ''; if (mysql_num_rows($result) > 0 ){ // Setup headers $outputTable .= '
' . '
 
' . '
PRICE
' . '
STYLE
' . '
SUBDIVISION
' . '
LOT
' . '
City
' . '
SQFT
' . '
BR
' . '
BA
' . '
GAR
' . '
'; while ($row = mysql_fetch_assoc($result)){ // Find the files for this home -- For some rea $homeImage = 'View'; $selectFiles = "SELECT fileName, fileType, fileText FROM homeFiles WHERE ownerID = '".mysql_real_escape_string($row['modelID'])."' AND fileType LIKE 'jpg'"; $resultFiles = mysql_query($selectFiles) or die('Cant find home files'); if (mysql_num_rows($resultFiles) > 0 ){ while($rowFiles = mysql_fetch_assoc($resultFiles)){ if ( file_exists($_SERVER['DOCUMENT_ROOT'].'/apps/models/large/'.$rowFiles['fileName']) ){ $homeImage = ''; break; } else { $homeImage .= ' '; } } } // Figure out what to display as the price, super cool fun time! if ( $row['modelStatus'] == 3 ){ // SOLD $priceListing = 'SOLD'; } else { $priceListing = ( ( $row['plotPrice'] != '' ) ? '$'. number_format(preg_replace('/[^-0-9|.]/i', '', $row['plotPrice']),2) : ' N/A ' ); } // lets try to get some output $outputTable .= '
' . '
'.$homeImage.'
' . '
PRICE'.$priceListing.'
' . '
STYLE'.$row['modelStyle'].'
' . '
SUBDIVISION'.$row['subName'].'
' . '
LOT'.$row['modelLot'].'
' . '
City'.$row['modelCity'].'
' . '
SQFT'.$row['modelSQFT'].'
' . '
BR'.$row['modelBeds'].'
' . '
BA'.$row['modelBath'].'
' . '
GAR'.$row['modelGarage'].'
' . '
'; } } else { $outputTable = 'No Results Available'; } print $outputTable; exit; } else { $outputTable = '
Please search our listings!
'; }// END OF MAJOR IF... Suggesting we make them search first so the load doesn't kill the page. ?> Model Homes For Sale | Home Builders Rochester MN

Model Homes For Sale

0 && isset($_GET['plotID']) && (int)$_GET['plotID'] > 0 ) ){ ?>
'; echo '
'; if ( isset($viewHome) && trim($viewHome) != '' ) { echo $viewHome; } elseif ( isset($outputTable) && trim($outputTable) != '' ){ echo $outputTable; } else { echo 'No Results Available'; } echo '
'; ?>


In today’s day and age, everything is visual – we invite you to look, see, touch and feel the difference in the homes we build at Bigelow Homes. Our model homes are designed to showcase the latest trends and features, and to showcase the benefits of the design, layout, and options available to you, our homebuyer.

We invite you to browse through each home online to help filter what you desire most in your next home. Next, explore all of the Bigelow homes for sale in Southeastern Minnesota in person by contacting any member of our team to set up a time convenient for you. Start your new home search today!