2000-08-18 05:24:22 +02:00
|
|
|
<?php
|
2001-03-09 00:32:22 +01:00
|
|
|
/**************************************************************************\
|
|
|
|
* phpGroupWare - administration *
|
|
|
|
* http://www.phpgroupware.org *
|
2002-11-15 01:18:55 +01:00
|
|
|
* Written by coreteam <phpgroupware-developers@gnu.org> *
|
|
|
|
* & 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. *
|
2001-03-09 00:32:22 +01:00
|
|
|
\**************************************************************************/
|
|
|
|
/* $Id$ */
|
2000-08-18 05:24:22 +02:00
|
|
|
|
2001-12-05 17:19:12 +01:00
|
|
|
$GLOBALS['phpgw_info'] = array();
|
|
|
|
$GLOBALS['phpgw_info']['flags']['currentapp'] = 'admin';
|
2001-03-09 00:32:22 +01:00
|
|
|
include('../header.inc.php');
|
2001-02-06 18:13:48 +01:00
|
|
|
|
2002-11-15 01:18:55 +01:00
|
|
|
$GLOBALS['phpgw']->template->set_file(Array('admin' => 'index.tpl'));
|
2001-05-16 07:12:20 +02:00
|
|
|
|
2002-11-15 01:18:55 +01:00
|
|
|
$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');
|
2001-05-16 07:12:20 +02:00
|
|
|
|
2002-11-15 01:18:55 +01:00
|
|
|
$GLOBALS['phpgw']->template->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
|
2002-11-03 02:03:07 +01:00
|
|
|
function section_start($appname='',$icon='')
|
2001-03-09 00:32:22 +01:00
|
|
|
{
|
2003-03-27 12:06:33 +01:00
|
|
|
$GLOBALS['phpgw']->template->set_var('app_title',$GLOBALS['phpgw_info']['apps'][$appname]['title']);
|
2002-11-15 01:18:55 +01:00
|
|
|
$GLOBALS['phpgw']->template->set_var('app_name',$appname);
|
|
|
|
$GLOBALS['phpgw']->template->set_var('app_icon',$icon);
|
2001-03-09 00:32:22 +01:00
|
|
|
if ($icon)
|
|
|
|
{
|
2002-11-15 01:18:55 +01:00
|
|
|
$GLOBALS['phpgw']->template->parse('rows','app_row',True);
|
2001-03-09 00:32:22 +01:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2002-11-15 01:18:55 +01:00
|
|
|
$GLOBALS['phpgw']->template->parse('rows','app_row_noicon',True);
|
2002-06-29 17:59:37 +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
|
|
|
{
|
2002-11-15 01:18:55 +01:00
|
|
|
$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);
|
2002-06-29 17:59:37 +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
|
|
|
{
|
2002-11-15 01:18:55 +01:00
|
|
|
$GLOBALS['phpgw']->template->parse('rows','spacer_row',True);
|
2001-03-09 00:32:22 +01:00
|
|
|
}
|
2000-09-25 22:47:40 +02:00
|
|
|
|
2003-03-27 12:06:33 +01:00
|
|
|
function display_section($appname,$file,$file2=False)
|
2001-05-24 03:13:09 +02:00
|
|
|
{
|
2003-03-27 12:06:33 +01:00
|
|
|
if ($file2)
|
|
|
|
{
|
|
|
|
$file = $file2;
|
|
|
|
}
|
2002-06-29 17:59:37 +02:00
|
|
|
if(is_array($file))
|
2001-05-24 03:13:09 +02:00
|
|
|
{
|
2002-11-03 02:03:07 +01:00
|
|
|
section_start($appname,
|
2002-11-04 01:50:18 +01:00
|
|
|
$GLOBALS['phpgw']->common->image($appname,'navbar','',True)
|
2002-06-29 17:59:37 +02:00
|
|
|
);
|
|
|
|
|
2002-11-04 01:55:07 +01:00
|
|
|
while(is_array($file) && list($text,$url) = each($file))
|
2002-06-29 17:59:37 +02:00
|
|
|
{
|
|
|
|
section_item($url,lang($text));
|
|
|
|
}
|
|
|
|
section_end();
|
2001-05-24 03:13:09 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2002-01-02 15:33:05 +01:00
|
|
|
$GLOBALS['phpgw']->hooks->process('admin');
|
2002-11-03 02:03:07 +01:00
|
|
|
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array
|
|
|
|
(
|
2002-11-15 01:18:55 +01:00
|
|
|
'body_data' => $GLOBALS['phpgw']->template->parse('out','list')
|
2002-10-26 13:25:14 +02:00
|
|
|
));
|
2001-05-24 03:13:09 +02:00
|
|
|
?>
|