t(''), 'menustring' => t('Start'), 'siteid' => 'start', 'visible' => true, 'filename' => 'index.php' ), array( 'title' => t('My profile'), 'menustring' => t('My profile'), 'siteid' => 'myhome', 'visible' => true, 'filename' => 'myhome.php', 'navicolor' => '#E8DDE4' ), array( 'title' => t('Caches'), 'menustring' => t('Caches'), 'siteid' => 'search', 'visible' => true, 'filename' => 'search.php', 'navicolor' => '#FFFFC5', 'submenu' => array( array( 'title' => t('Search'), 'menustring' => t('Search'), 'visible' => true, 'filename' => 'search.php', 'siteid' => 'search', 'submenu' => array( array( 'title' => t('Show Geocache'), 'menustring' => t('Show Geocache'), 'visible' => false, 'filename' => 'viewcache.php', 'siteid' => 'viewcache', 'submenu' => array( array( 'title' => t('Create a logentry'), 'menustring' => t('Create a logentry'), 'visible' => false, 'filename' => 'log.php', 'siteid' => 'log_cache' ), array( 'title' => t('Edit logentry'), 'menustring' => t('Edit logentry'), 'visible' => false, 'filename' => 'editlog.php', 'siteid' => 'editlog' ), array( 'title' => t('Remove logentry'), 'menustring' => t('Remove logentry'), 'visible' => false, 'filename' => 'removelog.php', 'siteid' => 'removelog_logowner' ), array( 'title' => t('Remove logentry'), 'menustring' => t('Remove logentry'), 'visible' => false, 'filename' => 'removelog.php', 'siteid' => 'removelog_cacheowner' ), array( 'title' => t('Edit cache'), 'menustring' => t('Edit cache'), 'visible' => false, 'filename' => 'editcache.php', 'siteid' => 'editcache' ), array( 'title' => t('Add description'), 'menustring' => t('Add description'), 'visible' => false, 'filename' => 'newdesc.php', 'siteid' => 'newdesc' ), array( 'title' => t('Edit description'), 'menustring' => t('Edit description'), 'visible' => false, 'filename' => 'editdesc.php', 'siteid' => 'editdesc' ), array( 'title' => t('Remove description'), 'menustring' => t('Remove description'), 'visible' => false, 'filename' => 'removedesc.php', 'siteid' => 'removedesc' ) ) ), array( 'title' => t('Select city'), 'menustring' => t('Select city'), 'visible' => false, 'filename' => 'search.php', 'siteid' => 'selectlocid' ), array( 'title' => t('Show search result'), 'menustring' => t('Result'), 'visible' => false, 'filename' => 'search.php', 'siteid' => 'search.result.caches' ), array( 'title' => t('Recommendations'), 'menustring' => t('Recommendations'), 'visible' => false, 'filename' => 'recommendations.php', 'siteid' => 'recommendations' ) ) ), array( 'title' => t('Create a cache'), 'menustring' => t('Create a cache'), 'visible' => true, 'filename' => 'newcache.php', 'siteid' => 'newcache', 'submenu' => array( array( 'title' => t('Description - Create a cache'), 'menustring' => t('Description'), 'visible' => true, 'filename' => 'articles.php?page=cacheinfo', 'siteid' => 'articles/cacheinfo' ), array( 'title' => t('HTML preview'), 'menustring' => t('HTML preview'), 'visible' => true, 'filename' => 'htmlprev.php', 'siteid' => 'htmlprev' ), array( 'title' => t('HTML Tags'), 'menustring' => t('HTML Tags'), 'visible' => true, 'filename' => 'articles.php?page=htmltags', 'siteid' => 'articles/htmltags' ) ) ), array( 'title' => t('Special caches'), 'menustring' => t('Special caches'), 'visible' => true, 'filename' => 'tops.php', 'siteid' => 'tops' ) ) ), array( 'title' => t('Map'), 'menustring' => t('Map'), 'siteid' => 'map', 'visible' => true, 'filename' => 'map2.php' ), array( 'title' => t('Add picture'), 'visible' => false, 'filename' => 'newpic.php', 'menustring' => t('Add picture'), 'siteid' => 'newpic' ), array( 'title' => t('Edit picture'), 'visible' => false, 'filename' => 'editpic.php', 'menustring' => t('Edit picture'), 'siteid' => 'editpic' ), array( 'title' => t('Error message'), 'menustring' => t('Error message'), 'visible' => false, 'filename' => 'index.php', 'siteid' => 'error' ), array( 'title' => t('Message'), 'visible' => false, 'filename' => 'index.php', 'menustring' => t('Message'), 'siteid' => 'message' ), array( 'title' => t('Changelog'), 'visible' => false, 'filename' => 'index.php', 'menustring' => t('Changelog'), 'siteid' => 'changelog' ), array( 'title' => t('Sitemap'), 'visible' => false, 'filename' => 'index.php', 'menustring' => t('Sitemap'), 'siteid' => 'sitemap' ), array( 'title' => t('Verein'), 'visible' => false, 'filename' => 'index.php', 'menustring' => t('Verein'), 'siteid' => 'verein' ) ); /* * mnu_MainMenuIndexFromPageId - returns the top level menu * * menustructure normally $menu * pageid siteid to search for */ function mnu_MainMenuIndexFromPageId($menustructure, $pageid) { /* selmenuitem contains the selected (bold) menu item */ global $mnu_selmenuitem; for ($i = 0, $ret = -1; ($i < count($menustructure)) && ($ret == -1); $i++) { if ($menustructure[$i]['siteid'] == $pageid) { $mnu_selmenuitem = $menustructure[$i]; return $i; } else { if (isset($menustructure[$i]['submenu'])) { $ret = mnu_MainMenuIndexFromPageId($menustructure[$i]['submenu'], $pageid); if ($ret != -1) return $i; } } } return $ret; } /* * mnu_EchoMainMenu - echos the top level menus * * selmenuid p.e. mnu_MainMenuIndexFromPageId($menu, $siteid) */ function mnu_EchoMainMenu($selmenuid) { global $menu; $c = 0; for ($i = 0; $i < count($menu); $i++) { if ($menu[$i]['visible'] == true) { $sItem = '' . htmlspecialchars(t($menu[$i]['menustring']), ENT_COMPAT, 'UTF-8') . ''; $sItemSel = '' . htmlspecialchars(t($menu[$i]['menustring']), ENT_COMPAT, 'UTF-8') . ''; if ($menu[$i]['siteid'] == $selmenuid) /* $sItem = '