[763] | 1 | <?php |
---|
| 2 | /**************************************************************************\ |
---|
| 3 | * eGroupWare * |
---|
| 4 | * http://www.egroupware.org * |
---|
| 5 | * Written by Pim Snel <pim@lingewoud.nl> * |
---|
| 6 | * -------------------------------------------- * |
---|
| 7 | * This program is free software; you can redistribute it and/or modify it * |
---|
| 8 | * under the terms of the GNU General Public License as published by the * |
---|
| 9 | * Free Software Foundation; either version 2 of the License, or (at your * |
---|
| 10 | * option) any later version. * |
---|
| 11 | \**************************************************************************/ |
---|
| 12 | |
---|
| 13 | { |
---|
| 14 | |
---|
| 15 | /* |
---|
| 16 | This hookfile is for generating an app-specific side menu used in the idots |
---|
| 17 | template set. |
---|
| 18 | |
---|
| 19 | $menu_title speaks for itself |
---|
| 20 | $file is the array with link to app functions |
---|
| 21 | |
---|
| 22 | display_sidebox can be called as much as you like |
---|
| 23 | */ |
---|
| 24 | |
---|
| 25 | $menu_title = $GLOBALS['phpgw_info']['apps'][$appname]['title'] . ' '. lang('Menu'); |
---|
| 26 | $file = array(); |
---|
| 27 | |
---|
| 28 | if (! $GLOBALS['phpgw']->acl->check('site_config_access',1,'admin')) |
---|
| 29 | { |
---|
| 30 | $file['Site Configuration'] = $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiconfig.index&appname=admin'); |
---|
| 31 | } |
---|
| 32 | /* |
---|
| 33 | if (! $GLOBALS['phpgw']->acl->check('peer_server_access',1,'admin')) |
---|
| 34 | { |
---|
| 35 | $file['Peer Servers'] = $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiserver.list_servers'); |
---|
| 36 | } |
---|
| 37 | if (! $GLOBALS['phpgw']->acl->check('account_access',1,'admin')) |
---|
| 38 | { |
---|
| 39 | $file['User Accounts'] = $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiaccounts.list_users'); |
---|
| 40 | } |
---|
| 41 | |
---|
| 42 | if (! $GLOBALS['phpgw']->acl->check('group_access',1,'admin')) |
---|
| 43 | { |
---|
| 44 | $file['User Groups'] = $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiaccounts.list_groups'); |
---|
| 45 | } |
---|
| 46 | */ |
---|
| 47 | if (! $GLOBALS['phpgw']->acl->check('applications_access',1,'admin')) |
---|
| 48 | { |
---|
| 49 | $file['Applications'] = $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiapplications.get_list'); |
---|
| 50 | } |
---|
| 51 | |
---|
| 52 | if (! $GLOBALS['phpgw']->acl->check('global_categories_access',1,'admin')) |
---|
| 53 | { |
---|
| 54 | $file['Global Categories'] = $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uicategories.index'); |
---|
| 55 | } |
---|
| 56 | |
---|
| 57 | if (!$GLOBALS['phpgw']->acl->check('mainscreen_message_access',1,'admin') || !$GLOBALS['phpgw']->acl->check('mainscreen_message_access',2,'admin')) |
---|
| 58 | { |
---|
| 59 | $file['Change Main Screen Message'] = $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uimainscreen.index'); |
---|
| 60 | } |
---|
| 61 | |
---|
| 62 | if (! $GLOBALS['phpgw']->acl->check('current_sessions_access',1,'admin')) |
---|
| 63 | { |
---|
| 64 | $file['View Sessions'] = $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uicurrentsessions.list_sessions'); |
---|
| 65 | } |
---|
| 66 | |
---|
| 67 | if (! $GLOBALS['phpgw']->acl->check('access_log_access',1,'admin')) |
---|
| 68 | { |
---|
| 69 | $file['View Access Log'] = $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiaccess_history.list_history'); |
---|
| 70 | } |
---|
| 71 | |
---|
| 72 | if (! $GLOBALS['phpgw']->acl->check('error_log_access',1,'admin')) |
---|
| 73 | { |
---|
| 74 | $file['View Error Log'] = $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uilog.list_log'); |
---|
| 75 | } |
---|
| 76 | |
---|
| 77 | if (! $GLOBALS['phpgw']->acl->check('applications_access',16,'admin')) |
---|
| 78 | { |
---|
| 79 | $file['Find and Register all Application Hooks'] = $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiapplications.register_all_hooks'); |
---|
| 80 | } |
---|
| 81 | |
---|
| 82 | if (! $GLOBALS['phpgw']->acl->check('asyncservice_access',1,'admin')) |
---|
| 83 | { |
---|
| 84 | $file['Asynchronous timed services'] = $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiasyncservice.index'); |
---|
| 85 | } |
---|
| 86 | |
---|
| 87 | if (! $GLOBALS['phpgw']->acl->check('info_access',1,'admin')) |
---|
| 88 | { |
---|
| 89 | $file['phpInfo'] = "javascript:openwindow('" . $GLOBALS['phpgw']->link('/admin/phpinfo.php') . "')"; |
---|
| 90 | } |
---|
| 91 | |
---|
| 92 | display_sidebox($appname,$menu_title,$file); |
---|
| 93 | } |
---|