Verzeichnisstruktur phpBB-3.1.0


Veröffentlicht
27.10.2014

So funktioniert es


Auf das letzte Element klicken. Dies geht jeweils ein Schritt zurück

Auf das Icon klicken, dies öffnet das Verzeichnis. Nochmal klicken schließt das Verzeichnis.
Auf den Verzeichnisnamen klicken, dies zeigt nur das Verzeichnis mit Inhalt an

      (Beispiel Datei-Icons)

Auf das Icon klicken um den Quellcode anzuzeigen

index.php

Zuletzt modifiziert: 09.10.2024, 12:51 - Dateigröße: 2.68 KiB


 01  <?php
 02  /**
 03  *
 04  * This file is part of the phpBB Forum Software package.
 05  *
 06  * @copyright (c) phpBB Limited <https://www.phpbb.com>
 07  * @license GNU General Public License, version 2 (GPL-2.0)
 08  *
 09  * 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      trigger_error('NO_ADMIN');
 45  }
 46   
 47  // We define the admin variables now, because the user is now able to use the admin related features...
 48  define('IN_ADMIN', true);
 49   
 50  // Some oft used variables
 51  $safe_mode        = (@ini_get('safe_mode') == '1' || strtolower(@ini_get('safe_mode')) === 'on') ? true : false;
 52  $file_uploads    = (@ini_get('file_uploads') == '1' || strtolower(@ini_get('file_uploads')) === 'on') ? true : false;
 53  $module_id        = request_var('i', '');
 54  $mode            = request_var('mode', '');
 55   
 56  // Set custom style for admin area
 57  $template->set_custom_style(array(
 58      array(
 59          'name'         => 'adm',
 60          'ext_path'     => 'adm/style/',
 61      ),
 62  ), $phpbb_admin_path . 'style');
 63   
 64  $template->assign_var('T_ASSETS_PATH', $phpbb_root_path . 'assets');
 65  $template->assign_var('T_TEMPLATE_PATH', $phpbb_admin_path . 'style');
 66   
 67  // Instantiate new module
 68  $module = new p_master();
 69   
 70  // Instantiate module system and generate list of available modules
 71  $module->list_modules('acp');
 72   
 73  // Select the active module
 74  $module->set_active($module_id, $mode);
 75   
 76  // Assign data to the template engine for the list of modules
 77  // We do this before loading the active module for correct menu display in trigger_error
 78  $module->assign_tpl_vars(append_sid("{$phpbb_admin_path}index.$phpEx"));
 79   
 80  // Load and execute the relevant module
 81  $module->load_active();
 82   
 83  // Generate the page
 84  adm_page_header($module->get_page_title());
 85   
 86  $template->set_filenames(array(
 87      'body' => $module->get_tpl_name(),
 88  ));
 89   
 90  adm_page_footer();
 91