2000-08-18 05:24:22 +02:00
|
|
|
<?php
|
2001-03-08 10:56:18 +01:00
|
|
|
/**************************************************************************\
|
|
|
|
* phpGroupWare - preferences *
|
|
|
|
* http://www.phpgroupware.org *
|
|
|
|
* Written by Joseph Engo <jengo@phpgroupware.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. *
|
|
|
|
\**************************************************************************/
|
2000-08-18 05:24:22 +02:00
|
|
|
|
2001-03-08 10:56:18 +01:00
|
|
|
/* $Id$ */
|
2000-08-18 05:24:22 +02:00
|
|
|
|
2001-03-08 10:56:18 +01:00
|
|
|
$phpgw_info['flags']['currentapp'] = 'preferences';
|
|
|
|
include('../header.inc.php');
|
2001-05-11 20:43:47 +02:00
|
|
|
|
|
|
|
$pref_tpl = CreateObject('phpgwapi.Template',PHPGW_APP_TPL);
|
2001-05-11 19:19:20 +02:00
|
|
|
$pref_tpl->set_file(array(
|
|
|
|
'T_icon_cell' => 'index_icon_cell.tpl',
|
|
|
|
'T_link_cell' => 'index_link_cell.tpl',
|
|
|
|
'index_out' => 'index.tpl',
|
|
|
|
));
|
2000-08-18 05:24:22 +02:00
|
|
|
|
2001-03-08 10:56:18 +01:00
|
|
|
// This func called by the includes to dump a row header
|
|
|
|
function section_start($name='',$icon='')
|
|
|
|
{
|
2001-05-11 19:19:20 +02:00
|
|
|
global $phpgw,$phpgw_info, $loopnum, $pref_tpl;
|
|
|
|
|
|
|
|
$pref_tpl->set_var('icon_backcolor',$phpgw_info["theme"]["row_off"]);
|
|
|
|
$pref_tpl->set_var('link_backcolor',$phpgw_info["theme"]["row_off"]);
|
|
|
|
$pref_tpl->set_var('app_name',lang($name));
|
|
|
|
$pref_tpl->set_var('app_icon',$icon);
|
2001-03-08 10:56:18 +01:00
|
|
|
if ($icon)
|
|
|
|
{
|
2001-05-11 19:19:20 +02:00
|
|
|
$pref_tpl->parse('V_icon_cell','T_icon_cell');
|
2001-03-08 10:56:18 +01:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2001-05-11 19:19:20 +02:00
|
|
|
$pref_tpl->set_var('V_icon_cell',' ');
|
2001-03-08 10:56:18 +01:00
|
|
|
}
|
2001-05-11 19:19:20 +02:00
|
|
|
|
|
|
|
// prepare an iteration variable for section_item to know when to add a <br>
|
|
|
|
$loopnum = 1;
|
2001-03-08 10:56:18 +01:00
|
|
|
}
|
2000-09-23 03:25:17 +02:00
|
|
|
|
2001-05-11 19:19:20 +02:00
|
|
|
function section_item($pref_link='',$pref_text='')
|
|
|
|
{
|
|
|
|
global $phpgw,$phpgw_info, $loopnum, $pref_tpl;
|
|
|
|
if ($loopnum > 1)
|
|
|
|
{
|
|
|
|
$pref_tpl->set_var('insert_br','<br>');
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
$pref_tpl->set_var('insert_br','');
|
|
|
|
}
|
|
|
|
|
|
|
|
$pref_tpl->set_var('pref_link',$pref_link);
|
|
|
|
$pref_tpl->set_var('pref_text',$pref_text);
|
|
|
|
$pref_tpl->parse('V_link_cell','T_link_cell',True);
|
|
|
|
$loopnum = $loopnum + 1;
|
|
|
|
}
|
|
|
|
|
2001-03-08 10:56:18 +01:00
|
|
|
function section_end()
|
|
|
|
{
|
2001-05-11 19:19:20 +02:00
|
|
|
global $phpgw,$phpgw_info, $pref_tpl;
|
|
|
|
$pref_tpl->pparse('out','index_out');
|
|
|
|
$pref_tpl->set_var('V_icon_cell','');
|
|
|
|
$pref_tpl->set_var('V_link_cell','');
|
2001-03-08 10:56:18 +01:00
|
|
|
}
|
2000-12-15 22:56:09 +01:00
|
|
|
|
2001-03-08 10:56:18 +01:00
|
|
|
$phpgw->common->hook();
|
|
|
|
|
|
|
|
$phpgw->common->phpgw_footer();
|
|
|
|
?>
|