-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathxml_google.php
51 lines (46 loc) · 1.74 KB
/
xml_google.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
};
$moduleDirName = basename(__DIR__);
//template assign
$GLOBALS['xoopsOption']['template_main'] = 'xsitemap_xml.tpl';
require_once __DIR__ . '/header.php';
require_once $GLOBALS['xoops']->path('header.php');
require_once $GLOBALS['xoops']->path('class/tree.php');
$xmlfile = $GLOBALS['xoops']->path('xsitemap.xml');
$xsitemap_show = Utility::generateSitemap();
if (!empty($xsitemap_show)) {
$retVal = Utility::saveSitemap($xsitemap_show);
if (false !== $retVal) {
$stat = stat($xmlfile);
$status = formatTimestamp($stat['mtime'], _DATESTRING);
} else {
$status = _AM_XSITEMAP_XML_ERROR_UPDATE;
}
} else {
$status = _AM_XSITEMAP_XML_ERROR_UPDATE;
}
$xoopsTpl->assign('lastmod', $status);
require_once $GLOBALS['xoops']->path('footer.php');