branded = true; $styleOverride->branded = true; } define("serverRoot", "http://" . $_SERVER["SERVER_NAME"]); /** * Check to see if the page is to be embedded. */ $isEmbedded = false; if (isset($_GET['embed']) && $_GET['embed'] == 1) $isEmbedded = true; //Delete Favorites if (isset($_GET["deleteFavorites"])) { $favorites = $_SESSION["favorites"]; foreach ($favorites as $listingid) unset($favorites[$listingid]); $_SESSION["favorites"] = $favorites; } //Set Favorites $favorites = array(); if (isset($_SESSION["favorites"]) && ($_SESSION["favorites"])) foreach ($_SESSION["favorites"] as $listingid) $favorites[] = new Listing($listingid); //init variable we'll need $htmlOut = new HTMLOutput(); $displayListings2 = new DisplayListings(); $agent = new Agent($_GET["AgentID"], $createNew = false); if ($agent->getField(agentTableCoAgentID)) header("Location: ?AgentID=" . $agent->getField(agentTableCoAgentID) . (isset($_GET["branded"]) ? "&branded=1" : "")); $agent->setBranded($_GET); if (!$agent->exists()) die("Invalid AgentID!"); $company = new Company($agent->getField(agentTableCompanyID), $createNew=false); $stats = new AWStats(); $miscQuery = new MiscQuery(); // Get Custom Title and Meta Data - if no data in these fields, we use the default data $agenttitletagdata = $agent->getField(TitleTag); $agentmetadescription = $agent->getField(MetaDescription); $agentmetakeywords = $agent->getField(MetaKeywords); $pickListings = $_GET["pickListings"]; if (!$pickListings) $pickListings = 0; //save selected featured listings if (isset($_POST["showStripped1"]) || isset($_POST["showStripped2"])) { if (isset($_POST["showStripped1"])) $agent->saveFeaturedListings(false, explode(",",$_COOKIE["listings"]), $_POST["order"], $_POST[agentTableNormalFeaturedListingsOptions]); else $agent->saveFeaturedListings(true, explode(",",$_COOKIE["listings"]), $_POST["order"], $_POST[agentTableStrippedFeaturedListingsOptions]); header("Location: AgentInfo.php?AgentID=" . $agent->getAgentID() . "&branded=1"); } //save featured, but with search criteria if (isset($_POST["saveSearch1"]) || isset($_POST["saveSearch2"])) { if (isset($_POST["saveSearch1"])) $agent->saveFeaturedSearch(false, $_POST["searchCriteria"], $_POST["order"], $_POST[agentTableNormalFeaturedListingsOptions]); else $agent->saveFeaturedSearch(true, $_POST["searchCriteria"], $_POST["order"], $_POST[agentTableStrippedFeaturedListingsOptions]); } if ( ($PTID = $agent->getField(agentTablePTID)) == 0) $PTID = 1939; //load featured listings /*if (isset($_GET["stripped"]) || $_GET["pickListings"] == 3) if (strlen($agent->getField(agentTableFeaturedSearch2)) > 2) $featuredListings = searchResults(array_combine(searchCriteriaKeys(),explode(",",$agent->getField(agentTableFeaturedSearch2)) ), $agent->getField(agentTableFeaturedOrder2), $agent); else $featuredListings = $agent->listings(featuredListings2); else */ if (strlen($agent->getField(agentTableFeaturedSearch1)) > 2) $featuredListings = searchResults(array_combine(searchCriteriaKeys(),$agent->getSavedSearchCriteria() ), $agent->getField(agentTableFeaturedOrder1), $agent); else $featuredListings = $agent->listings(featuredListings1); function removeOrder($string) { if (strpos($string, "Order") !== 0) return false; $index = strpos($string, ","); return substr($string, $index+1); } function printButton($id, $src, $array, $url, $height=106, $button) { $src = $src . '?treeColor=' . $array[0] . '&towerColor=' . $array[1] . '&borderColor=' . $array[2] . '&bgoutColor=' . $array[3] . '&bginColor=' . $array[4] . '&boxColor=' . $array[5] . '&textColor2=' . $array[6] . '&textColor1=' . $array[7] . '&action=' . $url; switch($button) { case agentinfo: $return = '
'; break; case sbliving: $return = '
'; break; case sbinfo: $return = '
'; break; case renewsandinfo: $return = '
'; break; case searchmls: $return = '
'; break; case spt: $return = '
'; break; case iframe-sbliving: $return = ''; break; } $return .= ""; return $return; } function openWindow($type,$url, $name, $width="''", $height="''",$other="'toolbar=yes,scrollbars=yes,sizable=yes'") { if ($type == 0) //normal link return $url; else return "javascript:openWindow('" . $url ."','" . $name . "'," . $width . "," . $height . "," . $other . ")"; } //load saved featured listings to pick from if (isset($_GET["updateFeatured"])) { if ($_GET["updateFeatured"] == 1) $listingsString = removeOrder($agent->getField(agentTableNormalFeaturedListings)); else $listingsString = removeOrder($agent->getField(agentTableStrippedFeaturedListings)); header("Location: /preview/AgentInfo.php?AgentID=" . $agent->getAgentID() . "&selectAll=1&branded=1&listings=1&pickListings=" . $pickListings . "&displayListings=" . $listingsString); } //$profile = new AgentProfile($agent->getAgentID()); //$profile = strlen($agent->getField(agentTableColorSettings)); //temporary if (isset($_GET["search"])) $searchListings = searchResults($_POST, 1,$agent); $activeListings = $agent->listings(activeListings); $soldListings = $agent->listings(soldListings); $activeAndSoldListings = $agent->listings(activeAndSoldListings); /* load special listings - special listings were initially created for agents that are using our IDX for active listings but also want to show listings that are not in the MLS e.g., pocket listings, preMLS marketing of listings, etc. */ $specialListings = $agent->listings(specialListings); $specialListingsTitle = $agent->getField(agentTableSpecialListingsTitle); //var_dump($specialListings); $numListings = 0; if (isset($_GET["displayListings"]) && !isset($_GET["search"])) { $order = 0; if (isset($_GET["pickListings"]) && $_GET["pickListings"] == 2) $order = $agent->getField(agentTableFeaturedOrder1); if (isset($_GET["pickListings"]) && $_GET["pickListings"] == 3) $order = $agent->getField(agentTableFeaturedOrder2); $displayListings = $agent->listings(customListings,$order,$_GET["displayListings"]); } else if (isset($_GET["pickListings"])) { if (isset($_GET["search"])) $displayListings = $searchListings; else $displayListings = $featuredListings; } //this is instead of the old printurl function $queryString = ""; if ($agent->branded()) $queryString .= "branded=1&"; $queryString .= "AgentID=" . $agent->getAgentID(); if (isset($_GET["pickListings"])) $queryString .= "&pickListings=" . $_GET["pickListings"]; if (isset($_GET["displayListings"])) $queryString .= "&displayListings=" . $_GET["displayListings"]; if (isset($_GET["stripped"])) $queryString .= "&stripped=" . $_GET["stripped"]; // Set Flash Agent Buttons to use styleID colors if (isset($_GET['styleID']) && $styleOverride->exists()) $buttonSettings = $styleOverride->getButtonColors(); else $buttonSettings = $agent->getButtonColors(); $cssAgent = new Agent($agent->cssAgentID()); if (!$cssAgent->unbrandedColors()) $cssAgent->setBranded($_GET); // Set Flash Properties For Sale/Rental Properties to use styleID colors if ($agent->branded() && $agent->enhanced() && !isset($_GET['styleID'])) { $colorSetting = $agent->getProfileColors(); } elseif (isset($_GET['styleID']) && $styleOverride->exists()) { $colorSetting = $styleOverride->getProfileColors(); } else { $colorSetting = $cssAgent->getProfileColors(); } $tabFontColor = $colorSetting[4]; $tabBGColor = $colorSetting[3]; $rentaltabcolor = $colorSetting[15]; if ($agent->getField(agentTableArea) == "SYV") $mls = "Santa Ynez"; ?> <?php print $agenttitletagdata; ?> Santa Barbara Realtor Agent <?php print $agent->getFullName(); ?><?php if ($agent->branded()) print " (Branded)"; ?> "); }else{ print("getField(agentTableCity) . " " . $company->getField(companyTableName) . " realtor " . $agent->getFullName() . " at " . $agent->displayMobile() . " or " . $agent->getField(agentTableEmail) . " to view real estate in " . $agent->getField(agentTableCity) . " California\">"); } if ($agentmetakeywords) { print(""); }else{ print("getField(agentTableAddress1) . ", " . $agent->getField(agentTableCity) . ", " . $agent->getField(agentTableZip) . ", " . $agent->getFullName() . ", " . $agent->getField(agentTableCity) . " real estate, " . $agent->getField(agentTableCity) . " homes for sale, " .$company->getField(companyTableName) . " realtor, " . $agent->getField(agentTableCity) . " houses for sale, " . $agent->getField(agentTableCity) . " estates\">"); } ?> branded() && $agent->enhanced() && !isset($_GET['styleID'])) print(""); elseif (isset($_GET['styleID']) && $styleOverride->exists()) print(""); else print(""); ?> incrementMain($agent); $stats->increment(); //must be in body to get browser info - dump generated awstat javascript code here ?>
branded(), $_GET["stripped"]); } else { // put in banner of style agent echo printBanner($styleOverride, $agent->branded(), $_GET["stripped"]); }?>
getField(agentTableUseNameDisplay)!=1)) { // dont display agent name } else { ?>

displayFullName(); ?>

enhanced() && $agent->branded()) { ?> getField(agentTableCustomChoice) > 0) $def = $agent->getField(agentTableCustomChoice); $biography = substr($agent->getField(agentTableBiography), 0, 25000); $biographyLength = strlen($biography); $testimonials = substr($agent->getField(agentTableCustomText1), 0, 25000); $testimonialsLength = strlen($testimonials); $announcements = substr($agent->getField(agentTableCustomText2),0,25000); $announcementsLength = strlen($announcements); if (strlen($agent->getField(agentTableBiography)) > 0) { ?> getIDXButtons(); if (count($buttons) && $agent->branded() && $agent->enhanced() && $agent->getField('displayCustomLinks') == 1) { ?> enhanced() && $agent->displaySearch()) { ?> '">
See below for previously selected PhotoTours
getField(agentTableFlatImage) == 1) { ?> getField(agentTableMobile) != '' && $agent->getField(agentTableMobilePrivate) != 1) print " " . $agent->displayMobile() . "
"; ?> getField(agentTableTelephone) != '' && $agent->getField(agentTableTelephonePrivate) != 1) print "" . " " . $agent->displayTelephone() . "
"; ?>  getField(agentTableEmail); ?> getField(agentTableURL) != '') print "
 " . $agent->getField(agentTableURL) . ""; if ($agent->getField(agentTableDRE_Number) != '') print "
DRE License # " . $agent->getField(agentTableDRE_Number) . ""; ?>
getField(agentTableCompanyID) == 71) || ($agent->getField(agentTableCompanyID) == 70) ||($agent->getField(agentTableCompanyID) == 6) ||($agent->getField(agentTableCompanyID) == 81)) { print ""; }else { print "getField(agentTableCompanyName)) print $companyName; else print $company->getName(); print "
" . $agent->getFullAddress() . "
"; print $agent->getField(agentTableCity) . ", " . $agent->getField(agentTableState) . " " . $agent->getField(agentTableZip) . "]\">getField(agentTableCompanyID) . "_small.gif\" width=\"150\" height=\"68\" />
"; }?>
showButton(0)) { ?> showButton(1)) { $scenicPTDisplayType = "ShowTourDiv"; if($agent->getField("scenicPTLaunchType")) $scenicPTDisplayType = "ShowTourWindow"; ?> showButton(5)) { ?> showButton(2)) { ?> getField(agentTableIDX) != '' && ($agent->showButton(3))) { ?> getField("IDX2")) { ?> " . printButton("SMLSButton",$buttonSettings["smls"], $buttonSettings, 'javascript:openWindowMLS()', $buttonSettings["height"], "searchmls") . ""; ?> enhanced() && $agent->displaySearch() && $agent->showButton(6)) { ?>
getField(IDXbuttonMaskTitle);?>
getAgentID(); else print "/agents/main.php"; ?>'">
"; } else if ($pickListings == 2) { print("
"); print "Step 3: Search / Select Featured PhotoTours
"; } else if ($pickListings == 3) { print ("
"); print "Step 3: Search / Select Featured PhotoTours
"; } if ($pickListings) { ?>
getAgentID(); ?>); " method="POST">
branded() && isset($_SESSION["favorites"]) && count($_SESSION["favorites"]) > 0) { $displayListings2->displayFormattedListings($agent, $favorites, "My Favorites"); ?> "); } if (isset($_GET["search"])) { if (isset($_GET["company"])) // 'Request.QueryString("company") will be set if they did a 'saved search' $displayListings2->displayFormattedListings($agent, $searchListings, "Featured PhotoTours", false, $pickListings); else { if (count($searchListings) == 0) print ""; if ($pickListings) $numListings = $displayListings2->displayFormattedListings($agent, $searchListings, "Add PhotoTours to Featured PhotoTours", false, $pickListings); else $displayListings2->displayFormattedListings($agent, $searchListings, "Search Results", false, $pickListings); } } else if ($pickListings) $numListings = $displayListings2->displayFormattedListings($agent, $displayListings, "Featured PhotoTours", false, $pickListings); else { if (isset($_GET["displayListings"])) { $displayListings2->displayFormattedListings($agent, $displayListings, "Featured PhotoTours", false, $pickListings); $displayListings2->displayFormattedListings($agent, $activeAndSoldListings, "Active & Sold Listings",false, false); } //else if ($agent->enhanced() && $_GET["branded"]) // 'only enhanced have these display options else if ($agent->enhanced()) // 'only enhanced have these display options { if (isset($_GET["display"])) { $displayListingsOptions = $_GET["display"]; } else { $displayListingsOptions = $agent->getField(agentTableNormalFeaturedListingsOptions); if (isset($_GET["stripped"])) $displayListingsOptions = $agent->getField(agentTableStrippedFeaturedListingsOptions); } switch($displayListingsOptions) { case 0: $displayListings2->displayFormattedListings($agent,$activeListings,$agent->getField(agentTableActiveListingsTitle), false,false,true); $displayListings2->displayFormattedListings($agent,$soldListings, "Select Properties Sold By " . $agent->displayFullName(), false, false); if (count($featuredListings)>0) $displayListings2->displayFormattedListings($agent,$featuredListings, "Featured PhotoTours", true, false); break; case 9: $displayListings2->displayFormattedListings($agent,$activeListings,$agent->getField(agentTableActiveListingsTitle), false,false,true); $displayListings2->displayFormattedListings($agent,$soldListings, "Select Properties Sold By " . $agent->displayFullName(), false, false); if (count($featuredListings)>0) $displayListings2->displayFormattedListings($agent,$featuredListings, "Featured PhotoTours", true, false); break; case 1: $displayListings2->displayFormattedListings($agent,$activeListings,$agent->getField(agentTableActiveListingsTitle), false,false,true); $displayListings2->displayFormattedListings($agent,$specialListings, $specialListingsTitle, false,false); if (count($featuredListings)>0) $displayListings2->displayFormattedListings($agent,$featuredListings, "Featured PhotoTours", true, false); $displayListings2->displayFormattedListings($agent,$soldListings, "Select Properties Sold By " . $agent->displayFullName(), false, false); break; case 2: if (count($featuredListings)>0) $displayListings2->displayFormattedListings($agent,$featuredListings, "Featured PhotoTours", true, false); $displayListings2->displayFormattedListings($agent,$activeListings,$agent->getField(agentTableActiveListingsTitle), false, false,true); $displayListings2->displayFormattedListings($agent,$soldListings, "Select Properties Sold By " . $agent->displayFullName(), false, false); break; case 3: if (count($featuredListings)>0) $displayListings2->displayFormattedListings($agent,$featuredListings, "Featured PhotoTours", true, false); $displayListings2->displayFormattedListings($agent,$activeAndSoldListings, "Active Listings and Sold Properties", false,false); break; case 4: $displayListings2->displayFormattedListings($agent,$activeAndSoldListings, "Active Listings and Sold Properties", false,false); if (count($featuredListings)>0) $displayListings2->displayFormattedListings($agent,$featuredListings, "Featured PhotoTours", true, false); break; case 5: if (count($featuredListings)>0) $displayListings2->displayFormattedListings($agent,$featuredListings, "Featured PhotoTours", true, false); break; case 6: $displayListings2->displayFormattedListings($agent,$activeListings,$agent->getField(agentTableActiveListingsTitle), false,false,true); if (count($featuredListings)>0) $displayListings2->displayFormattedListings($agent,$featuredListings, "Featured PhotoTours", true, false); break; case 7: if (count($featuredListings)>0) $displayListings2->displayFormattedListings($agent,$featuredListings, "Featured PhotoTours", true, false); $displayListings2->displayFormattedListings($agent,$activeListings,$agent->getField(agentTableActiveListingsTitle), false,false,true); break; case 8: $displayListings2->displayFormattedListings($agent,$activeListings,$agent->getField(agentTableActiveListingsTitle), false,false,true); $displayListings2->displayFormattedListings($agent,$soldListings, "Select Properties Sold By " . $agent->displayFullName(), false, false); break; case 10: $displayListings2->displayFormattedListings($agent,$soldListings, "Select Properties Sold By " . $agent->displayFullName(), false, false); break; default: $displayListings2->displayFormattedListings($agent,$activeListings,$agent->getField(agentTableActiveListingsTitle), false,false,true); if (count($featuredListings)>0) $displayListings2->displayFormattedListings($agent,$featuredListings, "Featured PhotoTours", true, false); $displayListings2->displayFormattedListings($agent,$soldListings, "Select Properties Sold By " . $agent->displayFullName(), false, false); break; } } else $displayListings2->displayFormattedListings($agent,$activeAndSoldListings, "Active & Sold Listings",false, false); // 'non-enhanced only have this option } ?>
','EmailWindow','toolbar=no,width=547,height=600')">
"); if ($pickListings == 1) print("
Step 2: Select some PhotoTours
"); print(""); print(""); print(""); print("
No listings match your search criteria.

Please try again.

Step 4: Choose option for selected listings

getField(agentTableFeaturedOrder1);?> Step 4: Select Layout getField(agentTableFeaturedOrder2); ?> Step 4: Save Featured PhotoTours to your Search Page:

Descendingradio("order", 1, $order); ?>Ascendingradio("order", 2,$order); ?>
getField(agentTableNormalFeaturedListingsOptions); } else if ($pickListings == 3) { $displayListingsOptionsName = agentTableStrippedFeaturedListingsOptions; $displayListingsOptionsValue = $agent->getField(agentTableStrippedFeaturedListingsOptions); } ?>
Order Shown URL Default
Active / Featured / Sold &display=1" /> radio($displayListingsOptionsName, 1, $displayListingsOptionsValue); ?>
Featured / Active and Sold &display=3" /> radio($displayListingsOptionsName, 3, $displayListingsOptionsValue); ?>
Featured / Active / Sold &display=2" /> radio($displayListingsOptionsName, 2, $displayListingsOptionsValue); ?>
Active / Sold / Featured &display=9" /> radio($displayListingsOptionsName, 9, $displayListingsOptionsValue); ?>
Active and Sold / Featured &display=4" /> radio($displayListingsOptionsName, 4, $displayListingsOptionsValue); ?>
Featured Only &display=5" /> radio($displayListingsOptionsName, 5, $displayListingsOptionsValue); ?>
Active / Featured &display=6" /> radio($displayListingsOptionsName, 6, $displayListingsOptionsValue); ?>
Featured / Active &display=7" /> radio($displayListingsOptionsName, 7, $displayListingsOptionsValue); ?>
Active / Sold &display=8" /> radio($displayListingsOptionsName, 8, $displayListingsOptionsValue); ?>
Sold &display=10" /> radio($displayListingsOptionsName, 10, $displayListingsOptionsValue); ?>
Step 5: Save Featured PhotoTours
"> Step 5: Save Featured PhotoTours
">
branded()); ?> getFullName(); ?>