|
1
|
|
|
<?php |
|
2
|
|
|
/** |
|
3
|
|
|
* Xoositemap module |
|
4
|
|
|
* |
|
5
|
|
|
* You may not change or alter any portion of this comment or credits |
|
6
|
|
|
* of supporting developers from this source code or any supporting source code |
|
7
|
|
|
* which is considered copyrighted (c) material of the original comment or credit authors. |
|
8
|
|
|
* This program is distributed in the hope that it will be useful, |
|
9
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
10
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
|
11
|
|
|
* |
|
12
|
|
|
* @copyright XOOPS Project (https://xoops.org) |
|
13
|
|
|
* @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) |
|
14
|
|
|
* @package Xoositemap |
|
15
|
|
|
* @since 2.6.0 |
|
16
|
|
|
* @author Laurent JEN (Aka DuGris) |
|
17
|
|
|
|
|
18
|
|
|
*/ |
|
19
|
|
|
use Xoops\Core\Request; |
|
20
|
|
|
|
|
21
|
|
|
require_once dirname(dirname(dirname(__DIR__))) . '/include/cp_header.php'; |
|
22
|
|
|
|
|
23
|
|
|
$op = ''; |
|
24
|
|
|
if (isset($_POST)) { |
|
25
|
|
|
foreach ($_POST as $k => $v) { |
|
26
|
|
|
${$k} = $v; |
|
27
|
|
|
} |
|
28
|
|
|
} |
|
29
|
|
|
if (isset($_GET)) { |
|
30
|
|
|
foreach ($_GET as $k => $v) { |
|
31
|
|
|
${$k} = $v; |
|
32
|
|
|
} |
|
33
|
|
|
} |
|
34
|
|
|
|
|
35
|
|
|
$script_name = basename(Request::getString('SCRIPT_NAME', '', 'SERVER'), '.php'); |
|
36
|
|
|
|
|
37
|
|
|
$helper = \XoopsModules\Xoositemap\Helper::getInstance(); |
|
38
|
|
|
$sitemapConfig = $helper->loadConfig(); |
|
|
|
|
|
|
39
|
|
|
|
|
40
|
|
|
\XoopsLoad::load('system', 'system'); |
|
41
|
|
|
$system = \System::getInstance(); |
|
42
|
|
|
|
|
43
|
|
|
$xoops = \Xoops::getInstance(); |
|
44
|
|
|
if ('about' !== $script_name) { |
|
45
|
|
|
$xoops->header('xoositemap_admin_' . $script_name . '.tpl'); |
|
46
|
|
|
} else { |
|
47
|
|
|
$xoops->header(); |
|
48
|
|
|
} |
|
49
|
|
|
$xoops->theme()->addStylesheet('modules/xoositemap/assets/css/moduladmin.css'); |
|
50
|
|
|
|
|
51
|
|
|
$admin_page = new \Xoops\Module\Admin(); |
|
52
|
|
|
if ('about' !== $script_name && 'index' !== $script_name) { |
|
53
|
|
|
$admin_page->renderNavigation(basename(Request::getString('SCRIPT_NAME', '', 'SERVER'))); |
|
54
|
|
|
} elseif ('index' !== $script_name) { |
|
55
|
|
|
$admin_page->displayNavigation(basename(Request::getString('SCRIPT_NAME', '', 'SERVER'))); |
|
56
|
|
|
} |
|
57
|
|
|
|