diff --git a/admin/index.php b/admin/index.php index abc4984047..e01857b708 100755 --- a/admin/index.php +++ b/admin/index.php @@ -2,14 +2,14 @@ /**************************************************************************\ * phpGroupWare - administration * * http://www.phpgroupware.org * - * Written by Joseph Engo * - * Modified by Stephen Brown * - * to distribute admin across the application directories * - * -------------------------------------------- * - * 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. * + * Written by coreteam * + * & Stephen Brown * + * to distribute admin across the application directories * + * ------------------------------------------------------ * + * 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$ */ @@ -17,47 +17,42 @@ $GLOBALS['phpgw_info']['flags']['currentapp'] = 'admin'; include('../header.inc.php'); - $GLOBALS['admin_tpl'] = CreateObject('phpgwapi.Template',PHPGW_APP_TPL); - $GLOBALS['admin_tpl']->set_file( - Array( - 'admin' => 'index.tpl' - ) - ); + $GLOBALS['phpgw']->template->set_file(Array('admin' => 'index.tpl')); - $GLOBALS['admin_tpl']->set_block('admin','list'); - $GLOBALS['admin_tpl']->set_block('admin','app_row'); - $GLOBALS['admin_tpl']->set_block('admin','app_row_noicon'); - $GLOBALS['admin_tpl']->set_block('admin','link_row'); - $GLOBALS['admin_tpl']->set_block('admin','spacer_row'); + $GLOBALS['phpgw']->template->set_block('admin','list'); + $GLOBALS['phpgw']->template->set_block('admin','app_row'); + $GLOBALS['phpgw']->template->set_block('admin','app_row_noicon'); + $GLOBALS['phpgw']->template->set_block('admin','link_row'); + $GLOBALS['phpgw']->template->set_block('admin','spacer_row'); - $GLOBALS['admin_tpl']->set_var('title',lang('Administration')); + $GLOBALS['phpgw']->template->set_var('title',lang('Administration')); // This func called by the includes to dump a row header function section_start($appname='',$icon='') { - $GLOBALS['admin_tpl']->set_var('app_title',lang($appname)); - $GLOBALS['admin_tpl']->set_var('app_name',$appname); - $GLOBALS['admin_tpl']->set_var('app_icon',$icon); + $GLOBALS['phpgw']->template->set_var('app_title',lang($appname)); + $GLOBALS['phpgw']->template->set_var('app_name',$appname); + $GLOBALS['phpgw']->template->set_var('app_icon',$icon); if ($icon) { - $GLOBALS['admin_tpl']->parse('rows','app_row',True); + $GLOBALS['phpgw']->template->parse('rows','app_row',True); } else { - $GLOBALS['admin_tpl']->parse('rows','app_row_noicon',True); + $GLOBALS['phpgw']->template->parse('rows','app_row_noicon',True); } } function section_item($pref_link='',$pref_text='') { - $GLOBALS['admin_tpl']->set_var('pref_link',$pref_link); - $GLOBALS['admin_tpl']->set_var('pref_text',$pref_text); - $GLOBALS['admin_tpl']->parse('rows','link_row',True); + $GLOBALS['phpgw']->template->set_var('pref_link',$pref_link); + $GLOBALS['phpgw']->template->set_var('pref_text',$pref_text); + $GLOBALS['phpgw']->template->parse('rows','link_row',True); } function section_end() { - $GLOBALS['admin_tpl']->parse('rows','spacer_row',True); + $GLOBALS['phpgw']->template->parse('rows','spacer_row',True); } function display_section($appname,$file) @@ -79,6 +74,6 @@ $GLOBALS['phpgw']->hooks->process('admin'); $GLOBALS['phpgw']->xslttpl->set_var('phpgw',array ( - 'body_data' => $GLOBALS['admin_tpl']->parse('out','list') + 'body_data' => $GLOBALS['phpgw']->template->parse('out','list') )); ?> diff --git a/preferences/index.php b/preferences/index.php index a23296f3e2..9a648a7998 100755 --- a/preferences/index.php +++ b/preferences/index.php @@ -15,19 +15,13 @@ $GLOBALS['phpgw_info']['flags']['currentapp'] = 'preferences'; include('../header.inc.php'); - $GLOBALS['pref_tpl'] = CreateObject('phpgwapi.Template',PHPGW_APP_TPL); - $templates = Array - ( - 'pref' => 'index.tpl' - ); + $GLOBALS['phpgw']->template->set_file(Array('pref' => 'index.tpl')); - $GLOBALS['pref_tpl']->set_file($templates); - - $GLOBALS['pref_tpl']->set_block('pref','list'); - $GLOBALS['pref_tpl']->set_block('pref','app_row'); - $GLOBALS['pref_tpl']->set_block('pref','app_row_noicon'); - $GLOBALS['pref_tpl']->set_block('pref','link_row'); - $GLOBALS['pref_tpl']->set_block('pref','spacer_row'); + $GLOBALS['phpgw']->template->set_block('pref','list'); + $GLOBALS['phpgw']->template->set_block('pref','app_row'); + $GLOBALS['phpgw']->template->set_block('pref','app_row_noicon'); + $GLOBALS['phpgw']->template->set_block('pref','link_row'); + $GLOBALS['phpgw']->template->set_block('pref','spacer_row'); if ($GLOBALS['phpgw']->acl->check('run',1,'admin')) { @@ -74,31 +68,29 @@ case 'default': $selected = 1; break; case 'forced': $selected = 2; break; } - $GLOBALS['pref_tpl']->set_var('tabs',$GLOBALS['phpgw']->common->create_tabs($tabs,$selected)); + $GLOBALS['phpgw']->template->set_var('tabs',$GLOBALS['phpgw']->common->create_tabs($tabs,$selected)); } // This func called by the includes to dump a row header function section_start($appname='',$icon='') { - $GLOBALS['pref_tpl']->set_var('icon_backcolor',$GLOBALS['phpgw_info']['theme']['row_off']); -// $GLOBALS['pref_tpl']->set_var('link_backcolor',$GLOBALS['phpgw_info']['theme']['row_off']); - $GLOBALS['pref_tpl']->set_var('app_name',$appname); - $GLOBALS['pref_tpl']->set_var('app_title',lang($appname)); - $GLOBALS['pref_tpl']->set_var('app_icon',$icon); + $GLOBALS['phpgw']->template->set_var('app_name',$appname); + $GLOBALS['phpgw']->template->set_var('app_title',lang($appname)); + $GLOBALS['phpgw']->template->set_var('app_icon',$icon); if ($icon) { - $GLOBALS['pref_tpl']->parse('rows','app_row',True); + $GLOBALS['phpgw']->template->parse('rows','app_row',True); } else { - $GLOBALS['pref_tpl']->parse('rows','app_row_noicon',True); + $GLOBALS['phpgw']->template->parse('rows','app_row_noicon',True); } } function section_item($pref_link='',$pref_text='') { - $GLOBALS['pref_tpl']->set_var('pref_link',$pref_link); + $GLOBALS['phpgw']->template->set_var('pref_link',$pref_link); if (strtolower($pref_text) == 'grant access' && $GLOBALS['phpgw_info']['server']['deny_user_grants_access']) { @@ -106,15 +98,15 @@ } else { - $GLOBALS['pref_tpl']->set_var('pref_text',$pref_text); + $GLOBALS['phpgw']->template->set_var('pref_text',$pref_text); } - $GLOBALS['pref_tpl']->parse('rows','link_row',True); + $GLOBALS['phpgw']->template->parse('rows','link_row',True); } function section_end() { - $GLOBALS['pref_tpl']->parse('rows','spacer_row',True); + $GLOBALS['phpgw']->template->parse('rows','spacer_row',True); } function display_section($appname,$file) @@ -130,6 +122,6 @@ $GLOBALS['phpgw']->hooks->process('preferences',array('preferences')); $GLOBALS['phpgw']->xslttpl->set_var('phpgw',array( - 'body_data' => $GLOBALS['pref_tpl']->fp('out','list') + 'body_data' => $GLOBALS['phpgw']->template->parse('out','list') )); ?>