Changeset 19736
- Timestamp:
- Jan 3, 2013, 12:35:11 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Media_Icon/admin.php
r19353 r19736 15 15 check_status(ACCESS_ADMINISTRATOR); 16 16 17 //Initialization 18 $my_base_url = get_admin_plugin_menu_link(__FILE__); 17 //Tab management 18 if (empty($conf['Media_Icon_tabs'])) { 19 $conf['Media_Icon_tabs'] = array('general', 'advanced', 'help'); 20 } 19 21 20 //Tab management 21 if (!isset($_GET['tab'])) 22 $page['tab'] = 'general'; 23 else 24 $page['tab'] = $_GET['tab']; 22 $page['tab'] = isset($_GET['tab']) ? $_GET['tab'] : $conf['Media_Icon_tabs'][0]; 23 24 if (!in_array($page['tab'], $conf['Media_Icon_tabs'])) die('Hacking attempt!'); 25 25 26 26 $tabsheet = new tabsheet(); 27 $tabsheet->add('general', 28 l10n('General'), 29 $my_base_url.'&tab=general'); 30 $tabsheet->add('advanced', 31 l10n('Advanced options'), 32 $my_base_url.'&tab=advanced'); 33 $tabsheet->add('help', 34 l10n('Help'), 35 $my_base_url.'&tab=help'); 27 foreach ($conf['Media_Icon_tabs'] as $tab) { 28 $tabsheet->add($tab, l10n(ucfirst($tab)), MEDIA_ICON_ADMIN.'-'.$tab); 29 } 36 30 $tabsheet->select($page['tab']); 37 31 $tabsheet->assign(); 38 32 39 switch ($page['tab']) { 40 case 'advanced': 41 include_once(dirname(__FILE__).'/admin/admin_advanced.php'); 42 break; 43 case 'help': 44 include_once(dirname(__FILE__).'/admin/admin_help.php'); 45 break; 46 default: 47 include_once(dirname(__FILE__).'/admin/admin_general.php'); 48 break; 49 } 33 include_once(MEDIA_ICON_PATH.'/admin/admin_'.$page['tab'].'.php'); 50 34 ?>
Note: See TracChangeset
for help on using the changeset viewer.