getMembers(); $q = "SELECT * FROM TREND_PROPDATA WHERE ("; foreach ($members as $member) { $trendId = $member->getMLSTrend(); if (isset($trendId) && strlen($trendId) > 0) { $q .= $i++ > 0 ? " OR " : ""; $q .= "ListAgentAgentID = '$trendId'"; $q .= " OR AltAgentAgentID = '$trendId'"; } } $q .= ")"; $r = mysql_query($q); if (!$q) { echo $q; $num_results = 0; } else { $num_results = mysql_num_rows($r); for ($i = 0; $i < $num_results; $i++) { $row = mysql_fetch_array($r); $prop = new PropMain(); $prop = $prop->load($row); $key = stripslashes($row["ListingKey"]); // get the media $mediaQuery = "SELECT * FROM TREND_PROPMEDIA WHERE PropObjectKey = '".$key."' AND PropItemNumber = 1"; $mediaResult = mysql_query($mediaQuery); if (!$mediaResult) { $mediaResults = 0; } else { $mediaResults = mysql_num_rows($mediaResult); } for ($j = 0; $j < $mediaResults; $j++) { $mediaRow = mysql_fetch_array($mediaResult); $prop->addMedia($mediaRow); } $props[$propCount++] = $prop; } } // load photos if (isset($props) && count($props) > 0) { foreach ($props as $prop) { $propPhotos = $prop->getPhotos(); if ($propPhotos && count($propPhotos) > 0) { $photo = $propPhotos[1]; if ($photo) { $photos[count($photos)] = $photo->getPhotoUrl(); } } } $randKeys = array_rand($photos, count($photos)); $quad = 0; $i = 0; foreach ($randKeys as $key) { $photoMap[$quad][count($photoMap[$quad])] = $photos[$key]; $quad = ++$quad == 4 ? 0 : $quad; } } ?> Welcome to the Curt Gasper Team website

Search Local Listings

MLS #
City
State
Zip
Price Range
to
Bathroom(s)
Bedroom(s)
0) { echo ""; } echo ""; } echo ""; } ?>
"; echo "
"; $photos = $photoMap[$i]; foreach ($photos as $photo) { echo ""; } echo "