2003-08-28 16:16:30 +02:00
|
|
|
<?php
|
|
|
|
/**************************************************************************\
|
2004-01-27 00:26:19 +01:00
|
|
|
* eGroupWare *
|
|
|
|
* http://www.egroupware.org *
|
2003-08-28 16:16:30 +02:00
|
|
|
* Written by Pim Snel <pim@lingewoud.nl> *
|
|
|
|
* -------------------------------------------- *
|
|
|
|
* 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. *
|
|
|
|
\**************************************************************************/
|
|
|
|
|
|
|
|
/* $Id$ */
|
|
|
|
{
|
|
|
|
|
|
|
|
/*
|
|
|
|
This hookfile is for generating an app-specific side menu used in the idots
|
|
|
|
template set.
|
|
|
|
|
|
|
|
$menu_title speaks for itself
|
|
|
|
$file is the array with link to app functions
|
|
|
|
|
|
|
|
display_sidebox can be called as much as you like
|
|
|
|
*/
|
|
|
|
|
2005-10-14 19:03:16 +02:00
|
|
|
$menu_title = $GLOBALS['egw_info']['apps'][$appname]['title'] . ' '. lang('Menu');
|
2003-08-28 16:16:30 +02:00
|
|
|
$file = array();
|
|
|
|
|
2005-10-14 19:03:16 +02:00
|
|
|
if (! $GLOBALS['egw']->acl->check('site_config_access',1,'admin'))
|
2003-08-28 16:16:30 +02:00
|
|
|
{
|
2005-10-14 19:03:16 +02:00
|
|
|
$file['Site Configuration'] = $GLOBALS['egw']->link('/index.php','menuaction=admin.uiconfig.index&appname=admin');
|
2003-08-28 16:16:30 +02:00
|
|
|
}
|
|
|
|
/*
|
2005-10-14 19:03:16 +02:00
|
|
|
if (! $GLOBALS['egw']->acl->check('peer_server_access',1,'admin'))
|
2003-08-28 16:16:30 +02:00
|
|
|
{
|
2005-10-14 19:03:16 +02:00
|
|
|
$file['Peer Servers'] = $GLOBALS['egw']->link('/index.php','menuaction=admin.uiserver.list_servers');
|
2003-08-28 16:16:30 +02:00
|
|
|
}
|
|
|
|
*/
|
2005-10-14 19:03:16 +02:00
|
|
|
if (! $GLOBALS['egw']->acl->check('account_access',1,'admin'))
|
2003-08-28 16:16:30 +02:00
|
|
|
{
|
2005-10-14 19:03:16 +02:00
|
|
|
$file['User Accounts'] = $GLOBALS['egw']->link('/index.php','menuaction=admin.uiaccounts.list_users');
|
2003-08-28 16:16:30 +02:00
|
|
|
}
|
|
|
|
|
2005-10-14 19:03:16 +02:00
|
|
|
if (! $GLOBALS['egw']->acl->check('group_access',1,'admin'))
|
2003-08-28 16:16:30 +02:00
|
|
|
{
|
2005-10-14 19:03:16 +02:00
|
|
|
$file['User Groups'] = $GLOBALS['egw']->link('/index.php','menuaction=admin.uiaccounts.list_groups');
|
2003-08-28 16:16:30 +02:00
|
|
|
}
|
|
|
|
|
2005-10-14 19:03:16 +02:00
|
|
|
if (! $GLOBALS['egw']->acl->check('applications_access',1,'admin'))
|
2003-08-28 16:16:30 +02:00
|
|
|
{
|
2005-10-14 19:03:16 +02:00
|
|
|
$file['Applications'] = $GLOBALS['egw']->link('/index.php','menuaction=admin.uiapplications.get_list');
|
2003-08-28 16:16:30 +02:00
|
|
|
}
|
|
|
|
|
2005-10-14 19:03:16 +02:00
|
|
|
if (! $GLOBALS['egw']->acl->check('global_categories_access',1,'admin'))
|
2003-08-28 16:16:30 +02:00
|
|
|
{
|
2005-10-14 19:03:16 +02:00
|
|
|
$file['Global Categories'] = $GLOBALS['egw']->link('/index.php','menuaction=admin.uicategories.index');
|
2003-08-28 16:16:30 +02:00
|
|
|
}
|
|
|
|
|
2005-10-14 19:03:16 +02:00
|
|
|
if (!$GLOBALS['egw']->acl->check('mainscreen_message_access',1,'admin') || !$GLOBALS['egw']->acl->check('mainscreen_message_access',2,'admin'))
|
2003-08-28 16:16:30 +02:00
|
|
|
{
|
2005-10-14 19:03:16 +02:00
|
|
|
$file['Change Main Screen Message'] = $GLOBALS['egw']->link('/index.php','menuaction=admin.uimainscreen.index');
|
2003-08-28 16:16:30 +02:00
|
|
|
}
|
|
|
|
|
2005-10-14 19:03:16 +02:00
|
|
|
if (! $GLOBALS['egw']->acl->check('current_sessions_access',1,'admin'))
|
2003-08-28 16:16:30 +02:00
|
|
|
{
|
2005-10-14 19:03:16 +02:00
|
|
|
$file['View Sessions'] = $GLOBALS['egw']->link('/index.php','menuaction=admin.uicurrentsessions.list_sessions');
|
2003-08-28 16:16:30 +02:00
|
|
|
}
|
|
|
|
|
2005-10-14 19:03:16 +02:00
|
|
|
if (! $GLOBALS['egw']->acl->check('access_log_access',1,'admin'))
|
2003-08-28 16:16:30 +02:00
|
|
|
{
|
2005-10-14 19:03:16 +02:00
|
|
|
$file['View Access Log'] = $GLOBALS['egw']->link('/index.php','menuaction=admin.uiaccess_history.list_history');
|
2003-08-28 16:16:30 +02:00
|
|
|
}
|
|
|
|
|
2005-10-14 19:03:16 +02:00
|
|
|
if (! $GLOBALS['egw']->acl->check('error_log_access',1,'admin'))
|
2003-08-28 16:16:30 +02:00
|
|
|
{
|
2005-10-14 19:03:16 +02:00
|
|
|
$file['View Error Log'] = $GLOBALS['egw']->link('/index.php','menuaction=admin.uilog.list_log');
|
2003-08-28 16:16:30 +02:00
|
|
|
}
|
|
|
|
|
2005-10-14 19:03:16 +02:00
|
|
|
if (! $GLOBALS['egw']->acl->check('applications_access',16,'admin'))
|
2003-08-28 16:16:30 +02:00
|
|
|
{
|
2005-10-14 19:03:16 +02:00
|
|
|
$file['Find and Register all Application Hooks'] = $GLOBALS['egw']->link('/index.php','menuaction=admin.uiapplications.register_all_hooks');
|
2003-08-28 16:16:30 +02:00
|
|
|
}
|
|
|
|
|
2005-10-14 19:03:16 +02:00
|
|
|
if (! $GLOBALS['egw']->acl->check('asyncservice_access',1,'admin'))
|
2003-08-28 16:16:30 +02:00
|
|
|
{
|
2005-10-14 19:03:16 +02:00
|
|
|
$file['Asynchronous timed services'] = $GLOBALS['egw']->link('/index.php','menuaction=admin.uiasyncservice.index');
|
2003-08-28 16:16:30 +02:00
|
|
|
}
|
|
|
|
|
2005-10-14 19:03:16 +02:00
|
|
|
if (! $GLOBALS['egw']->acl->check('db_backup_access',1,'admin'))
|
2004-10-16 01:06:34 +02:00
|
|
|
{
|
2005-10-14 19:03:16 +02:00
|
|
|
$file['DB backup and restore'] = $GLOBALS['egw']->link('/index.php','menuaction=admin.admin_db_backup.index');
|
2004-10-16 01:06:34 +02:00
|
|
|
}
|
|
|
|
|
2005-10-14 19:03:16 +02:00
|
|
|
if (! $GLOBALS['egw']->acl->check('info_access',1,'admin'))
|
2003-08-28 16:16:30 +02:00
|
|
|
{
|
2005-10-14 19:03:16 +02:00
|
|
|
$file['phpInfo'] = "javascript:openwindow('" . $GLOBALS['egw']->link('/admin/phpinfo.php') . "')";
|
2003-08-28 16:16:30 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
display_sidebox($appname,$menu_title,$file);
|
|
|
|
}
|