-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathheader.php
More file actions
50 lines (47 loc) · 1.92 KB
/
header.php
File metadata and controls
50 lines (47 loc) · 1.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<?php
/**
* System header file
*
* You may not change or alter any portion of this comment or credits
* of supporting developers from this source code or any supporting source code
* which is considered copyrighted (c) material of the original comment or credit authors.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* @copyright (c) 2000-2016 XOOPS Project (www.xoops.org)
* @license GNU GPL 2 (https://www.gnu.org/licenses/gpl-2.0.html)
*/
/** @var XoopsUser $xoopsUser */
use Xmf\Request;
// Include XOOPS control panel header
include_once dirname(__DIR__, 2) . '/include/cp_header.php';
// Check user rights
if (is_object($xoopsUser)) {
$admintest = 0;
$xoopsModule = XoopsModule::getByDirname('system');
if (!$xoopsUser->isAdmin($xoopsModule->mid())) {
redirect_header(XOOPS_URL, 3, _NOPERM);
}
$admintest = 1;
} else {
redirect_header(XOOPS_URL, 3, _NOPERM);
}
// XOOPS Class
include_once $GLOBALS['xoops']->path('/class/pagenav.php');
include_once $GLOBALS['xoops']->path('/class/template.php');
include_once $GLOBALS['xoops']->path('/class/xoopsformloader.php');
include_once $GLOBALS['xoops']->path('/class/xoopslists.php');
// System Class
include_once $GLOBALS['xoops']->path('/modules/system/class/breadcrumb.php');
//include_once $GLOBALS['xoops']->path('/modules/system/class/cookie.php');
// Load Language
xoops_loadLanguage('admin', 'system');
// Include System files
include_once $GLOBALS['xoops']->path('/modules/system/include/functions.php');
// include system category definitions
include_once $GLOBALS['xoops']->path('/modules/system/constants.php');
// Get request variable
$fct = Request::getString('fct', '');
$xoBreadCrumb = new SystemBreadcrumb($fct);
$xoBreadCrumb->addLink(_AM_SYSTEM_CPANEL, XOOPS_URL . '/admin.php', true);