diff --git a/addressbook/inc/class.uiXport.inc.php b/addressbook/inc/class.uiXport.inc.php index 5e94ea736e..3561025725 100644 --- a/addressbook/inc/class.uiXport.inc.php +++ b/addressbook/inc/class.uiXport.inc.php @@ -90,7 +90,6 @@ else { $GLOBALS['phpgw']->common->phpgw_header(); - echo parse_navbar(); echo "
$buffer"; echo ''.lang('OK').''; $GLOBALS['phpgw']->common->phpgw_footer(); @@ -99,7 +98,6 @@ else { $GLOBALS['phpgw']->common->phpgw_header(); - echo parse_navbar(); echo "
$buffer"; echo ''.lang('OK').''; $GLOBALS['phpgw']->common->phpgw_footer(); @@ -109,7 +107,6 @@ else { $GLOBALS['phpgw']->common->phpgw_header(); - echo parse_navbar(); $this->template->set_file(array('import' => 'import.tpl')); @@ -173,7 +170,6 @@ $GLOBALS['phpgw_info']['flags']['noheader'] = False; $GLOBALS['phpgw_info']['flags']['noheader'] = True; $GLOBALS['phpgw']->common->phpgw_header(); - echo parse_navbar(); echo lang('No conversion type <none> could be located. Please choose a conversion type from the list'); echo ' ' . lang('OK') . ''; $GLOBALS['phpgw']->common->phpgw_footer(); @@ -192,7 +188,6 @@ else { $GLOBALS['phpgw']->common->phpgw_header(); - echo parse_navbar(); echo "
\n"; echo $buffer; echo "\n\n"; @@ -203,7 +198,6 @@ else { $GLOBALS['phpgw']->common->phpgw_header(); - echo parse_navbar(); $this->template->set_file(array('export' => 'export.tpl')); diff --git a/addressbook/inc/class.uiaddressbook.inc.php b/addressbook/inc/class.uiaddressbook.inc.php index f4b5fa036c..465d59a73f 100644 --- a/addressbook/inc/class.uiaddressbook.inc.php +++ b/addressbook/inc/class.uiaddressbook.inc.php @@ -262,7 +262,6 @@ function index($entries='') { $GLOBALS['phpgw']->common->phpgw_header(); - echo parse_navbar(); $this->template->set_file(array('addressbook_list_t' => 'index.tpl')); $this->template->set_block('addressbook_list_t','addressbook_header','addressbook_header'); @@ -713,7 +712,6 @@ $this->template->set_file(array('add' => 'add.tpl')); $GLOBALS['phpgw']->common->phpgw_header(); - echo parse_navbar(); $custom = $this->fields->read_custom_fields(); $customfields = array(); @@ -773,7 +771,6 @@ } $GLOBALS['phpgw']->common->phpgw_header(); - echo parse_navbar(); /* Read in user custom fields, if any */ $custom = $this->fields->read_custom_fields(); @@ -838,7 +835,6 @@ if($confirm != 'true') { $GLOBALS['phpgw']->common->phpgw_header(); - echo parse_navbar(); $this->template->set_var('lang_sure',lang('Are you sure you want to delete this entry ?')); $this->template->set_var('no_link',$GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiaddressbook.index')); @@ -881,7 +877,6 @@ elseif(!$submit && $ab_id) { $GLOBALS['phpgw']->common->phpgw_header(); - echo parse_navbar(); } $this->template->set_file(array('view_t' => 'view.tpl')); @@ -1148,7 +1143,6 @@ } $GLOBALS['phpgw']->common->phpgw_header(); - echo parse_navbar(); if($totalerrors) { diff --git a/addressbook/inc/class.uifields.inc.php b/addressbook/inc/class.uifields.inc.php index 760533be3f..706a195143 100644 --- a/addressbook/inc/class.uifields.inc.php +++ b/addressbook/inc/class.uifields.inc.php @@ -34,7 +34,6 @@ if(!$GLOBALS['phpgw']->acl->check('run',1,'admin')) { $GLOBALS['phpgw']->common->phpgw_header(); - echo parse_navbar(); echo lang('access not permitted'); $GLOBALS['phpgw']->common->phpgw_exit(); } @@ -80,7 +79,6 @@ $total_records = count($fields); $GLOBALS['phpgw']->common->phpgw_header(); - echo parse_navbar(); $GLOBALS['phpgw']->template->set_var('left',$GLOBALS['phpgw']->nextmatchs->left('/index.php',$start,$total_records,'menuaction=addressbook.uifields.index')); $GLOBALS['phpgw']->template->set_var('right',$GLOBALS['phpgw']->nextmatchs->right('/index.php',$start,$total_records,'menuaction=addressbook.uifields.index')); @@ -119,7 +117,6 @@ if(!$GLOBALS['phpgw']->acl->check('run',1,'admin')) { $GLOBALS['phpgw']->common->phpgw_header(); - echo parse_navbar(); echo lang('access not permitted'); $GLOBALS['phpgw']->common->phpgw_exit(); } @@ -158,7 +155,6 @@ } $GLOBALS['phpgw']->common->phpgw_header(); - echo parse_navbar(); if($errorcount) { @@ -197,7 +193,6 @@ if(!$GLOBALS['phpgw']->acl->check('run',1,'admin')) { $GLOBALS['phpgw']->common->phpgw_header(); - echo parse_navbar(); echo lang('access not permitted'); $GLOBALS['phpgw']->common->phpgw_exit(); } @@ -240,7 +235,6 @@ } $GLOBALS['phpgw']->common->phpgw_header(); - echo parse_navbar(); if($errorcount) { @@ -292,7 +286,6 @@ if(!$GLOBALS['phpgw']->acl->check('run',1,'admin')) { $GLOBALS['phpgw']->common->phpgw_header(); - echo parse_navbar(); echo lang('access not permitted'); $GLOBALS['phpgw']->common->phpgw_exit(); } @@ -316,7 +309,6 @@ else { $GLOBALS['phpgw']->common->phpgw_header(); - echo parse_navbar(); $hidden_vars = '' . "\n" . '' . "\n" diff --git a/addressbook/inc/class.uivcard.inc.php b/addressbook/inc/class.uivcard.inc.php index 0cdc009938..7f2d928f3c 100644 --- a/addressbook/inc/class.uivcard.inc.php +++ b/addressbook/inc/class.uivcard.inc.php @@ -46,7 +46,6 @@ $action = $GLOBALS['HTTP_POST_VARS']['action']; $GLOBALS['phpgw']->common->phpgw_header(); - echo parse_navbar(); echo ''; @@ -76,7 +75,6 @@ if($nolname || $nofname) { $GLOBALS['phpgw']->common->phpgw_header(); - echo parse_navbar(); } if(!$ab_id) diff --git a/admin/inc/class.uiaccess_history.inc.php b/admin/inc/class.uiaccess_history.inc.php index e0f1b6563b..e729121d80 100644 --- a/admin/inc/class.uiaccess_history.inc.php +++ b/admin/inc/class.uiaccess_history.inc.php @@ -41,7 +41,6 @@ $order = ($GLOBALS['HTTP_POST_VARS']['order']?$GLOBALS['HTTP_POST_VARS']['order']:0); $GLOBALS['phpgw']->common->phpgw_header(); - echo parse_navbar(); $total_records = $this->bo->total($account_id); diff --git a/admin/inc/class.uiaclmanager.inc.php b/admin/inc/class.uiaclmanager.inc.php index 52efeb0428..4e6dfd2c2c 100644 --- a/admin/inc/class.uiaclmanager.inc.php +++ b/admin/inc/class.uiaclmanager.inc.php @@ -29,7 +29,6 @@ function common_header() { $GLOBALS['phpgw']->common->phpgw_header(); - echo parse_navbar(); } function list_apps() diff --git a/admin/inc/class.uiapplications.inc.php b/admin/inc/class.uiapplications.inc.php index 24e943e172..115f274137 100644 --- a/admin/inc/class.uiapplications.inc.php +++ b/admin/inc/class.uiapplications.inc.php @@ -32,7 +32,6 @@ function get_list() { $GLOBALS['phpgw']->common->phpgw_header(); - echo parse_navbar(); $GLOBALS['phpgw']->template->set_file(array('applications' => 'applications.tpl')); $GLOBALS['phpgw']->template->set_block('applications','list','list'); @@ -210,7 +209,6 @@ } $GLOBALS['phpgw']->common->phpgw_header(); - echo parse_navbar(); $GLOBALS['phpgw']->template->set_var('lang_header',lang('Add new application')); $GLOBALS['phpgw']->template->set_var('th_bg',$GLOBALS['phpgw_info']['theme']['th_bg']); @@ -295,7 +293,6 @@ } $GLOBALS['phpgw']->common->phpgw_header(); - echo parse_navbar(); if ($totalerrors) { @@ -349,7 +346,6 @@ } $GLOBALS['phpgw']->common->phpgw_header(); - echo parse_navbar(); $GLOBALS['phpgw']->template->set_var('messages',lang('Are you sure you want to delete this application ?')); $GLOBALS['phpgw']->template->set_var('no','' . lang('No') . ''); diff --git a/admin/inc/class.uicategories.inc.php b/admin/inc/class.uicategories.inc.php index f73cf2abf2..d24f7a0116 100644 --- a/admin/inc/class.uicategories.inc.php +++ b/admin/inc/class.uicategories.inc.php @@ -98,7 +98,6 @@ $global_cats = $GLOBALS['HTTP_POST_VARS']['global_cats'] ? $GLOBALS['HTTP_POST_VARS']['global_cats'] : $GLOBALS['HTTP_GET_VARS']['global_cats']; $GLOBALS['phpgw']->common->phpgw_header(); - echo parse_navbar(); $this->template->set_file(array('cat_list_t' => 'listcats.tpl')); $this->template->set_block('cat_list_t','cat_list','list'); @@ -247,7 +246,6 @@ ); $GLOBALS['phpgw']->common->phpgw_header(); - echo parse_navbar(); $this->set_langs(); @@ -331,7 +329,6 @@ } $GLOBALS['phpgw']->common->phpgw_header(); - echo parse_navbar(); $this->set_langs(); @@ -449,7 +446,6 @@ )); $GLOBALS['phpgw']->common->phpgw_header(); - echo parse_navbar(); $hidden_vars = '' . "\n"; $this->template->set_var('hidden_vars',$hidden_vars); diff --git a/admin/inc/class.uiconfig.inc.php b/admin/inc/class.uiconfig.inc.php index c0d087e874..dee12b6b06 100644 --- a/admin/inc/class.uiconfig.inc.php +++ b/admin/inc/class.uiconfig.inc.php @@ -155,7 +155,6 @@ } $GLOBALS['phpgw']->common->phpgw_header(); - echo parse_navbar(); $t->set_var('title',lang('Site Configuration')); $t->set_var('action_url',$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiconfig.index&appname=' . $appname)); diff --git a/admin/inc/class.uicurrentsessions.inc.php b/admin/inc/class.uicurrentsessions.inc.php index 44a699ab4a..bc82ebff08 100644 --- a/admin/inc/class.uicurrentsessions.inc.php +++ b/admin/inc/class.uicurrentsessions.inc.php @@ -31,7 +31,6 @@ function header() { $GLOBALS['phpgw']->common->phpgw_header(); - echo parse_navbar(); } function store_location($info) diff --git a/admin/inc/class.uilog.inc.php b/admin/inc/class.uilog.inc.php index 6b5404c9a0..e6365dad19 100644 --- a/admin/inc/class.uilog.inc.php +++ b/admin/inc/class.uilog.inc.php @@ -256,7 +256,6 @@ $this->t->set_var('event_list',$table); $GLOBALS['phpgw']->common->phpgw_header(); - echo parse_navbar(); $this->t->pfp('out','log_list_t'); // $this->set_app_langs(); } diff --git a/admin/inc/class.uimainscreen.inc.php b/admin/inc/class.uimainscreen.inc.php index feb6ce0336..c671f1fdbb 100644 --- a/admin/inc/class.uimainscreen.inc.php +++ b/admin/inc/class.uimainscreen.inc.php @@ -37,7 +37,6 @@ $message = $GLOBALS['HTTP_POST_VARS']['message']; $GLOBALS['phpgw']->common->phpgw_header(); - echo parse_navbar(); if ($GLOBALS['HTTP_POST_VARS']['submit']) { diff --git a/admin/inc/class.uiserver.inc.php b/admin/inc/class.uiserver.inc.php index a4ca77712e..de7cdbcb91 100644 --- a/admin/inc/class.uiserver.inc.php +++ b/admin/inc/class.uiserver.inc.php @@ -95,7 +95,6 @@ function list_servers() { $GLOBALS['phpgw']->common->phpgw_header(); - echo parse_navbar(); $GLOBALS['phpgw']->template->set_file(array('server_list_t' => 'listservers.tpl')); $GLOBALS['phpgw']->template->set_block('server_list_t','server_list','list'); @@ -243,7 +242,6 @@ } $GLOBALS['phpgw']->common->phpgw_header(); - echo parse_navbar(); $GLOBALS['phpgw']->template->set_var('title_servers',$GLOBALS['HTTP_GET_VARS']['server_id'] ? lang('Edit Peer Server') : lang('Add Peer Server')); $GLOBALS['phpgw']->template->set_var('actionurl',$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiserver.edit&server_id=' . $GLOBALS['HTTP_GET_VARS']['server_id'])); @@ -297,7 +295,6 @@ else { $GLOBALS['phpgw']->common->phpgw_header(); - echo parse_navbar(); $GLOBALS['phpgw']->template->set_file(array('server_delete' => 'delete_common.tpl')); diff --git a/calendar/preferences.php b/calendar/preferences.php index 9e1a39394c..c758e905c0 100644 --- a/calendar/preferences.php +++ b/calendar/preferences.php @@ -106,7 +106,6 @@ } $phpgw->common->phpgw_header(); - echo parse_navbar(); $p = CreateObject('phpgwapi.Template',$phpgw->common->get_tpl_dir('calendar')); $templates = Array( diff --git a/home.php b/home.php index 77475cda74..af6ddc1e86 100755 --- a/home.php +++ b/home.php @@ -95,7 +95,6 @@ if ($navbarframe) { $GLOBALS['phpgw']->common->phpgw_header(); - echo parse_navbar(); } } } @@ -107,7 +106,6 @@ else { $GLOBALS['phpgw']->common->phpgw_header(); - echo parse_navbar(); } $GLOBALS['phpgw']->translation->add_app('mainscreen'); diff --git a/phpgwapi/inc/class.Template.inc.php b/phpgwapi/inc/class.Template.inc.php index 51b020b69e..ece846bdb6 100644 --- a/phpgwapi/inc/class.Template.inc.php +++ b/phpgwapi/inc/class.Template.inc.php @@ -61,7 +61,19 @@ $this->set_root(PHPGW_TEMPLATE_DIR); $this->set_file('common', 'common.tpl'); } - $this->set_var('phpgw_css',$GLOBALS['phpgw_info']['theme']['css']); + + if(@is_array($GLOBALS['phpgw_info']['theme']['css'])) + { + reset($GLOBALS['phpgw_info']['theme']['css']); + //$css_string = ''."\n"; + $this->set_var('phpgw_css',$css_string); + } /* Now move on to loading up the requested template set */ $this->set_root($root); diff --git a/phpgwapi/inc/class.common.inc.php b/phpgwapi/inc/class.common.inc.php index 1b15aef924..f2adc748b8 100644 --- a/phpgwapi/inc/class.common.inc.php +++ b/phpgwapi/inc/class.common.inc.php @@ -1053,33 +1053,75 @@ $GLOBALS['phpgw_info']['navbar']['logout']['url'] = $GLOBALS['phpgw']->link('/logout.php'); $GLOBALS['phpgw_info']['navbar']['logout']['icon'] = $this->image('phpgwapi',Array('logout','nonav')); $GLOBALS['phpgw_info']['navbar']['logout']['icon_hover'] = $this->image_on('phpgwapi',Array('logout','nonav'),'-over'); - } - /*! - @function app_header - @abstract load header.inc.php for an application - */ - function app_header() - { - if (file_exists(PHPGW_APP_INC . '/header.inc.php')) + /*************************************************************************\ + * If they are using frames, we need to set some variables * + \*************************************************************************/ + if(((isset($GLOBALS['phpgw_info']['user']['preferences']['common']['useframes']) && + $GLOBALS['phpgw_info']['user']['preferences']['common']['useframes']) && + $GLOBALS['phpgw_info']['server']['useframes'] == 'allowed') || + ($GLOBALS['phpgw_info']['server']['useframes'] == 'always')) { - include(PHPGW_APP_INC . '/header.inc.php'); + $GLOBALS['phpgw_info']['flags']['navbar_target'] = 'phpgw_body'; } } + /*! @function phpgw_header @abstract load the phpgw header */ - function phpgw_header() + function phpgw_header($forceheader = True, $forcenavbar = True) { - include(PHPGW_INCLUDE_ROOT . '/phpgwapi/templates/' . $GLOBALS['phpgw_info']['server']['template_set'] - . '/head.inc.php'); - $this->navbar(False); - include(PHPGW_INCLUDE_ROOT . '/phpgwapi/templates/' . $GLOBALS['phpgw_info']['server']['template_set'] - . '/navbar.inc.php'); + if($forceheader) + { + $GLOBALS['phpgw_info']['flags']['noheader'] = False; + } + if($forcenavbar) + { + $GLOBALS['phpgw_info']['flags']['nonavbar'] = False; + } + + if (!@$GLOBALS['phpgw_info']['flags']['noheader']) + { + include(PHPGW_INCLUDE_ROOT . '/phpgwapi/templates/' . $GLOBALS['phpgw_info']['server']['template_set'] . '/head.inc.php'); + } + if(!function_exists('parse_navbar')) + { + $this->navbar(False); + include(PHPGW_INCLUDE_ROOT . '/phpgwapi/templates/' . $GLOBALS['phpgw_info']['server']['template_set'] . '/navbar.inc.php'); + } if (!@$GLOBALS['phpgw_info']['flags']['nonavbar'] && !@$GLOBALS['phpgw_info']['flags']['navbar_target']) { - echo parse_navbar(); + parse_navbar(); + } + //elseif (!@$GLOBALS['phpgw_info']['flags']['noheader'] && function_exists('parse_nonavbar')) + //{ + // parse_nonavbar(); + //} + if (!@$GLOBALS['phpgw_info']['flags']['noheader'] && !@$GLOBALS['phpgw_info']['flags']['nonavbar']) + { + $GLOBALS['phpgw']->hooks->process('after_navbar'); + //echo '
msgbox goes here |