forked from XoopsModules25x/xsitemap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
51 lines (45 loc) · 1.84 KB
/
index.php
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
51
<?php
/*
* ****************************************************************************
* xsitemap - MODULE FOR XOOPS CMS
* Copyright (c) Urbanspaceman (http://www.takeaweb.it)
*
* 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.
*/
/**
* @package module\Xsitemap\frontside
* @author Urbanspaceman (http://www.takeaweb.it)
* @copyright Urbanspaceman (http://www.takeaweb.it)
* @copyright XOOPS Project
* @license http://www.fsf.org/copyleft/gpl.html GNU public license
* @link https://xoops.org XOOPS
* @since 1.00
**/
use XoopsModules\Xsitemap\{
Utility
};
/** @var Utility $utility */
require_once __DIR__ . '/header.php';
$moduleDirName = basename(__DIR__);
$utility = new Utility();
//template assign
$GLOBALS['xoopsOption']['template_main'] = 'xsitemap_index.tpl';
require_once $GLOBALS['xoops']->path('header.php');
require_once $GLOBALS['xoops']->path('class/tree.php');
$xsitemap_configs = $GLOBALS['xoopsModuleConfig'];
$xsitemap_show = $utility::generateSitemap();
$GLOBALS['xoTheme']->addStylesheet($GLOBALS['xoops']->url('browse.php?modules/' . $moduleDirName . '/assets/css/style.css'));
$GLOBALS['xoopsTpl']->assign(
[
'xsitemap' => $xsitemap_show,
'num_col' => $xsitemap_configs['columns_number'],
'show_sublink' => $xsitemap_configs['show_sublink'],
'show_subcategories' => $xsitemap_configs['show_subcategories'],
]
);
require_once $GLOBALS['xoops']->path('footer.php');