Пример #1
0
     break;
 case 'hierarchy':
     $gm_module = Module::getModuleByName('googlemap');
     // Find this place and its ID
     $place = new Place(implode(', ', array_reverse($parent)), $WT_TREE);
     $place_id = $place->getPlaceId();
     $child_places = $place->getChildPlaces();
     $numfound = count($child_places);
     //-- if the number of places found is 0 then automatically redirect to search page
     if ($numfound == 0) {
         $action = 'show';
     }
     echo '<h2>', $controller->getPageTitle();
     // Breadcrumbs
     if ($place_id) {
         $parent_place = $place->getParentPlace();
         while ($parent_place->getPlaceId()) {
             echo ', <a href="', $parent_place->getURL(), '" dir="auto">', $parent_place->getPlaceName(), '</a>';
             $parent_place = $parent_place->getParentPlace();
         }
         echo ', <a href="', WT_SCRIPT_NAME, '">', I18N::translate('Top level'), '</a>';
     }
     echo '</h2>';
     if ($gm_module && $gm_module->getSetting('GM_PLACE_HIERARCHY')) {
         $linklevels = '';
         $placelevels = '';
         $place_names = array();
         for ($j = 0; $j < $level; $j++) {
             $linklevels .= '&amp;parent[' . $j . ']=' . rawurlencode($parent[$j]);
             if ($parent[$j] == '') {
                 $placelevels = ', ' . I18N::translate('unknown') . $placelevels;