<?php
// Builds the dynamic site map file
header('Content-type: text/xml');
define('DATE_MOD','%Y-%m-%dT%T-06:00'); // MySQL date format for site map files
define('DATEPHP_MOD','Y-m-d\TH:i:s-06:00'); // Same, but PHP format

// Base URL
$URL = 'http://libertyexteriorsinc.com/';


// Start printing the XML file
echo '<?xml version="1.0" encoding="UTF-8"?>',"\n",
	'<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">',"\n";


// Static pages
foreach (array(
	'index.php',
	'services/awnings.php',
	'services/decks.php',
	'services/gutters.php',
	'services/rain-chains.php',
	'services/roofing/',
	'services/roofing/asphalt.php',
	'services/roofing/steel.php',
	'services/roofing/standing-seam.php',
	'services/siding/',
	'services/siding/steel.php',
	'services/siding/vinyl.php',
	'services/siding/fiber-cement.php',
	'services/windows/',
	'services/windows/commonstyles.php',
	'services/windows/whyreplacewindows.php',
	'services/windows/doors.php',
	'services/terminology.php',
	'about/',
	'about/awards.php',
	'about/staff/',
	'faqs.php',
	'warranty/',
	'testimonials.php',
	'contact.php',
	
) as $file) { ?>
	<url>
		<loc><?=$URL,$file?></loc>
		<lastmod><?=date(DATEPHP_MOD, @filemtime($file))?></lastmod>
		<changefreq>monthly</changefreq>
	</url>
<? } // End foreach (static pages)


echo "</urlset>\n";
?>
