| [ Index ] |
|
Code source de eGroupWare 1.2.106-2 |
1 <?php 2 /**************************************************************************\ 3 * eGroupWare - administration * 4 * http://www.egroupware.org * 5 * Written by Joseph Engo <jengo@phpgroupware.org> * 6 * Modified by Stephen Brown <steve@dataclarity.net> * 7 * to distribute admin across the application directories * 8 * -------------------------------------------- * 9 * This program is free software; you can redistribute it and/or modify it * 10 * under the terms of the GNU General Public License as published by the * 11 * Free Software Foundation; either version 2 of the License, or (at your * 12 * option) any later version. * 13 \**************************************************************************/ 14 15 /* $Id: index.php 20295 2006-02-15 12:31:25Z $ */ 16 17 $GLOBALS['egw_info'] = array( 18 'flags' => array( 19 'currentapp' => 'admin', 20 ), 21 ); 22 include('../header.inc.php'); 23 24 $GLOBALS['admin_tpl'] =& CreateObject('phpgwapi.Template',EGW_APP_TPL); 25 $GLOBALS['admin_tpl']->set_file( 26 Array( 27 'admin' => 'index.tpl' 28 ) 29 ); 30 31 $GLOBALS['admin_tpl']->set_block('admin','list'); 32 $GLOBALS['admin_tpl']->set_block('admin','app_row'); 33 $GLOBALS['admin_tpl']->set_block('admin','app_row_noicon'); 34 $GLOBALS['admin_tpl']->set_block('admin','link_row'); 35 $GLOBALS['admin_tpl']->set_block('admin','spacer_row'); 36 37 $GLOBALS['admin_tpl']->set_var('title',lang('Administration')); 38 39 // This func called by the includes to dump a row header 40 function section_start($appname='',$icon='') 41 { 42 $GLOBALS['admin_tpl']->set_var('link_backcolor',$GLOBALS['egw_info']['theme']['row_off']); 43 $GLOBALS['admin_tpl']->set_var('app_name',$GLOBALS['egw_info']['apps'][$appname]['title']); 44 $GLOBALS['admin_tpl']->set_var('a_name',$appname); 45 $GLOBALS['admin_tpl']->set_var('app_icon',$icon); 46 if ($icon) 47 { 48 $GLOBALS['admin_tpl']->parse('rows','app_row',True); 49 } 50 else 51 { 52 $GLOBALS['admin_tpl']->parse('rows','app_row_noicon',True); 53 } 54 } 55 56 function section_item($pref_link='',$pref_text='') 57 { 58 $GLOBALS['admin_tpl']->set_var('pref_link',$pref_link); 59 $GLOBALS['admin_tpl']->set_var('pref_text',$pref_text); 60 $GLOBALS['admin_tpl']->parse('rows','link_row',True); 61 } 62 63 function section_end() 64 { 65 $GLOBALS['admin_tpl']->parse('rows','spacer_row',True); 66 } 67 68 function display_section($appname,$file,$file2=False) 69 { 70 if ($file2) 71 { 72 $file = $file2; 73 } 74 if(is_array($file)) 75 { 76 section_start($appname, 77 $GLOBALS['egw']->common->image( 78 $appname, 79 Array( 80 'navbar', 81 $appname, 82 'nonav' 83 ) 84 ) 85 ); 86 87 while(list($text,$url) = each($file)) 88 { 89 // If user doesn't have application configuration access, then don't show the configuration links 90 if (strpos($url, 'admin.uiconfig') === False || !$GLOBALS['egw']->acl->check('site_config_access',1,'admin')) 91 { 92 section_item($url,lang($text)); 93 } 94 } 95 section_end(); 96 } 97 } 98 99 $GLOBALS['egw']->hooks->process('admin'); 100 $GLOBALS['admin_tpl']->pparse('out','list'); 101 102 $GLOBALS['egw']->common->egw_footer(); 103 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
| Généré le : Sun Feb 25 17:20:01 2007 | par Balluche grâce à PHPXref 0.7 |