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/SBogers10/tops.komma.pro/wwwroot/sitemap.xml.php
<?php
require_once $_SERVER['DOCUMENT_ROOT'] . '/config/errorReport.php';
require_once $_SERVER['DOCUMENT_ROOT'] . '/config/paths.php';
require_once $_SERVER['DOCUMENT_ROOT'] . '/lib/general/translator.class.php';
require_once $_SERVER['DOCUMENT_ROOT'] . '/lib/content/sitemap_xml.class.php';

// Variables
$base_root = $root = 'http://' . $_SERVER['HTTP_HOST'] . '/';
$date = date('Y-m-d');
$languages = array('nl');

// Define all filters
$mainFilters = array('active_carbon_filters','compact_filters','wire_frame_filters','filter_cloth','filter_cabinets','filter_windows',
    'hepa_ulpa_filters','panel_filters','spray_booth_filters','v_belts','heat_recovery','bag_filters');

// Define subfilters
$hasSubFilter = array('active_carbon_filters','bag_filters','compact_filters','filter_cloth','heat_recovery','panel_filters');

$subFilters['active_carbon_filters'] = array('active_carbon_cylinders','active_carbon_v_cel','active_carbon_f7');
$subFilters['bag_filters'] = array('bag_filters_synthetic','bag_filters_compoplus','bag_filters_fiberglass');
$subFilters['compact_filters'] = array('compact_filters_airpac','compact_filters_v_cel','compact_filters_cassette');
$subFilters['filter_cloth'] = array('filter_cloth_synthetic','filter_cloth_glass','filter_cloth_ppi');
$subFilters['heat_recovery'] = array('heat_recovery_business','heat_recovery_house');
$subFilters['panel_filters'] = array('panel_filters_cardboard','panel_filters_metal','panel_filters_plastic','panel_filters_fiberglass');

// Define all uses
$mainUses = array('offices','shipping_aviation','schools','sports','spray_booths','houses','hospitals');

// Define all certificaties
$mainCertificates = array('en779','en1822');


// Set Headers
header("Content-type: text/xml");

// Create output
echo("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
echo("<urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\">");
?>

<url>
    <loc><?php echo $root; ?></loc>
    <lastmod><?php echo($date); ?></lastmod>
    <changefreq>weekly</changefreq>
    <priority>0.5</priority>
</url>
<?php
    // Objects
    foreach($languages as $l)
    {

        $Translator = new Translator($l);
        $urls = $Translator->getUrls();

        $Sitemap = new Sitemap_Xml($l);

        $root = $base_root . $l . '/';
    ?>
    <url>
        <loc><?php echo $root; ?></loc>
        <lastmod><?php echo($date); ?></lastmod>
        <changefreq>weekly</changefreq>
        <priority>0.5</priority>
    </url>
    <url>
        <loc><?php echo $root . $urls['company']; ?></loc>
        <lastmod><?php echo($date); ?></lastmod>
        <changefreq>weekly</changefreq>
        <priority>0.5</priority>
    </url>
    <url>
        <loc><?php echo $root . $urls['filters']; ?></loc>
        <lastmod><?php echo($date); ?></lastmod>
        <changefreq>weekly</changefreq>
        <priority>0.5</priority>
    </url>

        <?php
            $Sitemap->set('filters',$mainFilters, $hasSubFilter, $subFilters);
            echo $Sitemap->create($root);
        ?>

    <url>
        <loc><?php echo $root . $urls['uses']; ?></loc>
        <lastmod><?php echo($date); ?></lastmod>
        <changefreq>weekly</changefreq>
        <priority>0.5</priority>
    </url>
        <?php
        $Sitemap->set('uses',$mainUses);
        echo $Sitemap->create($root);
        ?>
    <url>
        <loc><?php echo $root . $urls['installation']; ?></loc>
        <lastmod><?php echo($date); ?></lastmod>
        <changefreq>weekly</changefreq>
        <priority>0.5</priority>
    </url>
    <url>
        <loc><?php echo $root . $urls['certificates']; ?></loc>
        <lastmod><?php echo($date); ?></lastmod>
        <changefreq>weekly</changefreq>
        <priority>0.5</priority>
    </url>
        <?php
        $Sitemap->set('certificates',$mainCertificates);
        echo $Sitemap->create($root);
        ?>
    <url>
        <loc><?php echo $root . $urls['webshop']; ?></loc>
        <lastmod><?php echo($date); ?></lastmod>
        <changefreq>weekly</changefreq>
        <priority>0.5</priority>
    </url>
    <url>
        <loc><?php echo $root . $urls['contact']; ?></loc>
        <lastmod><?php echo($date); ?></lastmod>
        <changefreq>weekly</changefreq>
        <priority>0.5</priority>
    </url>
<?php } ?>
</urlset>