summaryrefslogtreecommitdiff
path: root/admin/sitemaps.php
blob: 38ace366642b73277d29254515f5d091034349b6 (plain)
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
<?php
/**
 * @package kernel
 * @author spider <spider@steelsun.com>
 *
 * Copyright (c) 2011 bitweaver.org
 * All Rights Reserved. See below for details and a complete list of authors.
 * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See http://www.gnu.org/copyleft/lesser.html for details
 */

// Initialization
require_once '../../kernel/includes/setup_inc.php';

include_once KERNEL_PKG_INCLUDE_PATH.'notification_lib.php';

// Check for admin permission
$gBitSystem->verifyPermission( 'p_admin' );

global $gSiteMapHash;

foreach( $gBitSystem->mPackages as $packageName => $package ) {
	if( file_exists( $package['path'].'sitemap.php' ) ) {
		$gSiteMapHash[$packageName]['loc'] = constant( strtoupper( $package['name'] ).'_PKG_URI' ).'sitemap.php';
		$gSiteMapHash[$packageName]['lastmod'] = date( "Y-m-d", strtotime( "midnight yesterday" ) );
	}
}

$gBitSmarty->assign( 'gSiteMapHash', $gSiteMapHash );

// Display the template
$gBitSystem->display( 'bitpackage:kernel/admin_sitemaps.tpl', null, [ 'display_mode' => 'admin' ] );