array(), "level2" => array(), "level3" => array()); $data = idx_get_indexer()->getPages(); $cleanindexlist = array_merge( explode(',', tpl_getConf('cleanindexlist')), array('sidebar') ); foreach($data as $id){ if(isHiddenPage($id)) continue; if(auth_quickaclcheck($id) < AUTH_READ) continue; $path = ''; if(in_array($id, $cleanindexlist)) continue; foreach(explode(':', $id) as $lvl => $ns) { if(in_array($ns, $cleanindexlist)) continue; $pathpre = $path; $path .= ($lvl>0) ? ':' . $ns : $ns; $title = p_get_first_heading($path); $title = is_null($title) ? $ns : $title; if($lvl == 0 && !array_key_exists($path, $menu['level1'])) $menu['level1'][$path] = $title; if($lvl > 0) { if(is_array($menu['level'. ($lvl+1)][$pathpre])) { $menu['level'.($lvl+1)][$pathpre][$path] = $title; } else { $menu['level'.($lvl+1)][$pathpre] = array($path => $title); } } } } return $menu; } $menufile = tpl_getConf('menusite'); if(@file_exists(wikiFN($menufile)) && auth_quickaclcheck($menufile) >= AUTH_READ) { $content = utf8_encode(io_readWikiPage(wikiFN($menufile), $menufile)); preg_match('/(.*?)<\/MENU>/s', $content, $menu); $menu = ((count($menu) > 0)) ? json_decode($menu[1], true) : $defaultmenu; if(is_null($menu)) $menu = $defaultmenu; } return $menu; } //render drop-down html menu from menu-array function dropdown_menu() { global $ID; $menu = get_menu(); echo ''; } //render breadcrump-like bar from menu-array function trace() { global $ID, $conf; $trace = explode(':', $ID); $num = count($trace); if($num == 1 && $trace[0] == $conf['start']) return ; $menu = get_menu(); echo '
', tpl_getConf("institute_".$conf['lang']), '
'; $path = ''; foreach($trace as $n => $ns) { $path .= ($n>0) ? ':' . $ns : $ns; $title = p_get_first_heading($path); $title = is_null($title) ? $ns : $title; if($n == $num-1) { echo '
'; } else { echo '
'; } echo '', ucfirst($title) ,''; if(array_key_exists($path, $menu['level'.($n+2)])){ echo '
    '; foreach($menu['level'.($n+2)][$path] as $u => $t){ echo '
  • ', ucfirst($t) ,'
  • '; } echo '
'; } echo '
'; } } ?>