|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
// ------------------------------------------------------------------------ // |
|
4
|
|
|
// XOOPS - PHP Content Management System // |
|
5
|
|
|
// Copyright (c) 2000 XOOPS.org // |
|
6
|
|
|
// <https://xoops.org> // |
|
7
|
|
|
// ------------------------------------------------------------------------ // |
|
8
|
|
|
// This program is free software; you can redistribute it and/or modify // |
|
9
|
|
|
// it under the terms of the GNU General Public License as published by // |
|
10
|
|
|
// the Free Software Foundation; either version 2 of the License, or // |
|
11
|
|
|
// (at your option) any later version. // |
|
12
|
|
|
// // |
|
13
|
|
|
// You may not change or alter any portion of this comment or credits // |
|
14
|
|
|
// of supporting developers from this source code or any supporting // |
|
15
|
|
|
// source code which is considered copyrighted (c) material of the // |
|
16
|
|
|
// original comment or credit authors. // |
|
17
|
|
|
// // |
|
18
|
|
|
// This program is distributed in the hope that it will be useful, // |
|
19
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of // |
|
20
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // |
|
21
|
|
|
// GNU General Public License for more details. // |
|
22
|
|
|
// // |
|
23
|
|
|
// You should have received a copy of the GNU General Public License // |
|
24
|
|
|
// along with this program; if not, write to the Free Software // |
|
25
|
|
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // |
|
26
|
|
|
// ------------------------------------------------------------------------ // |
|
27
|
|
|
|
|
28
|
|
|
include dirname(__DIR__) . '/preloads/autoloader.php'; |
|
29
|
|
|
|
|
30
|
|
|
$moduleDirName = basename(dirname(__DIR__)); |
|
31
|
|
|
$moduleDirNameUpper = mb_strtoupper($moduleDirName); |
|
32
|
|
|
$helper = \XoopsModules\Chess\Helper::getInstance(); |
|
33
|
|
|
$helper->loadLanguage('common'); |
|
34
|
|
|
|
|
35
|
|
|
$pathIcon32 = \Xmf\Module\Admin::menuIconPath(''); |
|
36
|
|
|
if (is_object($helper->getModule())) { |
|
37
|
|
|
// $pathModIcon32 = $helper->getModule()->getInfo('modicons32'); |
|
38
|
|
|
|
|
39
|
|
|
$pathModIcon32 = $helper->url($helper->getModule()->getInfo('modicons32')); |
|
|
|
|
|
|
40
|
|
|
} |
|
41
|
|
|
|
|
42
|
|
|
$adminmenu[] = [ |
|
43
|
|
|
'title' => _MI_CHESS_MENU_HOME, |
|
44
|
|
|
'link' => 'admin/index.php', |
|
45
|
|
|
'icon' => $pathIcon32 . '/home.png', |
|
46
|
|
|
]; |
|
47
|
|
|
|
|
48
|
|
|
$adminmenu[] = [ |
|
49
|
|
|
'title' => _MI_CHESS_ADMENU1, |
|
50
|
|
|
'link' => 'admin/main.php?op=suspended_games', |
|
51
|
|
|
'icon' => $pathIcon32 . '/alert.png', |
|
52
|
|
|
]; |
|
53
|
|
|
|
|
54
|
|
|
$adminmenu[] = [ |
|
55
|
|
|
'title' => _MI_CHESS_ADMENU2, |
|
56
|
|
|
'link' => 'admin/main.php?op=active_games', |
|
57
|
|
|
'icon' => $pathIcon32 . '/button_ok.png', |
|
58
|
|
|
]; |
|
59
|
|
|
|
|
60
|
|
|
$adminmenu[] = [ |
|
61
|
|
|
'title' => _MI_CHESS_ADMENU3, |
|
62
|
|
|
'link' => 'admin/main.php?op=challenges', |
|
63
|
|
|
'icon' => $pathIcon32 . '/cash_stack.png', |
|
64
|
|
|
]; |
|
65
|
|
|
|
|
66
|
|
|
if (is_object($helper->getModule()) && $helper->getConfig('displayDeveloperTools')) { |
|
67
|
|
|
$adminmenu[] = [ |
|
68
|
|
|
'title' => constant('CO_' . $moduleDirNameUpper . '_' . 'ADMENU_MIGRATE'), |
|
69
|
|
|
'link' => 'admin/migrate.php', |
|
70
|
|
|
'icon' => $pathIcon32 . '/database_go.png', |
|
71
|
|
|
]; |
|
72
|
|
|
} |
|
73
|
|
|
|
|
74
|
|
|
$adminmenu[] = [ |
|
75
|
|
|
'title' => _MI_CHESS_MENU_ABOUT, |
|
76
|
|
|
'link' => 'admin/about.php', |
|
77
|
|
|
'icon' => $pathIcon32 . '/about.png', |
|
78
|
|
|
]; |
|
79
|
|
|
|