1
|
|
|
<?php declare(strict_types=1); |
2
|
|
|
|
3
|
|
|
/** |
4
|
|
|
* **************************************************************************** |
5
|
|
|
* - A Project by Developers TEAM For Xoops - ( https://xoops.org ) |
6
|
|
|
* **************************************************************************** |
7
|
|
|
* XHTTPERROR - MODULE FOR XOOPS |
8
|
|
|
* Copyright (c) 2007 - 2012 |
9
|
|
|
* Rota Lucio ( http://luciorota.altervista.org/xoops/ ) |
10
|
|
|
* |
11
|
|
|
* You may not change or alter any portion of this comment or credits |
12
|
|
|
* of supporting developers from this source code or any supporting |
13
|
|
|
* source code which is considered copyrighted (c) material of the |
14
|
|
|
* original comment or credit authors. |
15
|
|
|
* |
16
|
|
|
* This program is distributed in the hope that it will be useful, |
17
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
18
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
19
|
|
|
* GNU General Public License for more details. |
20
|
|
|
* --------------------------------------------------------------------------- |
21
|
|
|
* @copyright Rota Lucio ( http://luciorota.altervista.org/xoops/ ) |
22
|
|
|
* @license GNU General Public License v3.0 |
23
|
|
|
* @package xhttperror |
24
|
|
|
* @author Rota Lucio ( [email protected] ) |
25
|
|
|
* |
26
|
|
|
* $Rev$: Revision of last commit |
27
|
|
|
* $Author$: Author of last commit |
28
|
|
|
* $Date$: Date of last commit |
29
|
|
|
* **************************************************************************** |
30
|
|
|
*/ |
31
|
|
|
|
32
|
|
|
use Xmf\Module\Admin; |
33
|
|
|
use XoopsModules\Xhttperror\{ |
34
|
|
|
Helper |
35
|
|
|
}; |
36
|
|
|
/** @var Admin $adminObject */ |
37
|
|
|
/** @var Helper $helper */ |
38
|
|
|
|
39
|
|
|
include dirname(__DIR__) . '/preloads/autoloader.php'; |
40
|
|
|
|
41
|
|
|
$moduleDirName = basename(dirname(__DIR__)); |
42
|
|
|
$moduleDirNameUpper = mb_strtoupper($moduleDirName); |
43
|
|
|
|
44
|
|
|
$helper = Helper::getInstance(); |
45
|
|
|
$helper->loadLanguage('common'); |
46
|
|
|
$helper->loadLanguage('feedback'); |
47
|
|
|
|
48
|
|
|
$pathIcon32 = Admin::menuIconPath(''); |
49
|
|
|
$pathModIcon32 = XOOPS_URL . '/modules/' . $moduleDirName . '/assets/images/icons/32/'; |
50
|
|
|
if (is_object($helper->getModule()) && false !== $helper->getModule()->getInfo('modicons32')) { |
51
|
|
|
$pathModIcon32 = $helper->url($helper->getModule()->getInfo('modicons32')); |
|
|
|
|
52
|
|
|
} |
53
|
|
|
|
54
|
|
|
$adminmenu[] = [ |
55
|
|
|
'name' => 'Index', |
56
|
|
|
'title' => _MI_XHTTPERR_ADMENU_INDEX, |
57
|
|
|
'link' => 'admin/index.php', |
58
|
|
|
'desc' => _MI_XHTTPERR_ADMENU_INDEX_DESC, |
59
|
|
|
'icon' => $pathModIcon32 . '/house.png', |
60
|
|
|
]; |
61
|
|
|
|
62
|
|
|
$adminmenu[] = [ |
63
|
|
|
'name' => 'Errors', |
64
|
|
|
'title' => _MI_XHTTPERR_ADMENU_ERRORS, |
65
|
|
|
'link' => 'admin/errors.php', |
66
|
|
|
'desc' => _MI_XHTTPERR_ADMENU_ERRORS_DESC, |
67
|
|
|
'icon' => $pathModIcon32 . '/error.png', |
68
|
|
|
]; |
69
|
|
|
|
70
|
|
|
$adminmenu[] = [ |
71
|
|
|
'name' => 'Reports', |
72
|
|
|
'title' => _MI_XHTTPERR_ADMENU_REPORTS, |
73
|
|
|
'link' => 'admin/reports.php', |
74
|
|
|
'desc' => _MI_XHTTPERR_ADMENU_REPORTS_DESC, |
75
|
|
|
'icon' => $pathModIcon32 . '/report_error.png', |
76
|
|
|
]; |
77
|
|
|
|
78
|
|
|
$adminmenu[] = [ |
79
|
|
|
'name' => 'About', |
80
|
|
|
'title' => _MI_XHTTPERR_ADMENU_ABOUT, |
81
|
|
|
'link' => 'admin/about.php', |
82
|
|
|
'desc' => _MI_XHTTPERR_ADMENU_ABOUT_DESC, |
83
|
|
|
'icon' => $pathModIcon32 . '/information.png', |
84
|
|
|
]; |
85
|
|
|
|