<?php
ini_set("display_errors", 0);
error_reporting(0);
  session_start();
  ob_start();
  session_regenerate_id();
  require('config.php');
  require('sp-system/vendor/autoload.php');
  require('sp-system/main.class.php');
  $app = new app;
  $app->init_low();
  header("Content-type: text/xml");
?>
<?php echo'<?xml version="1.0" encoding="UTF-8"?>
<urlset
      xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
            http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
    ';
$qpages = dibi::query('SELECT * FROM `sp_shop_products` ORDER BY id ASC')->fetchAll();
foreach($qpages AS $vpages){
  echo'
    <url>
      <loc>'.MAIN_DOMAIN.'/detail.php?id='.$vpages->id.'</loc>
      <lastmod>'.date('Y-m-d').'T'.date('H:i:s').'+00:00</lastmod>
      <priority>1.00</priority>
    </url>
  ';
}
echo' 
  <url>
    <loc>'.MAIN_DOMAIN.'</loc>
    <lastmod>'.date('Y-m-d').'T'.date('H:i:s').'+00:00</lastmod>
    <priority>1.00</priority>
  </url>
';
echo' 
  <url>
    <loc>'.MAIN_DOMAIN.'/?load=moto</loc>
    <lastmod>'.date('Y-m-d').'T'.date('H:i:s').'+00:00</lastmod>
    <priority>1.00</priority>
  </url>
';
echo' 
  <url>
    <loc>'.MAIN_DOMAIN.'/?load=autodily</loc>
    <lastmod>'.date('Y-m-d').'T'.date('H:i:s').'+00:00</lastmod>
    <priority>1.00</priority>
  </url>
';
echo' 
  <url>
    <loc>'.MAIN_DOMAIN.'/?load=motodily</loc>
    <lastmod>'.date('Y-m-d').'T'.date('H:i:s').'+00:00</lastmod>
    <priority>1.00</priority>
  </url>
';
echo' 
  <url>
    <loc>'.MAIN_DOMAIN.'/cenik.php</loc>
    <lastmod>'.date('Y-m-d').'T'.date('H:i:s').'+00:00</lastmod>
    <priority>1.00</priority>
  </url>
';
echo' 
  <url>
    <loc>'.MAIN_DOMAIN.'/blog.php</loc>
    <lastmod>'.date('Y-m-d').'T'.date('H:i:s').'+00:00</lastmod>
    <priority>1.00</priority>
  </url>
';
          	?>

<?php
  echo'</urlset>';
?>