function &get_categories_menu($type = 'tree') { global $menu; if (empty($menu)) { initialize_categories_menu(); } $m = new HTML_Menu($menu, $type, 'REQUEST_URI'); return $m->get(); }
/** * Get the data rows and return a renderer ready to be used * * @param string $action The action template string * @return HTML_Menu_TipRenderer|null The renderer or * null on errors * @internal */ protected function &_getRenderer($action) { if (is_null($this->_model)) { $this->startDataView() && $this->endView(); } if (is_null($this->_model)) { $fake_null = null; return $fake_null; } // Duplicate the model and update the URLs on the copy $model = $this->_model; $this->_updateModelUrl($model, $action); require_once 'HTML/Menu.php'; $menu = new HTML_Menu($model); empty($action) || $menu->forceCurrentUrl(TIP::getRequestUri()); $renderer =& TIP_Renderer::getMenu(); $menu->render($renderer, 'sitemap'); return $renderer; }
$items['gs_db'] = array('name' => _ADMIN_DATABASE_OPERATIONS, 'href' => $session->addSID($admin_url . '/database.php')); $menu_data = array('gs' => array('name' => _ADMIN_GENERAL_SETTINGS, 'items' => $items)); $menu = new HTML_Menu($menu_data, "a_menu_pane"); $menu->show(); echo "<br />"; $items = array(); if (Permissions::checkPerm('users_and_groups_settings')) { $items['uag_s'] = array('name' => _ADMIN_SETTINGS, 'href' => $session->addSID($admin_url . '/user_settings.php')); } $items['uag_u'] = array('name' => _ADMIN_USERS, 'href' => $session->addSID($admin_url . '/users.php')); if (Permissions::checkPerm('add_users')) { $items['uag_au'] = array('name' => _ADMIN_ADD_NEW_USER, 'href' => $session->addSID($admin_url . '/add_user.php')); } $items['uag_g'] = array('name' => _ADMIN_GROUPS, 'href' => $session->addSID($admin_url . '/groups.php')); if (Permissions::checkPerm('add_groups')) { $items['uag_ag'] = array('name' => _ADMIN_ADD_NEW_GROUP, 'href' => $session->addSID($admin_url . '/edit_group.php?action=add')); } if (Permissions::checkPerm('mess_message')) { $items['uag_mm'] = array('name' => "Wiadomo¶æ masowa", 'href' => $session->addSID($admin_url . '/mass.php')); } $menu_data = array('uag' => array('name' => _ADMIN_USERS_AND_GROUPS, 'items' => $items)); $menu = new HTML_Menu($menu_data, "a_menu_pane_2"); $menu->show(); echo "<br />"; $menu_data = array('gal' => array('name' => _ADMIN_GALLERY, 'items' => array('gal_s' => array('name' => _ADMIN_SETTINGS, 'href' => $session->addSID($admin_url . '/gallery.php')), 'gal_c' => array('name' => _ADMIN_CATEGORIES, 'href' => $session->addSID($admin_url . '/categories.php')), 'gal_ac' => array('name' => _ADMIN_ADD_NEW_CATEGORY, 'href' => $session->addSID($admin_url . '/edit_category.php?action=add')), 'gal_p' => array('name' => _ADMIN_PHOTOS, 'href' => $session->addSID($admin_url . '/photos.php'))))); $menu = new HTML_Menu($menu_data, "a_menu_pane_3"); $menu->show(); echo "<br />"; HTML::endBODY(); HTML::endHTML(); ini_restore('include_path');
<?php // no direct access defined('PARENT_FILE') or die('Restricted access'); $menu = $this->registry->db->getResult('item_id, menu_type, item', 'menu_items', $this->registry->core . 'menu_types', array('where' => "item='" . $params['menu'] . "'"), false); if ($menu) { $params['menu_category_id'] = $menu->item_id; // Start Navibar class. $navibar = new HTML_Menu($this->registry, $params); $module = $navibar->getMenu($menu->item_id, $menu->item, $menu->menu_type); $this->module_wrap->appendChild($module); unset($navibar); }