findWhere("inUse = '1'", "displayPriority"); $propertyTypes = array(); if($propertyTypesVOList) { foreach($propertyTypesVOList as $pvo) { $idPropertyTypes = $pvo->getPK(); // add a new element to the array $propertyTypes[$idPropertyTypes] = $pvo->getName(); } } // create a new location factory instance $lf = new LocationFactory(); // load the lookup tables for reverse lookups on the URL $lf->loadCountries(); $lf->loadRegions(); $lf->loadDestinations(); $idCountries = 0; $idRegions = 0; $idDestinations = 0; // search for the first 3 properties in our current location $search_config = array( 'approved' => 1, 'visible' => 1, 'approved_photo_status' => 1, 'debug' => 0, 'get_content' => 1, 'get_photos' => 1, 'explain' => 0, 'properties_field_list' => array('idProperties','idPropertyTypes','idCountries','idRegions','idDestinations','urlName','locationURL','numBeds','numSleeps') ); $propertiesSearchEngine = new PropertiesSearchEngine($search_config); if(strlen($_GET['destinationsString']) > 0) { list($idCountries, $idRegions, $idDestinations) = $lf->reverseLookup($_GET['countriesString'], $_GET['regionsString'], $_GET['destinationsString']); if(($idCountries >0) && ($idRegions >0) && ($idDestinations >0)) { $params = array( 'idCountries' => $idCountries, 'idRegions' => $idRegions, 'idDestinations' => $idDestinations, 'idPropertiesList'=> null, 'orderByList' => null, 'orderByDirection'=> 'ASC', 'offset' => 0, 'limit' => 0 ); $propertiesSearchEngine->setSearchCriteria($params); $property_list = $propertiesSearchEngine->doSearch(); $page_h1 = $lf->countryRegionDestinationAsString($idCountries, $idRegions, $idDestinations); // get the destinations level featured properties $params = array( 'idCountries' => $idCountries, 'idRegions' => $idRegions, 'idDestinations' => $idDestinations, 'idPropertiesList'=> null, 'orderByList' => null, 'orderByDirection'=> 'ASC', 'featured_only' => 1, 'feature_level' => 'D', // H, C, R, D 'offset' => 0, 'limit' => $DEFAULT_FEATURED_PROPERTIES_PER_PAGE_LIMIT ); $propertiesSearchEngine->setSearchCriteria($params); $featured_property_list = $propertiesSearchEngine->doSearch(); } else { header("Location: page_not_found.php"); exit; } } else if(strlen($_GET['regionsString']) > 0) { list($idCountries, $idRegions, $idDestinations) = $lf->reverseLookup($_GET['countriesString'], $_GET['regionsString']); //echo "idCountries: " . $idCountries; //echo "idRegions: " . $idRegions; if(($idCountries > 0) && ($idRegions > 0)) { $params = array( 'idCountries' => $idCountries, 'idRegions' => $idRegions, 'idDestinations' => 0, 'idPropertiesList'=> null, 'orderByList' => null, 'orderByDirection'=> 'ASC', 'offset' => 0, 'limit' => 0 ); $propertiesSearchEngine->setSearchCriteria($params); $property_list = $propertiesSearchEngine->doSearch(); $page_h1 = $lf->countryRegionDestinationAsString($idCountries, $idRegions, $idDestinations); // get the regions level featured properties $params = array( 'idCountries' => $idCountries, 'idRegions' => $idRegions, 'idDestinations' => 0, 'idPropertiesList'=> null, 'orderByList' => null, 'orderByDirection'=> 'ASC', 'featured_only' => 1, 'feature_level' => 'R', // H, C, R, D 'offset' => 0, 'limit' => $DEFAULT_FEATURED_PROPERTIES_PER_PAGE_LIMIT ); $propertiesSearchEngine->setSearchCriteria($params); $featured_property_list = $propertiesSearchEngine->doSearch(); } else { header("Location: page_not_found.php"); exit; } } else if(strlen($_GET['countriesString']) > 0) { list($idCountries, $idRegions, $idDestinations) = $lf->reverseLookup($_GET['countriesString']); //echo "idCountries: " . $idCountries; if($idCountries > 0) { $params = array( 'idCountries' => $idCountries, 'idRegions' => 0, 'idDestinations' => 0, 'idPropertiesList'=> null, 'orderByList' => null, 'orderByDirection'=> 'ASC', 'offset' => 0, 'limit' => 20 ); $propertiesSearchEngine->setSearchCriteria($params); $property_list = $propertiesSearchEngine->doSearch(); $page_h1 = $lf->countryRegionDestinationAsString($idCountries, $idRegions, $idDestinations); // get the countrie level featured properties $params = array( 'idCountries' => $idCountries, 'idRegions' => 0, 'idDestinations' => 0, 'idPropertiesList'=> null, 'orderByList' => null, 'orderByDirection'=> 'ASC', 'featured_only' => 1, 'feature_level' => 'C', // H, C, R, D 'offset' => 0, 'limit' => $DEFAULT_FEATURED_PROPERTIES_PER_PAGE_LIMIT ); $propertiesSearchEngine->setSearchCriteria($params); $featured_property_list = $propertiesSearchEngine->doSearch(); } else { header("Location: page_not_found.php"); exit; } } $CSS_PAGES .= "\n"; include_once "header_open.php"; ?>

Holiday properties in

0) && ($idRegions > 0) && ($idDestinations == 0)) { $c_lookup = $lf->countriesLookupArray(); $r_lookup = $lf->regionsLookupArray(); $d_lookup = $lf->destinationsLookupArray(); list($c_details, $regions) = $c_lookup[$idCountries]; list($c_name, $c_prefix, $c_postfix, $c_total) = $c_details; list($r_details, $destinations) = $r_lookup[$idRegions]; list($r_name, $r_prefix, $r_postfix, $r_total) = $r_details; ?>

Destinations within the region of

()

0) && ($idRegions == 0)) { $c_lookup = $lf->countriesLookupArray(); $r_lookup = $lf->regionsLookupArray(); $d_lookup = $lf->destinationsLookupArray(); list($c_details, $regions) = $c_lookup[$idCountries]; list($c_name, $c_prefix, $c_postfix, $c_total) = $c_details; ?> Regions and destinations within */ ?>

Region

Destination

()

()

Featured properties

$property) { //var_dump($property); $photo_list = $property['photo_list']; if(sizeof($photo_list) > 0) { $idPhotos = key($photo_list); } else { $idPhotos = null; } ?>

Ref: 5 Bedrooms (Sleeps 8)

 <?=htmlentities($propertyTypes[$property['idPropertyTypes']])?> <?=$property['numBeds']?> Bedrooms (Sleeps <?=$property['numSleeps']?>)

Specific location:

Summary:

detail>

Valid XHTML 1.0 Strict