HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/SBogers25/superbedrukt.nl/wwwroot/sitemap.xml.php
<?php
include("all_kms_con.php");

header("Content-type: text/xml"); 
$datum = date('Y-m-d');

echo("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
echo("<urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\">");
?>
<url>
	<loc>http://www.superbedrukt.nl</loc>
	<lastmod><?php echo($datum); ?></lastmod>
	<changefreq>weekly</changefreq>
	<priority>0.5</priority>
</url>
<url>
	<loc>http://www.superbedrukt.nl/bedrukken</loc>
	<lastmod><?php echo($datum); ?></lastmod>
	<changefreq>weekly</changefreq>
	<priority>0.5</priority>
</url>
<url>
	<loc>http://www.superbedrukt.nl/contact</loc>
	<lastmod><?php echo($datum); ?></lastmod>
	<changefreq>weekly</changefreq>
	<priority>0.5</priority>
</url>
              
<?php 

$q_categories = "SELECT kms_categories.categorie_id, kms_categories.categorie_name, kms_categories.url FROM kms_categories ORDER BY kms_categories.categorie_name ASC";
$r_categories = mysql_query($q_categories);

while($rec_categories = mysql_fetch_array($r_categories)){ ?>

	<?php
	$q_subcategories = "SELECT kms_subcategories.subcategorie_id, kms_subcategories.subcategorie_name, kms_subcategories.url FROM kms_subcategories WHERE kms_subcategories.categorie_id = '".$rec_categories['categorie_id']."' ORDER BY kms_subcategories.subcategorie_name ASC";
	$r_subcategories = mysql_query($q_subcategories);
	
	while($rec_subcategories = mysql_fetch_array($r_subcategories)){ ?>
    
    <url>
        <loc>http://www.superbedrukt.nl/<?php echo($rec_categories['url']."/".$rec_subcategories['url']); ?></loc>
        <lastmod><?php echo($datum); ?></lastmod>
        <changefreq>weekly</changefreq>
        <priority>0.5</priority>
    </url>
		<?php 
        $q_articles = "SELECT kms_articles.article_name, kms_articles.url FROM kms_articles WHERE kms_articles.subcategorie_id = '".$rec_subcategories['subcategorie_id']."' ORDER BY kms_articles.article_name ASC";
        $r_articles = mysql_query($q_articles);
            
        while($rec_articles = mysql_fetch_array($r_articles)){ ?>
        
        <url>
            <loc>http://www.superbedrukt.nl/<?php echo($rec_categories['url']."/".$rec_subcategories['url']."/".$rec_articles['url']); ?></loc>
            <lastmod><?php echo($datum); ?></lastmod>
            <changefreq>weekly</changefreq>
            <priority>0.5</priority>
        </url>

        <?php } ?>
	<?php } ?>
<?php } ?>    	
                
<url>
	<loc>http://www.superbedrukt.nl/algemene-voorwaarden</loc>
	<lastmod><?php echo($datum); ?></lastmod>
	<changefreq>weekly</changefreq>
	<priority>0.5</priority>
</url>
<url>
	<loc>http://www.superbedrukt.nl/disclaimer</loc>
	<lastmod><?php echo($datum); ?></lastmod>
	<changefreq>weekly</changefreq>
	<priority>0.5</priority>
</url>
<url>
	<loc>http://www.superbedrukt.nl/sitemap</loc>
	<lastmod><?php echo($datum); ?></lastmod>
	<changefreq>weekly</changefreq>
	<priority>0.5</priority>
</url>

</urlset>