[2] | 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 | } |
---|
[1684] | 32 | /* |
---|
[2] | 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 | } |
---|
[89] | 37 | */ |
---|
[2] | 38 | if (! $GLOBALS['phpgw']->acl->check('applications_access',1,'admin')) |
---|
| 39 | { |
---|
| 40 | $file['Applications'] = $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiapplications.get_list'); |
---|
| 41 | } |
---|
| 42 | |
---|
| 43 | if (! $GLOBALS['phpgw']->acl->check('global_categories_access',1,'admin')) |
---|
| 44 | { |
---|
| 45 | $file['Global Categories'] = $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uicategories.index'); |
---|
| 46 | } |
---|
| 47 | |
---|
| 48 | if (!$GLOBALS['phpgw']->acl->check('mainscreen_message_access',1,'admin') || !$GLOBALS['phpgw']->acl->check('mainscreen_message_access',2,'admin')) |
---|
| 49 | { |
---|
| 50 | $file['Change Main Screen Message'] = $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uimainscreen.index'); |
---|
| 51 | } |
---|
| 52 | |
---|
| 53 | if (! $GLOBALS['phpgw']->acl->check('current_sessions_access',1,'admin')) |
---|
| 54 | { |
---|
| 55 | $file['View Sessions'] = $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uicurrentsessions.list_sessions'); |
---|
| 56 | } |
---|
| 57 | |
---|
| 58 | if (! $GLOBALS['phpgw']->acl->check('access_log_access',1,'admin')) |
---|
| 59 | { |
---|
| 60 | $file['View Access Log'] = $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiaccess_history.list_history'); |
---|
| 61 | } |
---|
| 62 | |
---|
| 63 | if (! $GLOBALS['phpgw']->acl->check('error_log_access',1,'admin')) |
---|
| 64 | { |
---|
| 65 | $file['View Error Log'] = $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uilog.list_log'); |
---|
| 66 | } |
---|
| 67 | |
---|
| 68 | if (! $GLOBALS['phpgw']->acl->check('applications_access',16,'admin')) |
---|
| 69 | { |
---|
| 70 | $file['Find and Register all Application Hooks'] = $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiapplications.register_all_hooks'); |
---|
| 71 | } |
---|
| 72 | |
---|
| 73 | if (! $GLOBALS['phpgw']->acl->check('asyncservice_access',1,'admin')) |
---|
| 74 | { |
---|
| 75 | $file['Asynchronous timed services'] = $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiasyncservice.index'); |
---|
| 76 | } |
---|
| 77 | |
---|
| 78 | if (! $GLOBALS['phpgw']->acl->check('info_access',1,'admin')) |
---|
| 79 | { |
---|
| 80 | $file['phpInfo'] = "javascript:openwindow('" . $GLOBALS['phpgw']->link('/admin/phpinfo.php') . "')"; |
---|
| 81 | } |
---|
| 82 | |
---|
| 83 | display_sidebox($appname,$menu_title,$file); |
---|
| 84 | } |
---|