[ Index ] |
PHP Cross Reference of phpBB-3.2.11-deutsch |
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * 4 * This file is part of the phpBB Forum Software package. 5 * 6 * @copyright (c) phpBB Limited <https://www.phpbb.com> 7 * @license GNU General Public License, version 2 (GPL-2.0) 8 * 9 * For full copyright and license information, please see 10 * the docs/CREDITS.txt file. 11 * 12 */ 13 14 /** 15 */ 16 define('IN_PHPBB', true); 17 define('ADMIN_START', true); 18 define('NEED_SID', true); 19 20 // Include files 21 $phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './../'; 22 $phpEx = substr(strrchr(__FILE__, '.'), 1); 23 require($phpbb_root_path . 'common.' . $phpEx); 24 require($phpbb_root_path . 'includes/functions_acp.' . $phpEx); 25 require($phpbb_root_path . 'includes/functions_admin.' . $phpEx); 26 require($phpbb_root_path . 'includes/functions_module.' . $phpEx); 27 28 // Start session management 29 $user->session_begin(); 30 $auth->acl($user->data); 31 $user->setup('acp/common'); 32 // End session management 33 34 // Have they authenticated (again) as an admin for this session? 35 if (!isset($user->data['session_admin']) || !$user->data['session_admin']) 36 { 37 login_box('', $user->lang['LOGIN_ADMIN_CONFIRM'], $user->lang['LOGIN_ADMIN_SUCCESS'], true, false); 38 } 39 40 // Is user any type of admin? No, then stop here, each script needs to 41 // check specific permissions but this is a catchall 42 if (!$auth->acl_get('a_')) 43 { 44 send_status_line(403, 'Forbidden'); 45 trigger_error('NO_ADMIN'); 46 } 47 48 // We define the admin variables now, because the user is now able to use the admin related features... 49 define('IN_ADMIN', true); 50 51 // Some oft used variables 52 $safe_mode = (@ini_get('safe_mode') == '1' || strtolower(@ini_get('safe_mode')) === 'on') ? true : false; 53 $file_uploads = (@ini_get('file_uploads') == '1' || strtolower(@ini_get('file_uploads')) === 'on') ? true : false; 54 $module_id = $request->variable('i', ''); 55 $mode = $request->variable('mode', ''); 56 57 // Set custom style for admin area 58 $template->set_custom_style(array( 59 array( 60 'name' => 'adm', 61 'ext_path' => 'adm/style/', 62 ), 63 ), $phpbb_admin_path . 'style'); 64 65 $template->assign_var('T_ASSETS_PATH', $phpbb_root_path . 'assets'); 66 $template->assign_var('T_TEMPLATE_PATH', $phpbb_admin_path . 'style'); 67 68 // Instantiate new module 69 $module = new p_master(); 70 71 // Instantiate module system and generate list of available modules 72 $module->list_modules('acp'); 73 74 // Select the active module 75 $module->set_active($module_id, $mode); 76 77 // Assign data to the template engine for the list of modules 78 // We do this before loading the active module for correct menu display in trigger_error 79 $module->assign_tpl_vars(append_sid("{$phpbb_admin_path}index.$phpEx")); 80 81 // Load and execute the relevant module 82 $module->load_active(); 83 84 // Generate the page 85 adm_page_header($module->get_page_title()); 86 87 $template->set_filenames(array( 88 'body' => $module->get_tpl_name(), 89 )); 90 91 adm_page_footer();
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Wed Nov 11 20:33:01 2020 | Cross-referenced by PHPXref 0.7.1 |