2000-08-18 05:24:22 +02:00
|
|
|
<?php
|
2001-03-09 00:32:22 +01:00
|
|
|
/**************************************************************************\
|
2004-01-25 23:08:51 +01:00
|
|
|
* eGroupWare - administration *
|
|
|
|
* http://www.egroupware.org *
|
2003-08-28 16:16:30 +02:00
|
|
|
* 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. *
|
2001-03-09 00:32:22 +01:00
|
|
|
\**************************************************************************/
|
2003-08-28 16:16:30 +02:00
|
|
|
|
2001-03-09 00:32:22 +01:00
|
|
|
/* $Id$ */
|
2000-08-18 05:24:22 +02:00
|
|
|
|
2005-10-14 19:03:16 +02:00
|
|
|
$GLOBALS['egw_info'] = array(
|
|
|
|
'flags' => array(
|
|
|
|
'currentapp' => 'admin',
|
2009-11-18 09:28:54 +01:00
|
|
|
'noheader' => true,
|
2005-10-14 19:03:16 +02:00
|
|
|
),
|
|
|
|
);
|
2001-03-09 00:32:22 +01:00
|
|
|
include('../header.inc.php');
|
2001-02-06 18:13:48 +01:00
|
|
|
|
2009-11-17 15:55:38 +01:00
|
|
|
admin_statistics::check();
|
|
|
|
common::egw_header();
|
|
|
|
|
2005-10-14 19:03:16 +02:00
|
|
|
$GLOBALS['admin_tpl'] =& CreateObject('phpgwapi.Template',EGW_APP_TPL);
|
2003-08-28 16:16:30 +02:00
|
|
|
$GLOBALS['admin_tpl']->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['admin_tpl']->set_var('title',lang('Administration'));
|
|
|
|
|
|
|
|
// This func called by the includes to dump a row header
|
|
|
|
function section_start($appname='',$icon='')
|
|
|
|
{
|
2005-10-14 19:03:16 +02:00
|
|
|
$GLOBALS['admin_tpl']->set_var('link_backcolor',$GLOBALS['egw_info']['theme']['row_off']);
|
|
|
|
$GLOBALS['admin_tpl']->set_var('app_name',$GLOBALS['egw_info']['apps'][$appname]['title']);
|
2003-08-28 16:16:30 +02:00
|
|
|
$GLOBALS['admin_tpl']->set_var('a_name',$appname);
|
|
|
|
$GLOBALS['admin_tpl']->set_var('app_icon',$icon);
|
|
|
|
if ($icon)
|
|
|
|
{
|
|
|
|
$GLOBALS['admin_tpl']->parse('rows','app_row',True);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
$GLOBALS['admin_tpl']->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);
|
|
|
|
}
|
|
|
|
|
|
|
|
function section_end()
|
|
|
|
{
|
|
|
|
$GLOBALS['admin_tpl']->parse('rows','spacer_row',True);
|
|
|
|
}
|
|
|
|
|
|
|
|
function display_section($appname,$file,$file2=False)
|
|
|
|
{
|
|
|
|
if ($file2)
|
|
|
|
{
|
|
|
|
$file = $file2;
|
|
|
|
}
|
|
|
|
if(is_array($file))
|
|
|
|
{
|
|
|
|
section_start($appname,
|
2005-10-14 19:03:16 +02:00
|
|
|
$GLOBALS['egw']->common->image(
|
2003-08-28 16:16:30 +02:00
|
|
|
$appname,
|
|
|
|
Array(
|
|
|
|
'navbar',
|
|
|
|
$appname,
|
|
|
|
'nonav'
|
|
|
|
)
|
|
|
|
)
|
|
|
|
);
|
|
|
|
|
|
|
|
while(list($text,$url) = each($file))
|
|
|
|
{
|
2004-09-10 19:51:28 +02:00
|
|
|
// If user doesn't have application configuration access, then don't show the configuration links
|
2005-10-14 19:03:16 +02:00
|
|
|
if (strpos($url, 'admin.uiconfig') === False || !$GLOBALS['egw']->acl->check('site_config_access',1,'admin'))
|
2004-09-10 19:51:28 +02:00
|
|
|
{
|
|
|
|
section_item($url,lang($text));
|
|
|
|
}
|
2003-08-28 16:16:30 +02:00
|
|
|
}
|
|
|
|
section_end();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2005-10-14 19:03:16 +02:00
|
|
|
$GLOBALS['egw']->hooks->process('admin');
|
2003-08-28 16:16:30 +02:00
|
|
|
$GLOBALS['admin_tpl']->pparse('out','list');
|
|
|
|
|
2005-10-14 19:03:16 +02:00
|
|
|
$GLOBALS['egw']->common->egw_footer();
|
2001-05-24 03:13:09 +02:00
|
|
|
?>
|