'; foreach($tree as $node) { if ( $Itemid == $node->id ) $out .= '
  • '; else $out .= '
  • '; $link = $node->link; switch( @$node->type ) { case 'separator': break; case 'url': if ( eregi( "index.php\?", $link ) ) { if ( strpos( 'Itemid=', $link ) === FALSE ) { $link .= '&Itemid='.$node->id; } } break; default: $link .= '&Itemid='.$node->id; break; } if( strcasecmp( substr( $link, 0, 5), 'http:' ) ) $link = sefRelToAbs($link); // apply SEF transformation if( !isset($node->browserNav) ) $node->browserNav = 0; switch( $node->browserNav ) { case 1: // open url in new window $ext_image = ''; if( $exlink[0] ){ $ext_image = ' ' . _JOOMAP_SHOW_AS_EXTERN_ALT . ''; } $out .= ''. $node->name . $ext_image .''; break; case 2: // open url in javascript popup window $ext_image = ''; if( $exlink[0] ) { $ext_image = ' ' . _JOOMAP_SHOW_AS_EXTERN_ALT . ''; } $out .= '". $node->name . $ext_image.""; break; case 3: // no link $out .= ''. $node->name .''; break; default: // open url in parent window $out .= ''. $node->name .''; break; } if( isset($node->tree) ) { $out .= JoomapHtml::getHtmlList( $node->tree, $exlink, $level + 1 ); } $out .= '
  • ' . "\n"; } $out .= '' . "\n"; return $out; } /** Print component heading, etc. Then call getHtmlList() to print list */ function printTree( &$joomap, &$root ) { global $database, $Itemid; $config = &$joomap->config; $menu = new mosMenu( $database ); $menu->load( $Itemid ); // Load params for the Joomap menu-item $title = $menu->name; $exlink[0] = $config->exlinks; // image to mark popup links $exlink[1] = $config->ext_image; if( $config->columns > 1 ) { // calculate column widths $total = count($root); $columns = $total < $config->columns ? $total : $config->columns; $width = (100 / $columns) - 1; } echo '
    '; echo '

    '. $title .'

    '; echo '
    columns > 1 ? ' style="float:left;width:100%;"' : '') .'>'; if( $config->show_menutitle || $config->columns > 1 ) { // each menu gets a separate list foreach( $root as $menu ) { if( $config->columns > 1 ) // use columns echo '
    '; if( $config->show_menutitle ) // show menu titles echo ''; echo JoomapHtml::getHtmlList( $menu->tree, $exlink ); if( $config->columns > 1 ) echo "
    \n"; } if( $config->columns > 1 ) echo '
    '; } else { // don't show menu titles, all items in one big tree $tmp = array(); foreach( $root as $menu ) { // concatenate all menu-trees foreach( $menu->tree as $node ) { $tmp[] = $node; } } echo JoomapHtml::getHtmlList( $tmp, $exlink ); } //BEGIN: Advertisement if( $config->includelink ) { $keywords = array('Webdesign', 'Software Anpassung', 'Software Entwicklung', 'Programmierung'); $location = array('Iserlohn', 'Hagen', 'Dortmund', 'Ruhrgebiet', 'NRW'); $advert = $keywords[mt_rand() % count($keywords)].' '.$location[mt_rand() % count($location)]; echo "$advert"; } //END: Advertisement echo "
    "; echo "
    \n"; } }; ?>