" . getConfigVar ('enterprise'); $path = getPath ($pageno); foreach ($path as $no) { $title['params'] = array(); if (isset ($page[$no]['title'])) $title['name'] = $page[$no]['title']; elseif (isset ($page[$no]['title_handler'])) $title = $page[$no]['title_handler']($no); else $title['name'] = '[N/A]'; echo ": $param_value) echo "&${param_name}=${param_value}"; echo "'>" . $title['name'] . ""; } echo ""; // Search form. echo ""; echo "
Search:
"; echo ''; // This input will be the first, if we don't add ports or addresses. echo "
"; } function getTitle ($pageno, $tabno) { global $page; if (isset ($page[$pageno]['title'])) return $page[$pageno]['title']; elseif (isset ($page[$pageno]['title_handler'])) { $tmp = $page[$pageno]['title_handler']($pageno); return $tmp['name']; } else return getConfigVar ('enterprise'); } function showTabs ($pageno, $tabno) { global $tab, $root, $page, $remote_username, $trigger, $tabextraclass; if (!isset ($tab[$pageno]['default'])) return; echo "
\n"; } // This function returns pages, which are direct children of the requested // page and are accessible by the current user. function getDirectChildPages ($pageno) { global $page, $remote_username; $children = array(); foreach ($page as $cpageno => $cpage) if ( isset ($cpage['parent']) and $cpage['parent'] == $pageno and accessibleSubpage ($cpageno) == TRUE ) $children[$cpageno] = $cpage; return $children; } function getAllChildPages ($parent) { global $page; // Array pointer is global, so if we don't create local copies of // the global array, we can't advance any more after nested call // of getAllChildPages returns. $mypage = $page; $mykids = array(); foreach ($mypage as $ctitle => $cpage) if (isset ($cpage['parent']) and $cpage['parent'] == $parent) $mykids[] = array ('title' => $ctitle, 'kids' => getAllChildPages ($ctitle)); return $mykids; } ?>