本文整理汇总了PHP中display_sidebox函数的典型用法代码示例。如果您正苦于以下问题:PHP display_sidebox函数的具体用法?PHP display_sidebox怎么用?PHP display_sidebox使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了display_sidebox函数的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: all_hooks
function all_hooks($args)
{
$appname = 'infolog';
$location = is_array($args) ? $args['location'] : $args;
//echo "<p>admin_prefs_sidebox_hooks::all_hooks(".print_r($args,True).") appname='$appname', location='$location'</p>\n";
if ($location == 'sidebox_menu') {
$file = array('infolog list' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'infolog.uiinfolog.index')), 'add' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'infolog.uiinfolog.edit')));
display_sidebox($appname, $GLOBALS['phpgw_info']['apps']['infolog']['title'] . ' ' . lang('Menu'), $file);
}
if ($GLOBALS['phpgw_info']['user']['apps']['preferences'] && $location != 'admin') {
$file = array('Preferences' => $GLOBALS['phpgw']->link('/preferences/preferences.php', 'appname=' . $appname), 'Grant Access' => $GLOBALS['phpgw']->link('/index.php', 'menuaction=preferences.uiaclprefs.index&acl_app=' . $appname), 'Edit Categories' => $GLOBALS['phpgw']->link('/index.php', 'menuaction=preferences.uicategories.index&cats_app=' . $appname . '&cats_level=True&global_cats=True'));
if ($location == 'preferences') {
display_section($appname, $file);
} else {
display_sidebox($appname, lang('Preferences'), $file);
}
}
if ($GLOBALS['phpgw_info']['user']['apps']['admin'] && $location != 'preferences') {
$file = array('Site configuration' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'infolog.uiinfolog.admin')), 'Global Categories' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'admin.uicategories.index', 'appname' => $appname, 'global_cats' => True)), 'Custom fields, typ and status' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'infolog.uicustomfields.edit')), 'CSV-Import' => $GLOBALS['phpgw']->link('/infolog/csv_import.php'));
if ($location == 'admin') {
display_section($appname, $file);
} else {
display_sidebox($appname, lang('Admin'), $file);
}
}
}
示例2: all_hooks
/**
* hooks to build projectmanager's sidebox-menu plus the admin and preferences sections
*
* @param string/array $args hook args
*/
function all_hooks($args)
{
$appname = 'courseprotocol';
$location = is_array($args) ? $args['location'] : $args;
//echo "<p>ts_admin_prefs_sidebox_hooks::all_hooks(".print_r($args,True).") appname='$appname', location='$location'</p>\n";
if ($location == 'sidebox_menu') {
$file = array();
display_sidebox($appname, $GLOBALS['egw_info']['apps'][$appname]['title'] . ' ' . lang('Menu'), $file);
}
if ($GLOBALS['egw_info']['user']['apps']['preferences'] && $location != 'admin') {
$file = array('View Occurrence' => $GLOBALS['egw']->link('/index.php', 'menuaction=courseprotocol.uicourseprotocol.occindex'));
display_sidebox($appname, lang('Courseprotocol menu'), $file);
$file = array('Grant Access' => $GLOBALS['egw']->link('/index.php', 'menuaction=preferences.uiaclprefs.index&acl_app=' . $appname));
if ($location == 'preferences') {
display_section($appname, $file);
} else {
display_sidebox($appname, lang('Preferences'), $file);
}
}
if ($GLOBALS['egw_info']['user']['apps']['admin'] && $location != 'preferences') {
$file = array('Custom fields' => $GLOBALS['egw']->link('/index.php', 'menuaction=admin.customfields.edit&appname=' . $appname), 'Global Categories' => $GLOBALS['egw']->link('/index.php', array('menuaction' => 'admin.uicategories.index', 'appname' => $appname, 'global_cats' => true)));
if ($location == 'admin') {
display_section($appname, $file);
} else {
display_sidebox($appname, lang('Admin'), $file);
}
}
}
示例3: menus
/**
* Show E-Push preferences link in preferences
*
* @param string|array $args
*/
public static function menus($args)
{
$appname = 'activesync';
$location = is_array($args) ? $args['location'] : $args;
if ($location == 'preferences') {
$file = array('Preferences' => egw::link('/index.php', 'menuaction=preferences.uisettings.index&appname=' . $appname));
if ($location == 'preferences') {
display_section($appname, $file);
} else {
display_sidebox($appname, lang('Preferences'), $file);
}
}
}
示例4: all_hooks
function all_hooks($args)
{
if (!function_exists('db_saq')) {
fud_use('db.inc');
}
$GLOBALS['adm_file'] = array();
list($GLOBALS['fudh_uopt'], $theme_name) = db_saq("SELECT u.users_opt, t.name FROM phpgw_fud_users u INNER JOIN phpgw_fud_themes t ON t.id=u.theme WHERE u.id!=1 AND u.egw_id=" . (int) $GLOBALS['phpgw_info']['user']['account_id']);
$GLOBALS['fudh_uopt'] = (int) $GLOBALS['fudh_uopt'];
if (!empty($GLOBALS['phpgw_info']['user']['apps']['admin'])) {
$GLOBALS['fudh_uopt'] |= 1048576;
}
include_once $GLOBALS['DATA_DIR'] . 'include/theme/' . str_replace(' ', '_', $theme_name) . '/usercp.inc';
/* regular user links */
//print_r ($GLOBALS);
if (!empty($GLOBALS['t']) && $GLOBALS['last_loginid'] != 'anonymous') {
display_sidebox('fudforum', lang('Preferences'), $GLOBALS['usr_file']);
}
/* admin stuff */
if ($GLOBALS['adm_file']) {
display_sidebox('fudforum', lang('Administration'), $GLOBALS['adm_file']);
}
}
示例5: lang
<?php
$menu_title = $GLOBALS['phpgw_info']['apps'][$appname]['title'] . ' ' . lang('Menu');
$menu = $GLOBALS['phpgw']->session->appsession('menu_property', 'sidebox');
if (isset($menu) && is_array($menu)) {
display_sidebox($appname, $menu_title, $menu['module'], $use_lang = false);
if (isset($menu['menu_title_2']) && $menu['menu_title_2']) {
display_sidebox($appname, $menu['menu_title_2'] . ' ' . lang('sub menu'), $menu['sub_menu'], $use_lang = false);
}
if (isset($menu['menu_title_3']) && $menu['menu_title_3']) {
display_sidebox($appname, $menu['menu_title_3'] . ' ' . lang('sub menu'), $menu['sub_menu_2'], $use_lang = false);
}
}
示例6: array
$file['Manage Signatures'] = $GLOBALS['phpgw']->link('/index.php', $linkData);
}
$file['Manage Folders'] = $GLOBALS['phpgw']->link('/index.php', 'menuaction=felamimail.uipreferences.listFolder');
$icServer = $preferences->getIncomingServer(0);
if (is_a($icServer, 'defaultimap')) {
if ($icServer->enableSieve) {
$linkData = array('menuaction' => 'felamimail.uisieve.listRules');
$file['filter rules'] = $GLOBALS['phpgw']->link('/index.php', $linkData);
$linkData = array('menuaction' => 'felamimail.uisieve.editVacation');
$file['vacation notice'] = $GLOBALS['phpgw']->link('/index.php', $linkData);
$file['email notification'] = $GLOBALS['phpgw']->link('/index.php', 'menuaction=felamimail.uisieve.editEmailNotification');
//Added email notifications
}
}
$ogServer = $preferences->getOutgoingServer(0);
if (is_a($ogServer, 'defaultsmtp')) {
if ($ogServer->editForwardingAddress) {
$linkData = array('menuaction' => 'felamimail.uipreferences.editForwardingAddress');
$file['Forwarding'] = $GLOBALS['phpgw']->link('/index.php', $linkData);
}
}
display_sidebox($appname, $menu_title, $file);
}
/* if ($GLOBALS['phpgw_info']['user']['apps']['admin'])
{
$menu_title = lang('Administration');
$file = Array(
'Configuration' => $GLOBALS['phpgw']->link('/index.php','menuaction=felamimail.uifelamimail.hookAdmin')
);
display_sidebox($appname,$menu_title,$file);
} */
示例7: lang
<?php
/*
This hookfile is for generating an app-specific side menu used in the idots
template set.
$menu_title speaks for itself
$file is the array with link to app functions
display_sidebox can be called as much as you like
*/
$menu_title = $GLOBALS['phpgw_info']['apps'][$appname]['title'] . ' ' . lang('Menu');
$file = array('read news' => $GLOBALS['phpgw']->link('/news_admin/index.php'));
display_sidebox($appname, $menu_title, $file);
$title = lang('Preferences');
$file = array('Preferences' => $GLOBALS['phpgw']->link('/preferences/preferences.php', 'appname=' . $appname));
display_sidebox($appname, $title, $file);
if ($GLOBALS['phpgw_info']['user']['apps']['admin']) {
$title = lang('Administration');
$file = array('News Administration' => $GLOBALS['phpgw']->link('/index.php', 'menuaction=news_admin.uinews.write_news'), 'global categories' => $GLOBALS['phpgw']->link('/index.php', 'menuaction=admin.uicategories.index&appname=' . $appname), 'configure access permissions' => $GLOBALS['phpgw']->link('/index.php', 'menuaction=news_admin.uiacl.acllist'), 'configure rss exports' => $GLOBALS['phpgw']->link('/index.php', 'menuaction=news_admin.uiexport.exportlist'));
display_sidebox($appname, $title, $file);
}
unset($title);
unset($file);
示例8: Sidebox_EmailDataCheck
// no valid email login assumed if failed above tests
return False;
}
/*
Main code for constructing all this apps
sideboxes as needed and if its possible.
*/
// Init some global variables with known values
$allow_sidebox = False;
$sidebox_mailacct = 0;
// Only allow email sideboxes if displaying a page
// where the msg object has been initialised and
// there is valid email data present.
if (is_object($GLOBALS['phpgw']->msg)) {
$sidebox_mailacct = $GLOBALS['phpgw']->msg->get_acctnum();
$allow_sidebox = Sidebox_EmailDataCheck($sidebox_mailacct);
}
if ($allow_sidebox == True) {
// Generate sidebox for navigation of email app
// Only show if user pref is set to sidebox.
if ($GLOBALS['phpgw']->msg->ok_toshow_sidemenu('basic') == True) {
$menu_title = $GLOBALS['phpgw_info']['apps'][$appname]['title'] . ' ' . lang('Menu');
display_sidebox($appname, $menu_title, CreateSidebox_EmailMenu($sidebox_mailacct));
}
// Generate sidebox to show email folders
// Only show if user pref is not set to hidden.
if ($GLOBALS['phpgw']->msg->ok_toshow_sidemenu('folderlist') == True) {
$menu_title = $GLOBALS['phpgw_info']['apps'][$appname]['title'] . ' ' . lang('Folders');
display_sidebox($appname, $menu_title, CreateSidebox_FolderMenu($sidebox_mailacct));
}
}
示例9: parse_navbar
function parse_navbar($force = False)
{
$GLOBALS['idots_tpl'] = createobject('phpgwapi.Template', PHPGW_TEMPLATE_DIR);
$GLOBALS['idots_tpl']->set_file(array('navbar' => 'navbar.tpl'));
$GLOBALS['idots_tpl']->set_block('navbar', 'navbar_header', 'navbar_header');
$GLOBALS['idots_tpl']->set_block('navbar', 'extra_blocks_header', 'extra_block_header');
$GLOBALS['idots_tpl']->set_block('navbar', 'extra_block_row', 'extra_block_row');
$GLOBALS['idots_tpl']->set_block('navbar', 'extra_block_spacer', 'extra_block_spacer');
$GLOBALS['idots_tpl']->set_block('navbar', 'extra_blocks_footer', 'extra_blocks_footer');
$GLOBALS['idots_tpl']->set_block('navbar', 'navbar_footer', 'navbar_footer');
$var['img_root'] = $GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/literati/images';
$var['table_bg_color'] = $GLOBALS['phpgw_info']['theme']['navbar_bg'];
$applications = '';
// == 'icons_and_text')
foreach ($GLOBALS['phpgw_info']['navbar'] as $app => $app_data) {
if ($app != 'home' && $app != 'preferences' && $app != 'about' && $app != 'logout') {
$title = $GLOBALS['phpgw_info']['apps'][$app]['title'];
$icon = '<img src="' . $app_data['icon'] . '" alt="' . $title . '" title="' . $title . '" border="0" height="60">';
$app_icons .= '<TD align="center"><a href="' . $app_data['url'] . '"';
if (isset($GLOBALS['phpgw_info']['flags']['navbar_target']) && $GLOBALS['phpgw_info']['flags']['navbar_target']) {
$app_icons .= ' target="' . $GLOBALS['phpgw_info']['flags']['navbar_target'] . '"';
}
$app_icons .= $app_data['target'] . '>' . $icon . '</a></TD>';
$app_titles .= '<TD align=center class="mainnote"><a href="' . $app_data['url'] . '"';
if (isset($GLOBALS['phpgw_info']['flags']['navbar_target']) && $GLOBALS['phpgw_info']['flags']['navbar_target']) {
$app_titles .= ' target="' . $GLOBALS['phpgw_info']['flags']['navbar_target'] . '"';
}
$app_titles .= $app_data['target'] . '>' . $title . '</a></TD>';
unset($icon);
unset($title);
}
}
$var['app_icons'] = $app_icons;
if ($GLOBALS['phpgw_info']['user']['preferences']['common']['navbar_format'] != 'icons') {
$var['app_titles'] = $app_titles;
}
if (isset($GLOBALS['phpgw_info']['flags']['app_header'])) {
$var['current_app_title'] = $GLOBALS['phpgw_info']['flags']['app_header'];
} else {
$var['current_app_title'] = $GLOBALS['phpgw_info']['navbar'][$GLOBALS['phpgw_info']['flags']['currentapp']]['title'];
}
if (isset($GLOBALS['phpgw_info']['navbar']['admin']) && $GLOBALS['phpgw_info']['user']['preferences']['common']['show_currentusers']) {
$var['current_users'] = '<a href="' . $GLOBALS['phpgw']->link('/index.php', 'menuaction=admin.uicurrentsessions.list_sessions') . '">' . lang('Current users') . ': ' . $GLOBALS['phpgw']->session->total() . '</a>';
}
$now = time();
$var['user_info'] = '<b>' . $GLOBALS['phpgw']->common->display_fullname() . '</b>' . ' - ' . lang($GLOBALS['phpgw']->common->show_date($now, 'l')) . ' ' . $GLOBALS['phpgw']->common->show_date($now, $GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']);
if ($GLOBALS['phpgw_info']['user']['lastpasswd_change'] == 0) {
$api_messages = lang('You are required to change your password during your first login') . '<br> Click this image on the navbar: <img src="' . $GLOBALS['phpgw']->common->image('preferences', 'navbar.gif') . '">';
} elseif ($GLOBALS['phpgw_info']['user']['lastpasswd_change'] < time() - 86400 * 30) {
$api_messages = lang('it has been more then %1 days since you changed your password', 30);
}
// This is gonna change
if (isset($cd)) {
$var['messages'] = $api_messages . '<br>' . checkcode($cd);
}
if (substr($GLOBALS['phpgw_info']['server']['login_logo_file'], 0, 4) == 'http') {
$var['logo_file'] = $GLOBALS['phpgw_info']['server']['login_logo_file'];
} else {
$var['logo_file'] = $GLOBALS['phpgw']->common->image('phpgwapi', $GLOBALS['phpgw_info']['server']['login_logo_file'] ? $GLOBALS['phpgw_info']['server']['login_logo_file'] : 'logo');
}
$var['logo_url'] = $GLOBALS['phpgw_info']['server']['login_logo_url'] ? $GLOBALS['phpgw_info']['server']['login_logo_url'] : 'http://www.eGroupWare.org';
if (substr($var['logo_url'], 0, 4) != 'http') {
$var['logo_url'] = 'http://' . $var['logo_url'];
}
$var['logo_title'] = $GLOBALS['phpgw_info']['server']['login_logo_title'] ? $GLOBALS['phpgw_info']['server']['login_logo_title'] : 'www.eGroupWare.org';
$GLOBALS['idots_tpl']->set_var($var);
$GLOBALS['idots_tpl']->pfp('out', 'navbar_header');
$menu_title = lang('General Menu');
$file['Home'] = $GLOBALS['phpgw_info']['navbar']['home']['url'];
if ($GLOBALS['phpgw_info']['user']['apps']['preferences']) {
$file['Preferences'] = $GLOBALS['phpgw_info']['navbar']['preferences']['url'];
}
$file += array('About %1' => $GLOBALS['phpgw_info']['navbar']['about']['url'], 'Logout' => $GLOBALS['phpgw_info']['navbar']['logout']['url']);
display_sidebox('', $menu_title, $file);
$GLOBALS['phpgw']->hooks->single('sidebox_menu', $GLOBALS['phpgw_info']['flags']['currentapp']);
$GLOBALS['idots_tpl']->pparse('out', 'navbar_footer');
// If the application has a header include, we now include it
if (!@$GLOBALS['phpgw_info']['flags']['noappheader'] && @isset($_GET['menuaction'])) {
list($app, $class, $method) = explode('.', $_GET['menuaction']);
if (is_array($GLOBALS[$class]->public_functions) && $GLOBALS[$class]->public_functions['header']) {
$GLOBALS[$class]->header();
}
}
$GLOBALS['phpgw']->hooks->process('after_navbar');
return;
}
示例10: lang
<?php
/**************************************************************************\
* eGroupWare - Bookmarks *
* http://www.egroupware.org *
* -------------------------------------------- *
* This program is free software; you can redistribute it and/or modify it *
* under the terms of the GNU General Public License as published by the *
* Free Software Foundation; either version 2 of the License, or (at your *
* option) any later version. *
\**************************************************************************/
/* $Id: hook_sidebox_menu.inc.php,v 1.1.2.1 2004/08/18 10:52:33 reinerj Exp $ */
/*
This hookfile is for generating an app-specific side menu used in the idots
template set.
$menu_title speaks for itself
$file is the array with link to app functions
display_sidebox can be called as much as you like
*/
if ($GLOBALS['phpgw_info']['user']['apps']['preferences']) {
$menu_title = lang('Preferences');
$file = array('Import Bookmarks' => $GLOBALS['phpgw']->link('/index.php', 'menuaction=bookmarks.ui.import'), 'Export Bookmarks' => $GLOBALS['phpgw']->link('/index.php', 'menuaction=bookmarks.ui.export'), 'Grant Access' => $GLOBALS['phpgw']->link('/index.php', 'menuaction=preferences.uiaclprefs.index&acl_app=' . $appname), 'Edit Categories' => $GLOBALS['phpgw']->link('/index.php', 'menuaction=preferences.uicategories.index&cats_app=' . $appname . '&cats_level=True&global_cats=True'));
display_sidebox('bookmarks', $menu_title, $file);
}
if ($GLOBALS['phpgw_info']['user']['apps']['admin']) {
$menu_title = lang('Administration');
$file = array('Site Configuration' => $GLOBALS['phpgw']->link('/index.php', 'menuaction=admin.uiconfig.index&appname=' . $appname), 'Global Categories' => $GLOBALS['phpgw']->link('/index.php', 'menuaction=admin.uicategories.index&appname=bookmarks'));
display_sidebox('bookmarks', $menu_title, $file);
}
示例11: display_sidebox
default:
$file['Accounting'] = $GLOBALS['phpgw']->link('/index.php', 'menuaction=projects.uiconfig.list_employees&action=accounting');
}
}
display_sidebox($appname, $menu_title, $file);
if ($GLOBALS['phpgw_info']['user']['apps']['preferences']) {
$menu_title = $GLOBALS['phpgw_info']['apps'][$appname]['title'] . ' ' . lang('Preferences');
$pref_file['Preferences'] = $GLOBALS['phpgw']->link('/index.php', 'menuaction=projects.uiconfig.preferences');
$pref_file['Grant Access'] = $GLOBALS['phpgw']->link('/index.php', 'menuaction=preferences.uiaclprefs.index&acl_app=' . $appname);
$pref_file['Edit categories'] = $GLOBALS['phpgw']->link('/index.php', 'menuaction=preferences.uicategories.index&cats_app=projects&cats_level=True&global_cats=True');
display_sidebox($appname, $menu_title, $pref_file);
}
if ($GLOBALS['phpgw_info']['user']['apps']['admin'] || $boprojects->isprojectadmin('pad') || $boprojects->isprojectadmin('pmanager')) {
$menu_title = $GLOBALS['phpgw_info']['apps'][$appname]['title'] . ' ' . lang('Administration');
if ($GLOBALS['phpgw_info']['user']['apps']['admin']) {
$admin_file['Site Configuration'] = $GLOBALS['phpgw']->link('/index.php', 'menuaction=admin.uiconfig.index&appname=' . $appname);
/* $admin_file['managing committee'] =
$GLOBALS['phpgw']->link('/index.php','menuaction=projects.uiconfig.list_admins&action=pmanager'); */
$admin_file['project administrators'] = $GLOBALS['phpgw']->link('/index.php', 'menuaction=projects.uiconfig.list_admins&action=pad');
/* $admin_file['sales department'] =
$GLOBALS['phpgw']->link('/index.php','menuaction=projects.uiconfig.list_admins&action=psale'); */
$admin_file['Global Categories'] = $GLOBALS['phpgw']->link('/index.php', 'menuaction=admin.uicategories.index&appname=' . $appname);
}
if ($boprojects->isprojectadmin('pad') || $boprojects->isprojectadmin('pmanager')) {
$admin_file['Roles'] = $GLOBALS['phpgw']->link('/index.php', 'menuaction=projects.uiconfig.list_roles&action=role');
$admin_file['costs'] = $GLOBALS['phpgw']->link('/index.php', 'menuaction=projects.uiconfig.list_roles&action=role&role_type=cost');
$admin_file['events'] = $GLOBALS['phpgw']->link('/index.php', 'menuaction=projects.uiconfig.list_events');
}
display_sidebox($appname, $menu_title, $admin_file);
}
unset($boprojects);
示例12: foreach
<?php
if (isset($GLOBALS['phpgw']->help->output['help_values']) && is_array($GLOBALS['phpgw']->help->output['help_values'])) {
foreach ($GLOBALS['phpgw']->help->output['help_values'] as $entry => $values) {
//_debug_array($values['listbox']);
display_sidebox($appname, $values['title'], $values['listbox'], $use_lang = false);
}
}
示例13: parse_navbar
/**
* Parse navigation bar
*
* @param boolean $force
* @ignore
*/
function parse_navbar($force = false)
{
$GLOBALS['phpgw']->template->set_root(PHPGW_TEMPLATE_DIR);
$GLOBALS['phpgw']->template->set_file('navbar', 'navbar.tpl');
$GLOBALS['phpgw']->template->set_block('navbar', 'navbar_item', 'navbar_items');
$GLOBALS['phpgw']->template->set_block('navbar', 'navbar_header', 'navbar_header');
$GLOBALS['phpgw']->template->set_block('navbar', 'extra_blocks_header', 'extra_block_header');
$GLOBALS['phpgw']->template->set_block('navbar', 'extra_blocks_menu', 'extra_blocks_menu');
$GLOBALS['phpgw']->template->set_block('navbar', 'extra_block_row', 'extra_block_row');
$GLOBALS['phpgw']->template->set_block('navbar', 'extra_blocks_footer', 'extra_blocks_footer');
$GLOBALS['phpgw']->template->set_block('navbar', 'navbar_footer', 'navbar_footer');
$var['img_root'] = $GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/idots/images';
$applications = '';
$items = 0;
$navbar = execMethod('phpgwapi.menu.get', 'navbar');
prepare_navbar($navbar);
$navigation = execMethod('phpgwapi.menu.get', 'navigation');
$sidecontent = 'sidebox';
if (isset($GLOBALS['phpgw_info']['user']['preferences']['common']['sidecontent']) && $GLOBALS['phpgw_info']['user']['preferences']['common']['sidecontent']) {
$sidecontent = $GLOBALS['phpgw_info']['user']['preferences']['common']['sidecontent'];
}
$excluded = array('home', 'preferences', 'about', 'logout');
foreach ($navbar as $app => $app_data) {
if (!in_array($app, $excluded) || $sidecontent != 'sidebox' && $sidecontent != 'jsmenu') {
$item = array('app_name' => '', 'alt_img_app' => lang($app), 'img_app' => "{$var['img_root']}/noimage_nav.png", 'url_app' => $app_data['url'], 'app_name' => $app_data['text'], 'img_app' => $GLOBALS['phpgw']->common->image($app_data['image'][0], $app_data['image'][1]));
$GLOBALS['phpgw']->template->set_var($item);
$GLOBALS['phpgw']->template->parse('navbar_items', 'navbar_item', true);
}
}
if (isset($GLOBALS['phpgw_info']['flags']['app_header'])) {
$var['current_app_title'] = $GLOBALS['phpgw_info']['flags']['app_header'];
} else {
$var['current_app_title'] = lang($GLOBALS['phpgw_info']['flags']['currentapp']);
}
if (isset($GLOBALS['phpgw_info']['navbar']['admin']) && isset($GLOBALS['phpgw_info']['user']['preferences']['common']['show_currentusers']) && $GLOBALS['phpgw_info']['user']['preferences']['common']['show_currentusers']) {
$var['current_users'] = '<a href="' . $GLOBALS['phpgw']->link('/index.php', 'menuaction=admin.uicurrentsessions.list_sessions') . '">' . lang('Current users') . ': ' . $GLOBALS['phpgw']->session->total() . '</a>';
}
$now = time();
$var['user_info'] = '<b>' . $GLOBALS['phpgw']->common->display_fullname() . '</b>' . ' - ' . lang($GLOBALS['phpgw']->common->show_date($now, 'l')) . ' ' . $GLOBALS['phpgw']->common->show_date($now, $GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']);
if (!isset($GLOBALS['phpgw_info']['user']['lastpasswd_change']) || $GLOBALS['phpgw_info']['user']['lastpasswd_change'] == 0) {
$api_messages = lang('You are required to change your password during your first login') . '<br> Click this image on the navbar: <img src="' . $GLOBALS['phpgw']->common->image('preferences', 'navbar') . '">';
} else {
if (isset($GLOBALS['phpgw_info']['user']['lastpasswd_change']) && $GLOBALS['phpgw_info']['user']['lastpasswd_change'] < time() - 86400 * 30) {
$api_messages = lang('it has been more then %1 days since you changed your password', 30);
}
}
// This is gonna change
if (isset($cd)) {
$var['messages'] = $api_messages . '<br>' . checkcode($cd);
}
$var['content_class'] = $sidecontent == 'sidebox' || $sidecontent == 'jsmenu' ? 'content' : 'content_nosidebox';
$GLOBALS['phpgw']->template->set_var($var);
$GLOBALS['phpgw']->template->pfp('out', 'navbar_header');
if ($sidecontent == 'sidebox' || $sidecontent == 'jsmenu') {
$menu_title = lang('General Menu');
$menu['home'] = $navbar['home'];
if (isset($navbar['preferences'])) {
$menu['preferences'] = $navbar['preferences'];
}
$menu['about'] = array('text' => lang('About'), 'url' => $GLOBALS['phpgw']->link('/about.php', array('app' => $GLOBALS['phpgw_info']['flags']['currentapp'])));
$menu['logout'] = $navbar['logout'];
display_sidebox($menu_title, $menu);
}
if (isset($navigation[$GLOBALS['phpgw_info']['flags']['currentapp']]) && $GLOBALS['phpgw_info']['flags']['currentapp'] != 'admin' && $GLOBALS['phpgw_info']['flags']['currentapp'] != 'preferences') {
$app = $GLOBALS['phpgw_info']['flags']['currentapp'];
$GLOBALS['phpgw']->template->set_var('lang_title', $navbar[$app]['text']);
$GLOBALS['phpgw']->template->pfp('out', 'extra_blocks_header');
$menu = createObject('phpgwapi.menu');
$app_menu = $menu->render_menu($app, $navigation[$app], $navbar[$app]);
$GLOBALS['phpgw']->template->set_var(array('app_menu' => $app_menu));
$GLOBALS['phpgw']->template->pfp('out', 'extra_blocks_menu');
$GLOBALS['phpgw']->template->pfp('out', 'extra_blocks_footer');
}
if (isset($navbar['preferences']) && $GLOBALS['phpgw_info']['flags']['currentapp'] != 'preferences') {
$prefs = execMethod('phpgwapi.menu.get', 'preferences');
if (isset($prefs[$GLOBALS['phpgw_info']['flags']['currentapp']])) {
// display_sidebox(lang('preferences'), $prefs[$GLOBALS['phpgw_info']['flags']['currentapp']]);
}
}
if (isset($navigation['admin'][$GLOBALS['phpgw_info']['flags']['currentapp']]['children'])) {
// display_sidebox(lang('administration'), $navigation['admin'][$GLOBALS['phpgw_info']['flags']['currentapp']]['children']);
}
$GLOBALS['phpgw']->template->pparse('out', 'navbar_footer');
// If the application has a header include, we now include it
if ((!isset($GLOBALS['phpgw_info']['flags']['noappheader']) || !$GLOBALS['phpgw_info']['flags']['noappheader']) && isset($_GET['menuaction'])) {
list($app, $class, $method) = explode('.', $_GET['menuaction']);
if (is_array($GLOBALS[$class]->public_functions) && isset($GLOBALS[$class]->public_functions['header'])) {
$GLOBALS[$class]->header();
}
}
$GLOBALS['phpgw']->template->set_root(PHPGW_APP_TPL);
$GLOBALS['phpgw']->hooks->process('after_navbar');
}