Ejemplo n.º 1
0
function display_sidebox($appname, $menu_title, $file)
{
    if (!$appname || $appname == $GLOBALS['phpgw_info']['flags']['currentapp'] && $file) {
        $var['lang_title'] = $menu_title;
        //$appname.' '.lang('Menu');
        $GLOBALS['idots_tpl']->set_var($var);
        $GLOBALS['idots_tpl']->pfp('out', 'extra_blocks_header');
        while (list($text, $url) = each($file)) {
            sidebox_menu_item($url, $text);
        }
        $GLOBALS['idots_tpl']->pparse('out', 'extra_blocks_footer');
    }
}
Ejemplo n.º 2
0
/**
 * Display sidebox
 *
 * @param string $appname
 * @param string $menu_title
 * @param string $file
 */
function display_sidebox($menu_title, $menu)
{
    $GLOBALS['phpgw']->template->set_var('lang_title', $menu_title);
    $GLOBALS['phpgw']->template->pfp('out', 'extra_blocks_header');
    foreach ($menu as $key => $item) {
        if (!isset($item['url'])) {
            $item['url'] = '';
        }
        if (!isset($item['image'])) {
            $item['image'] = '';
        }
        if (!isset($item['this'])) {
            $item['this'] = '';
        }
        sidebox_menu_item($item['url'], $item['text'], $item['image'], $item['this']);
    }
    $GLOBALS['phpgw']->template->pfp('out', 'extra_blocks_footer');
}