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('/
'; } //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 '