2000-08-18 05:24:22 +02:00
|
|
|
<?php
|
2001-03-09 00:32:22 +01:00
|
|
|
/**************************************************************************\
|
|
|
|
* phpGroupWare - administration *
|
|
|
|
* http://www.phpgroupware.org *
|
|
|
|
* Written by Joseph Engo <jengo@phpgroupware.org> *
|
|
|
|
* Modified by Stephen Brown <steve@dataclarity.net> *
|
|
|
|
* 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. *
|
|
|
|
\**************************************************************************/
|
2000-08-18 05:24:22 +02:00
|
|
|
|
2001-03-09 00:32:22 +01:00
|
|
|
/* $Id$ */
|
2000-08-18 05:24:22 +02:00
|
|
|
|
2001-03-09 00:32:22 +01:00
|
|
|
$phpgw_info['flags']['currentapp'] = 'admin';
|
|
|
|
include('../header.inc.php');
|
2001-02-06 18:13:48 +01:00
|
|
|
|
2001-11-21 04:22:08 +01:00
|
|
|
$GLOBALS['admin_tpl'] = CreateObject('phpgwapi.Template',PHPGW_APP_TPL);
|
|
|
|
$GLOBALS['admin_tpl']->set_file(
|
|
|
|
Array(
|
|
|
|
'admin' => 'index.tpl'
|
|
|
|
)
|
|
|
|
);
|
2001-05-16 07:12:20 +02:00
|
|
|
|
2001-11-21 04:22:08 +01:00
|
|
|
$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');
|
2001-05-16 07:12:20 +02:00
|
|
|
|
2001-11-21 04:22:08 +01:00
|
|
|
$GLOBALS['admin_tpl']->set_var('title',lang('Administration'));
|
2000-08-18 05:24:22 +02:00
|
|
|
|
2001-03-09 00:32:22 +01:00
|
|
|
// This func called by the includes to dump a row header
|
2001-05-31 21:10:13 +02:00
|
|
|
function section_start($name='',$icon='',$appname='')
|
2001-03-09 00:32:22 +01:00
|
|
|
{
|
2001-11-21 04:22:08 +01:00
|
|
|
$GLOBALS['admin_tpl']->set_var('icon_backcolor',$GLOBALS['phpgw_info']['theme']['row_off']);
|
|
|
|
$GLOBALS['admin_tpl']->set_var('link_backcolor',$GLOBALS['phpgw_info']['theme']['row_off']);
|
|
|
|
$GLOBALS['admin_tpl']->set_var('app_name',lang($name));
|
|
|
|
$GLOBALS['admin_tpl']->set_var('a_name',$appname);
|
|
|
|
$GLOBALS['admin_tpl']->set_var('app_icon',$icon);
|
2001-03-09 00:32:22 +01:00
|
|
|
if ($icon)
|
|
|
|
{
|
2001-11-21 04:22:08 +01:00
|
|
|
$GLOBALS['admin_tpl']->parse('rows','app_row',True);
|
2001-03-09 00:32:22 +01:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2001-11-21 04:22:08 +01:00
|
|
|
$GLOBALS['admin_tpl']->parse('rows','app_row_noicon',True);
|
2001-05-16 07:12:20 +02:00
|
|
|
}
|
2001-03-09 00:32:22 +01:00
|
|
|
}
|
2000-09-25 22:47:40 +02:00
|
|
|
|
2001-05-16 07:12:20 +02:00
|
|
|
function section_item($pref_link='',$pref_text='')
|
2001-03-09 00:32:22 +01:00
|
|
|
{
|
2001-11-21 04:22:08 +01:00
|
|
|
$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);
|
2001-05-16 07:12:20 +02:00
|
|
|
}
|
2001-03-09 00:32:22 +01:00
|
|
|
|
2001-05-16 07:12:20 +02:00
|
|
|
function section_end()
|
2001-03-09 00:32:22 +01:00
|
|
|
{
|
2001-11-21 04:22:08 +01:00
|
|
|
$GLOBALS['admin_tpl']->parse('rows','spacer_row',True);
|
2001-03-09 00:32:22 +01:00
|
|
|
}
|
2000-09-25 22:47:40 +02:00
|
|
|
|
2001-05-24 03:13:09 +02:00
|
|
|
function display_section($appname,$title,$file)
|
|
|
|
{
|
2001-11-21 04:22:08 +01:00
|
|
|
section_start($title,$GLOBALS['phpgw']->common->image($appname,Array('navbar.gif',$appname.'.gif')),$appname);
|
2001-05-24 03:13:09 +02:00
|
|
|
|
|
|
|
while(list($text,$url) = each($file))
|
|
|
|
{
|
|
|
|
section_item($url,lang($text));
|
|
|
|
}
|
|
|
|
section_end();
|
|
|
|
}
|
|
|
|
|
2001-11-21 04:22:08 +01:00
|
|
|
$GLOBALS['phpgw']->common->hook('admin');
|
|
|
|
$GLOBALS['admin_tpl']->pparse('out','list');
|
2001-05-16 07:12:20 +02:00
|
|
|
|
2001-11-21 04:22:08 +01:00
|
|
|
$GLOBALS['phpgw']->common->phpgw_footer();
|
2001-05-24 03:13:09 +02:00
|
|
|
?>
|