function rex_linkmap_tree($tree, $category_id, $children, $GlobalParams) { $ul = ''; if (is_array($children)) { $li = ''; $ulclasses = ''; if (count($children) == 1) { $ulclasses .= 'rex-children-one '; } foreach ($children as $cat) { $cat_children = $cat->getChildren(); $cat_id = $cat->getId(); $liclasses = ''; $linkclasses = ''; $sub_li = ''; if (count($cat_children) > 0) { $liclasses .= 'rex-children '; $linkclasses .= 'rex-lmp-is-not-empty '; } if (next($children) == null) { $liclasses .= 'rex-children-last '; } $linkclasses .= $cat->isOnline() ? 'rex-online ' : 'rex-offline '; if (is_array($tree) && in_array($cat_id, $tree)) { $sub_li = rex_linkmap_tree($tree, $cat_id, $cat_children, $GlobalParams); $liclasses .= 'rex-active '; $linkclasses .= 'rex-active '; } if ($liclasses != '') { $liclasses = ' class="' . rtrim($liclasses) . '"'; } if ($linkclasses != '') { $linkclasses = ' class="' . rtrim($linkclasses) . '"'; } $label = rex_linkmap_format_label($cat); $li .= ' <li' . $liclasses . '>'; $li .= '<a' . $linkclasses . ' href="' . rex_linkmap_url(array('category_id' => $cat_id), $GlobalParams) . '">' . htmlspecialchars($label) . '</a>'; //$li .= ' '. $liclasses . $linkclasses; $li .= $sub_li; $li .= '</li>' . "\n"; } if ($ulclasses != '') { $ulclasses = ' class="' . rtrim($ulclasses) . '"'; } if ($li != '') { $ul = '<ul>' . "\n" . $li . '</ul>' . "\n"; } } return $ul; }
?> } </script> <?php $navi_path = '<ul id="rex-navi-path">'; $isRoot = $category_id === 0; $category = OOCategory::getCategoryById($category_id); $link = rex_linkmap_url(array('category_id' => 0), $GlobalParams); $navi_path .= '<li>' . $I18N->msg('path') . ' </li>'; $navi_path .= '<li>: <a href="' . $link . '">Homepage</a> </li>'; $tree = array(); if ($category) { foreach ($category->getParentTree() as $cat) { $tree[] = $cat->getId(); $link = rex_linkmap_url(array('category_id' => $cat->getId()), $GlobalParams); $navi_path .= '<li> : <a href="' . $link . '">' . htmlspecialchars($cat->getName()) . '</a></li>'; } } $navi_path .= '</ul>'; //rex_title($REX['SERVERNAME'], 'Linkmap'); rex_title('Linkmap', $navi_path); ?> <div id="rex-linkmap"> <div class="rex-area-col-2"> <div class="rex-area-col-a"> <h3 class="rex-hl2"><?php