egroupware/preferences/index.php

77 lines
2.4 KiB
PHP
Raw Normal View History

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(
2001-05-11 23:18:59 +02:00
'T_index_out' => 'index.tpl',
2001-05-11 19:19:20 +02:00
));
2000-08-18 05:24:22 +02:00
2001-05-11 23:18:59 +02:00
$pref_tpl->set_block('T_index_out','B_icon_cell','V_icon_cell');
$pref_tpl->set_block('T_index_out','B_link_cell','V_link_cell');
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;
2001-05-11 23:18:59 +02:00
$pref_tpl->set_var('icon_backcolor',$phpgw_info['theme']['row_off']);
$pref_tpl->set_var('link_backcolor',$phpgw_info['theme']['row_off']);
2001-05-11 19:19:20 +02:00
$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 23:18:59 +02:00
$pref_tpl->parse('V_icon_cell','B_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','&nbsp;');
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
}
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);
2001-05-11 23:18:59 +02:00
$pref_tpl->parse('V_link_cell','B_link_cell',True);
2001-05-11 19:19:20 +02:00
$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;
2001-05-11 23:18:59 +02:00
$pref_tpl->pparse('out','T_index_out');
2001-05-11 19:19:20 +02:00
$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();
?>