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
'; + } + } + + /*! + @function phpgw_appheader + @abstract load header.inc.php for an application + */ + function phpgw_appheader() + { + if (!is_array(MENUACTION)) + { + list($app,$class,$method) = explode('.',MENUACTION); + if (is_array($GLOBALS[$class]->public_functions) && $GLOBALS[$class]->public_functions['header']) + { + $GLOBALS[$class]->header(); + } + } + elseif (file_exists(PHPGW_APP_INC . '/header.inc.php')) + { + include(PHPGW_APP_INC . '/header.inc.php'); } } @@ -1089,9 +1131,34 @@ if (!isset($GLOBALS['phpgw_info']['flags']['nofooter']) || !$GLOBALS['phpgw_info']['flags']['nofooter']) { - include(PHPGW_API_INC . '/footer.inc.php'); + if((file_exists(PHPGW_APP_INC . '/footer.inc.php') || MENUACTION) && + $GLOBALS['phpgw_info']['flags']['currentapp'] != 'home' && + $GLOBALS['phpgw_info']['flags']['currentapp'] != 'login' && + $GLOBALS['phpgw_info']['flags']['currentapp'] != 'logout' && + !@$GLOBALS['phpgw_info']['flags']['noappfooter']) + { + if(MENUACTION) + { + list($app,$class,$method) = explode('.',MENUACTION); + if(is_array($GLOBALS[$class]->public_functions) && $GLOBALS[$class]->public_functions['footer']) + { +// eval("\$GLOBALS[$class]->footer();"); + $GLOBALS[$class]->footer(); + } + elseif(file_exists(PHPGW_APP_INC.'/footer.inc.php')) + { + include(PHPGW_APP_INC . '/footer.inc.php'); + } + } + elseif(file_exists(PHPGW_APP_INC.'/footer.inc.php')) + { + include(PHPGW_APP_INC . '/footer.inc.php'); + } + } + $GLOBALS['phpgw']->db->disconnect(); + parse_navbar_end(); } - + /* Clean up mcrypt */ if (@is_object($GLOBALS['phpgw']->crypto)) { diff --git a/phpgwapi/inc/footer.inc.php b/phpgwapi/inc/footer.inc.php index 5c00951696..973ef649bf 100644 --- a/phpgwapi/inc/footer.inc.php +++ b/phpgwapi/inc/footer.inc.php @@ -34,34 +34,7 @@ /**************************************************************************\ * Include the apps footer files if it exists * \**************************************************************************/ - if((file_exists(PHPGW_APP_INC . '/footer.inc.php') || MENUACTION) && - $GLOBALS['phpgw_info']['flags']['currentapp'] != 'home' && - $GLOBALS['phpgw_info']['flags']['currentapp'] != 'login' && - $GLOBALS['phpgw_info']['flags']['currentapp'] != 'logout' && - !@$GLOBALS['phpgw_info']['flags']['noappfooter']) - { - if(MENUACTION) - { - list($app,$class,$method) = explode('.',MENUACTION); - if(is_array($GLOBALS[$class]->public_functions) && $GLOBALS[$class]->public_functions['footer']) - { -// eval("\$GLOBALS[$class]->footer();"); - $GLOBALS[$class]->footer(); - } - elseif(file_exists(PHPGW_APP_INC.'/footer.inc.php')) - { - include(PHPGW_APP_INC . '/footer.inc.php'); - } - } - elseif(file_exists(PHPGW_APP_INC.'/footer.inc.php')) - { - include(PHPGW_APP_INC . '/footer.inc.php'); - } - } - - parse_navbar_end(); - $GLOBALS['phpgw']->db->disconnect(); - + $GLOBALS['phpgw']->common->phpgw_footer(); ?> diff --git a/phpgwapi/inc/functions.inc.php b/phpgwapi/inc/functions.inc.php index 518497dd1e..06db859514 100644 --- a/phpgwapi/inc/functions.inc.php +++ b/phpgwapi/inc/functions.inc.php @@ -398,35 +398,24 @@ exit; } - if (!isset($GLOBALS['phpgw_info']['theme']['css'])) - { - $GLOBALS['phpgw_info']['theme']['css'] = ''; - } - if (isset($GLOBALS['phpgw_info']['theme']['hovlink']) && ($GLOBALS['phpgw_info']['theme']['hovlink'] != '')) { - $csshover = "\t".'A:hover{ text-decoration:none; color: ' .$GLOBALS['phpgw_info']['theme']['hovlink'] .'; }'."\n"; + $phpgw_info['theme']['css']['A:hover'] = 'text-decoration:none; color: '.$GLOBALS['phpgw_info']['theme']['hovlink'].';'; } - else + + $phpgw_info['theme']['css']['A'] = 'text-decoration:none;'; + $phpgw_info['theme']['css']['A:link'] = 'text-decoration:none; color: '.$GLOBALS['phpgw_info']['theme']['link'].';'; + $phpgw_info['theme']['css']['A:visited'] = 'text-decoration:none; color: '.$GLOBALS['phpgw_info']['theme']['vlink'].';'; + $phpgw_info['theme']['css']['A:active'] = 'text-decoration:none; color: '.$GLOBALS['phpgw_info']['theme']['alink'].';'; + + if(@file_exists(PHPGW_TEMPLATE_DIR . '/css.inc.php')) { - $csshover = ''; + include(PHPGW_TEMPLATE_DIR . '/css.inc.php'); } - $GLOBALS['phpgw_info']['theme']['css'] = "\t".'a { text-decoration:none; }'."\n" - ."\t".'A:link{ text-decoration:none; color: '.$GLOBALS['phpgw_info']['theme']['link'].'; }'."\n" - ."\t".'A:visted{ text-decoration:none; color: '.$GLOBALS['phpgw_info']['theme']['vlink'].'; }'."\n" - ."\t".'A:active{ text-decoration:none; color: '.$GLOBALS['phpgw_info']['theme']['alink'].'; }'."\n" - .$csshover - .$GLOBALS['phpgw_info']['theme']['css']; - - unset($csshover); - - if(@file_exists(PHPGW_APP_TPL . '/app.css')) + if(@file_exists(PHPGW_APP_TPL . '/css.inc.php')) { - $app_css_file = fopen (PHPGW_APP_TPL . '/app.css', "r"); - $contents = fread ($app_css_file, filesize ($app_css_file)); - fclose ($app_css_file); - $GLOBALS['phpgw_info']['theme']['css'] .= "\n".$contents; + include(PHPGW_APP_TPL . '/css.inc.php'); } unset($theme_to_load); @@ -439,26 +428,6 @@ $GLOBALS['phpgw']->template = CreateObject('phpgwapi.Template',PHPGW_APP_TPL); } - /*************************************************************************\ - * These lines remove the css data from memory since the template set will * - * already have loaded it into its own memory space * - \*************************************************************************/ - if(!@$GLOBALS['phpgw_info']['flags']['keep_phpgw_css']) - { -// unset($GLOBALS['phpgw_info']['theme']['css']); - } - - /*************************************************************************\ - * 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')) - { - $GLOBALS['phpgw_info']['flags']['navbar_target'] = 'phpgw_body'; - } - /*************************************************************************\ * Verify that the users session is still active otherwise kick them out * \*************************************************************************/ @@ -471,11 +440,7 @@ (@$GLOBALS['phpgw_info']['flags']['admin_only'] && ! $GLOBALS['phpgw_info']['user']['apps']['admin'])) { - $GLOBALS['phpgw']->common->phpgw_header(); - if ($GLOBALS['phpgw_info']['flags']['noheader']) - { - echo parse_navbar(); - } + $GLOBALS['phpgw']->common->phpgw_header(False, False); $GLOBALS['phpgw']->log->write(array('text'=>'W-Permissions, Attempted to access %1','p1'=>$GLOBALS['phpgw_info']['flags']['currentapp'])); @@ -487,10 +452,7 @@ /*************************************************************************\ * Load the header unless the developer turns it off * \*************************************************************************/ - if (!@$GLOBALS['phpgw_info']['flags']['noheader']) - { - $GLOBALS['phpgw']->common->phpgw_header(); - } + $GLOBALS['phpgw']->common->phpgw_header(False, False); /*************************************************************************\ * Load the app include files if the exists * @@ -500,12 +462,10 @@ { include(PHPGW_APP_INC . '/functions.inc.php'); } - if (!@$GLOBALS['phpgw_info']['flags']['noheader'] && - !@$GLOBALS['phpgw_info']['flags']['noappheader'] && - file_exists(PHPGW_APP_INC . '/header.inc.php') && !MENUACTION) + + if (!@$GLOBALS['phpgw_info']['flags']['noappheader']) { - include(PHPGW_APP_INC . '/header.inc.php'); + $GLOBALS['phpgw']->common->phpgw_appheader(); } } - error_reporting(E_ERROR | E_WARNING | E_PARSE); diff --git a/phpgwapi/templates/default/navbar.inc.php b/phpgwapi/templates/default/navbar.inc.php index 13d4f9d300..156719fe17 100644 --- a/phpgwapi/templates/default/navbar.inc.php +++ b/phpgwapi/templates/default/navbar.inc.php @@ -111,16 +111,6 @@ } $tpl->set_var($var); $tpl->pfp('out','navbar'); - // If the application has a header include, we now include it - if (!@$GLOBALS['phpgw_info']['flags']['noappheader'] && @isset($GLOBALS['HTTP_GET_VARS']['menuaction'])) - { - list($app,$class,$method) = explode('.',$GLOBALS['HTTP_GET_VARS']['menuaction']); - if (is_array($GLOBALS[$class]->public_functions) && $GLOBALS[$class]->public_functions['header']) - { - $GLOBALS[$class]->header(); - } - } - $GLOBALS['phpgw']->hooks->process('after_navbar'); return; } diff --git a/phpgwapi/templates/idsociety/footer.tpl b/phpgwapi/templates/idsociety/footer.tpl index 3dbc6bb7cf..d6246b5dd7 100644 --- a/phpgwapi/templates/idsociety/footer.tpl +++ b/phpgwapi/templates/idsociety/footer.tpl @@ -13,4 +13,6 @@ + + diff --git a/phpgwapi/templates/idsociety/head.inc.php b/phpgwapi/templates/idsociety/head.inc.php index 650fb589bb..8be751d884 100644 --- a/phpgwapi/templates/idsociety/head.inc.php +++ b/phpgwapi/templates/idsociety/head.inc.php @@ -11,17 +11,6 @@ /* $Id$ */ - // needed until hovlink is specified in all theme files - if (isset($GLOBALS['phpgw_info']['theme']['hovlink']) - && ($GLOBALS['phpgw_info']['theme']['hovlink'] != '')) - { - $csshover = 'A:hover{ text-decoration:none; color: ' .$GLOBALS['phpgw_info']['theme']['hovlink'] .'; }'; - } - else - { - $csshover = ''; - } - $app_css = ''; if(@isset($GLOBALS['HTTP_GET_VARS']['menuaction'])) { @@ -48,10 +37,6 @@ 'font_family' => $GLOBALS['phpgw_info']['theme']['font'], 'website_title' => $GLOBALS['phpgw_info']['server']['site_title'], 'body_tags' => $bodyheader, - 'css_link' => $GLOBALS['phpgw_info']['theme']['link'], - 'css_alink' => $GLOBALS['phpgw_info']['theme']['alink'], - 'css_vlink' => $GLOBALS['phpgw_info']['theme']['vlink'], - 'css_hovlink' => $csshover, 'app_css' => $app_css ); $tpl->set_var($var); diff --git a/phpgwapi/templates/idsociety/head.tpl b/phpgwapi/templates/idsociety/head.tpl index 261803b3b1..76d572ed49 100644 --- a/phpgwapi/templates/idsociety/head.tpl +++ b/phpgwapi/templates/idsociety/head.tpl @@ -1,27 +1,16 @@ - + - + - - + {website_title} -set_var($var); $tpl->pfp('out','navbar'); - // If the application has a header include, we now include it - if (!@$GLOBALS['phpgw_info']['flags']['noappheader'] && @isset($GLOBALS['HTTP_GET_VARS']['menuaction'])) - { - list($app,$class,$method) = explode('.',$GLOBALS['HTTP_GET_VARS']['menuaction']); - if (is_array($GLOBALS[$class]->public_functions) && $GLOBALS[$class]->public_functions['header']) - { - $GLOBALS[$class]->header(); - } - } - $GLOBALS['phpgw']->hooks->process('after_navbar'); return; } + function parse_nonavbar() + { + echo '>'; + } + function parse_navbar_end() { $tpl = CreateObject('phpgwapi.Template',PHPGW_TEMPLATE_DIR); diff --git a/phpgwapi/templates/justweb/navbar.inc.php b/phpgwapi/templates/justweb/navbar.inc.php index fa3223a9d3..62ad11451e 100644 --- a/phpgwapi/templates/justweb/navbar.inc.php +++ b/phpgwapi/templates/justweb/navbar.inc.php @@ -141,16 +141,6 @@ $tpl->set_var($var); $tpl->pfp('out','navbar'); - // If the application has a header include, we now include it - if (!@$GLOBALS['phpgw_info']['flags']['noappheader'] && @isset($GLOBALS['HTTP_GET_VARS']['menuaction'])) - { - list($app,$class,$method) = explode('.',$GLOBALS['HTTP_GET_VARS']['menuaction']); - if (is_array($GLOBALS[$class]->public_functions) && $GLOBALS[$class]->public_functions['header']) - { - $GLOBALS[$class]->header(); - } - } - $GLOBALS['phpgw']->hooks->process('after_navbar'); return; } diff --git a/phpgwapi/templates/linux-at-work.de/navbar.inc.php b/phpgwapi/templates/linux-at-work.de/navbar.inc.php index 074ea3180e..57fca268e2 100644 --- a/phpgwapi/templates/linux-at-work.de/navbar.inc.php +++ b/phpgwapi/templates/linux-at-work.de/navbar.inc.php @@ -125,16 +125,6 @@ */ $tpl->set_var($var); $tpl->pfp('out','navbar'); - // If the application has a header include, we now include it - if (!@$GLOBALS['phpgw_info']['flags']['noappheader'] && @isset($GLOBALS['HTTP_GET_VARS']['menuaction'])) - { - list($app,$class,$method) = explode('.',$GLOBALS['HTTP_GET_VARS']['menuaction']); - if (is_array($GLOBALS[$class]->public_functions) && $GLOBALS[$class]->public_functions['header']) - { - $GLOBALS[$class]->header(); - } - } - $GLOBALS['phpgw']->hooks->process('after_navbar'); return; } diff --git a/phpgwapi/templates/verdilak/navbar.inc.php b/phpgwapi/templates/verdilak/navbar.inc.php index 48b90714ad..0bc031f2b8 100644 --- a/phpgwapi/templates/verdilak/navbar.inc.php +++ b/phpgwapi/templates/verdilak/navbar.inc.php @@ -122,16 +122,6 @@ } $tpl->set_var($var); $tpl->pfp('out','navbar'); - // If the application has a header include, we now include it - if (!@$GLOBALS['phpgw_info']['flags']['noappheader'] && @isset($GLOBALS['HTTP_GET_VARS']['menuaction'])) - { - list($app,$class,$method) = explode('.',$GLOBALS['HTTP_GET_VARS']['menuaction']); - if (is_array($GLOBALS[$class]->public_functions) && $GLOBALS[$class]->public_functions['header']) - { - $GLOBALS[$class]->header(); - } - } - $GLOBALS['phpgw']->hooks->process('after_navbar'); return; } diff --git a/phpgwapi/themes/default.theme b/phpgwapi/themes/default.theme index 7a593775ed..edacd15d2f 100644 --- a/phpgwapi/themes/default.theme +++ b/phpgwapi/themes/default.theme @@ -44,3 +44,15 @@ // These are for the email only $phpgw_info['theme']['em_folder'] = '#666699'; $phpgw_info['theme']['em_folder_text'] = '#FFFFFF'; + + + // This is the CSS definition + $phpgw_info['theme']['css']['.navbar'] = 'font-family: Verdana;font-size: 8pt; color:#000000;}'; + $phpgw_info['theme']['css']['.bodytext'] = 'font-family: Verdana; font-size: 8pt; color:#000000;'; + $phpgw_info['theme']['css']['.whitetext'] = 'font-family: Verdana; font-size: 8pt; color:#ffffff;'; + $phpgw_info['theme']['css']['.headertext'] = 'font-family: Verdana; font-size: 11pt; font-weight: bold; color:#ffffff;'; + $phpgw_info['theme']['css']['.inputtext'] = ' font-family: Verdana; font-size: 8pt; color="#000000"; background-color="#ffffff";'; + $phpgw_info['theme']['css']['.buttontext'] = 'font-family: Verdana; font-size: 8pt; color="#000000"; background-color="#c0c0c0";'; + $phpgw_info['theme']['css']['.linktext'] = 'font-family: Verdana; font-size: 8pt; color="#000000"; background-color="#c0c0c0";'; + $phpgw_info['theme']['css']['.row_on'] = 'font-family: Verdana; font-size: 8pt; color="#000000"; background-color="#c0c0c0";'; + $phpgw_info['theme']['css']['.row_off'] = 'font-family: Verdana; font-size: 8pt; color="#000000"; background-color="#c0c0c0";'; diff --git a/phpgwapi/themes/idsociety.theme b/phpgwapi/themes/idsociety.theme index b95a9bb843..6957a7292a 100755 --- a/phpgwapi/themes/idsociety.theme +++ b/phpgwapi/themes/idsociety.theme @@ -48,3 +48,14 @@ // These are for the email only $phpgw_info['theme']['em_folder'] = '#adadad'; $phpgw_info['theme']['em_folder_text'] = '#ffffff'; + + // This is the CSS definition + $phpgw_info['theme']['css']['.navbar'] = 'font-family: Verdana;font-size: 8pt; color:#000000;}'; + $phpgw_info['theme']['css']['.bodytext'] = 'font-family: Verdana; font-size: 8pt; color:#000000;'; + $phpgw_info['theme']['css']['.whitetext'] = 'font-family: Verdana; font-size: 8pt; color:#ffffff;'; + $phpgw_info['theme']['css']['.headertext'] = 'font-family: Verdana; font-size: 11pt; font-weight: bold; color:#ffffff;'; + $phpgw_info['theme']['css']['.inputtext'] = ' font-family: Verdana; font-size: 8pt; color="#000000"; background-color="#ffffff";'; + $phpgw_info['theme']['css']['.buttontext'] = 'font-family: Verdana; font-size: 8pt; color="#000000"; background-color="#c0c0c0";'; + $phpgw_info['theme']['css']['.linktext'] = 'font-family: Verdana; font-size: 8pt; color="#000000"; background-color="#c0c0c0";'; + $phpgw_info['theme']['css']['.row_on'] = 'font-family: Verdana; font-size: 8pt; color="#000000"; background-color="#c0c0c0";'; + $phpgw_info['theme']['css']['.row_off'] = 'font-family: Verdana; font-size: 8pt; color="#000000"; background-color="#c0c0c0";'; diff --git a/preferences/changepassword.php b/preferences/changepassword.php index e9ccc78243..620ca393ea 100755 --- a/preferences/changepassword.php +++ b/preferences/changepassword.php @@ -59,7 +59,6 @@ if(is_array($errors)) { $GLOBALS['phpgw']->common->phpgw_header(); - echo parse_navbar(); $GLOBALS['phpgw']->template->set_var('messages',$GLOBALS['phpgw']->common->error_list($errors)); $GLOBALS['phpgw']->template->pfp('out','form'); $GLOBALS['phpgw']->common->phpgw_exit(True); @@ -85,7 +84,6 @@ else { $GLOBALS['phpgw']->common->phpgw_header(); - echo parse_navbar(); $GLOBALS['phpgw']->template->pfp('out','form'); $GLOBALS['phpgw']->common->phpgw_footer(); diff --git a/preferences/inc/class.uiaclprefs.inc.php b/preferences/inc/class.uiaclprefs.inc.php index c40c308100..f00bdf0bb9 100644 --- a/preferences/inc/class.uiaclprefs.inc.php +++ b/preferences/inc/class.uiaclprefs.inc.php @@ -194,7 +194,6 @@ } $GLOBALS['phpgw']->common->phpgw_header(); - echo parse_navbar(); $this->template = CreateObject('phpgwapi.Template',$GLOBALS['phpgw']->common->get_tpl_dir($acl_app)); $templates = Array ( diff --git a/preferences/inc/class.uicategories.inc.php b/preferences/inc/class.uicategories.inc.php index 969da83062..b8a094e8e9 100644 --- a/preferences/inc/class.uicategories.inc.php +++ b/preferences/inc/class.uicategories.inc.php @@ -103,7 +103,6 @@ } $GLOBALS['phpgw']->common->phpgw_header(); - echo parse_navbar(); $this->t->set_file(array('cat_list_t' => 'listcats.tpl', 'data_column' => 'listcats.tpl')); @@ -274,7 +273,6 @@ ); $GLOBALS['phpgw']->common->phpgw_header(); - echo parse_navbar(); $new_parent = get_var('new_parent',Array('POST')); $submit = get_var('submit',Array('POST')); @@ -387,7 +385,6 @@ } $GLOBALS['phpgw']->common->phpgw_header(); - echo parse_navbar(); $new_parent = get_var('new_parent',Array('POST')); $submit = get_var('submit',Array('POST')); @@ -536,7 +533,6 @@ $nolink = $GLOBALS['phpgw']->link('/index.php',$link_data); $GLOBALS['phpgw']->common->phpgw_header(); - echo parse_navbar(); $this->t->set_var('deleteheader',lang('Are you sure you want to delete this category ?')); diff --git a/preferences/preferences.php b/preferences/preferences.php index eacc3fdb76..01423c2e6c 100755 --- a/preferences/preferences.php +++ b/preferences/preferences.php @@ -279,7 +279,6 @@ } $GLOBALS['phpgw']->common->phpgw_header(); - echo parse_navbar(); if ($GLOBALS['appname'] == 'preferences') {