Open Houses

Upcoming Dates:
* Sort open houses by clicking on column titles
There are no scheduled open houses.

"; } else { // see what the sort method is if (isset($sort) == false || $sort == "price") { usort($openHouses, "ohPriceSort"); } else if ($sort == "location") { usort($openHouses, "ohLocationSort"); } else if ($sort == "beds") { usort($openHouses, "ohBedSort"); } else if ($sort == "baths") { usort($openHouses, "ohBathSort"); } else if ($sort == "sqft") { usort($openHouses, "ohSqFtSort"); } $header = "\n". "\n". "\n". "\n". "\n". "\n". "\n". "\n". "\n". "\n". "\n". "\n". "\n"; if ($ohDisplayDate != 0) { $ohDateRaw = explode("-", $ohDisplayDate); $ohDateNice = mktime(0, 0, 0, $ohDateRaw[1], $ohDateRaw[2], $ohDateRaw[0]); echo "
".date("l, F jS", $ohDateNice). "
"; echo $header; } $i = 0; $ohDate = ""; foreach ($openHouses as $key => $oh) { if ($ohDisplayDate == 0 && $oh->getDate() != $ohDate) { if ($ohDate != "") { // we have set it to something else which means we have a table, close it echo "
 PriceLocationBedsBathsSqFt 

 

"; } $ohDate = $oh->getDate(); $ohDateRaw = explode("-", $ohDate); $ohDateNice = mktime(0, 0, 0, $ohDateRaw[1], $ohDateRaw[2], $ohDateRaw[0]); echo "
".date("l, F jS", $ohDateNice). "
"; echo $header; } $fromTime = formatTime(explode(":", $oh->getFrom())); $toTime = formatTime(explode(":", $oh->getTo())); $prop = $oh->getProp(); $bedrooms = $prop->getBedrooms(); if ($bedrooms && $bedrooms > 0) { $bedTxt = $bedrooms; } else { $bedTxt = "N/A"; } $fullBath = $prop->getFullBaths(); $halfBath = $prop->getPartialBaths(); if ((!$fullBath || $fullBath == 0 ) && (!$halfBath || $halfBath == 0)) { $bathTxt = "N/A"; } else { if ($fullBath && $fullBath > 0) { $bathTxt = $fullBath; } if ($halfBath && $halfBath > 0) { $bathTxt .= "½"; } } $photos = $prop->getPhotos(); $imgSrc = ""; $isPhoto = "N"; if ($photos && count($photos) > 0) { $photo = $photos[1]; if ($photo) { $isPhoto = "Y"; $imgSrc = $photo->getPhotoUrl(); } } if (!$imgSrc || strlen($imgSrc) == 0) { $imgSrc = "http://www.cbhearthside.com/art/nophoto_property.gif"; } $location = $prop->getCityPO(); $state = $prop->getState(); $sqft = $prop->getApproxSqft(); if (!$sqft || $sqft == 0) { $sqftTxt = "N/A"; } else { $sqftTxt = number_format($sqft); } $listNum = $prop->getListNum(); $remarks = $prop->getRemarks(); $listPrice = number_format($prop -> getListPrice()); $officeName = $prop->getListOffName(); $officeCode = $prop->getListOffCode(); $agentId = strtolower(trim($prop->getListAgentId())); $feed = $oh->getFeed(); if ($feed == "T") { $agent = $agentsTrend[$agentId]; } else if ($feed == "L") { $agent = $agentsLVAR[$agentId]; } else if ($feed == "G") { $agent = $agentsGSMLS[$agentId]; } if (isset($agent) && $agentId != "047538") { // check for a url name. if it exists, show the link, otherwise, just a name $urlName = $agent->getUrlName(); $agentName = " - "; if ($urlName && strlen($urlName) > 0) { $agentName .= "getUrlName())."\" onclick=\"window.open(this.href);return false;\">".htmlspecialchars($agent->getNameNice()).""; } else { $agentName .= htmlspecialchars($agent->getNameNice()); } } else { $agentName = ""; } $propLink = $docRoot."buy/openhouse/index.html?ohid=".$oh->getId()."&id=".$prop->getListNum()."&next=".$self; $options = ""; ?> getListNum() ."&keepThis=true&TB_iframe=true&height=345&width=435\" "; $options .= "title=\"Slideshow\" class=\"colorbox slideshow\">"; $options .= "\"Slideshow\""; $options .= ""; } // check for a virtual tour $virtualTourUrl = stripslashes(trim($prop->getVirtualTourUrl())); if ($virtualTourUrl && strlen($virtualTourUrl) > 0) { if (strpos($virtualTourUrl, "?") === false) { $virtualTourUrl .= "?"; } else { $virtualTourUrl .= "&"; } $options .= strlen($options) > 0 ? "
\n" : ""; $options .= ""; $options .= "\"VirtualTour\""; $options .= ""; } $street = $prop->getStreetStr(); $city = $prop->getCityPO(); $state = $prop->getState(); $zip = $prop->getZipCode(); $dirBuf = $street." ".$city.", ".$state." ".$zip; $dirLink = "http://www.google.com/maps?q=".urlencode($dirBuf); $options .= "
\n"; $options .= ""; $options .= "\"DrivinggetId()])) { $options .= strlen($options) > 0 ? "

\n" : ""; $options .= "
"; $options .= ""; $options .= ""; } if (strlen($options) > 0) { echo $options; } ?> $
Open getTimeStr() ?>
getStreetStr()))) ?>, , View Details

MLS# - Open getTimeStr() ?>

getStreetStr()))) ?>
,
MLS#

View Details

0) { echo "

".HtmlFormat($remarks)."

"; } ?> Listed by
getDate(); $date2 = $b->getDate(); if ($date1 != $date2) { return ($date1 < $date2) ? -1 : 1; } $price1 = $a->getProp()->getListPrice(); $price2 = $b->getProp()->getListPrice(); if ($price1 == $price2) { return 0; } return ($price1 > $price2) ? -1 : 1; } function ohLocationSort($a, $b) { $date1 = $a->getDate(); $date2 = $b->getDate(); if ($date1 != $date2) { return ($date1 < $date2) ? -1 : 1; } $l1 = $a->getProp()->getCityPO(); $l2 = $b->getProp()->getCityPO(); if ($l1 == $l2) { return 0; } return ($l1 < $l2) ? -1 : 1; } function ohBedSort($a, $b) { $date1 = $a->getDate(); $date2 = $b->getDate(); if ($date1 != $date2) { return ($date1 < $date2) ? -1 : 1; } $bed1 = $a->getProp()->getBedrooms(); $bed2 = $b->getProp()->getBedrooms(); if ($bed1 == $bed2) { return 0; } return ($bed1 > $bed2) ? -1 : 1; } function ohBathSort($a, $b) { $date1 = $a->getDate(); $date2 = $b->getDate(); if ($date1 != $date2) { return ($date1 < $date2) ? -1 : 1; } $fb1 = $a->getProp()->getFullBaths(); $hb1 = $a->getProp()->getHalfBaths(); if ($hb1 > 0) { $fb1 += .5; } $fb2 = $b->getProp()->getFullBaths(); $hb2 = $b->getProp()->getHalfBaths(); if ($hb2 > 0) { $fb2 += .5; } if ($fb1 == $fb2) { return 0; } return ($fb1 > $fb2) ? -1 : 1; } function ohSqFtSort($a, $b) { $date1 = $a->getDate(); $date2 = $b->getDate(); if ($date1 != $date2) { return ($date1 < $date2) ? -1 : 1; } $s1 = $a->getProp()->getApproxSqft(); $s2 = $b->getProp()->getApproxSqft(); if ($s1 == $s2) { return 0; } return ($s1 > $s2) ? -1 : 1; } ?>