Verzeichnisstruktur phpBB-3.2.0


Veröffentlicht
06.01.2017

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.73 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      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();
92