<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
if(basename(__FILE__) == basename($_SERVER['PHP_SELF'])){exit();}
global $config;
echo 1;
exit();
header('Content-type: text/xml');
require 'config/routes.php';
$config = (require 'config/app.php');
?>
<?xml version="1.0" encoding="UTF-8" ?>
<urlset xmlns="http://www.google.com/schemas/sitemap/0.84" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.google.com/schemas/sitemap/0.84 http://www.google.com/schemas/sitemap/0.84/sitemap.xsd">

<?php
	foreach ($routes->allpages as $page) {
 $page = explode('/', $page);
 array_shift($page);
 $page = implode('/', $page);

 echo '
     <url>
         <loc>'.$config['app_url'].$page.'</loc>
     </url>
 ';
	}
?>

</urlset>