<?php
require_once __DIR__ . '/config.php';
header('Content-Type: application/xml');
$base = 'https://' . ($_SERVER['HTTP_HOST'] ?? 'ethiopiafoodexpo.com') . BASE_URL;
$pages = [
    ['loc' => '/index.php',      'priority' => '1.0'],
    ['loc' => '/about.php',      'priority' => '0.8'],
    ['loc' => '/sectors.php',    'priority' => '0.8'],
    ['loc' => '/exhibitors.php', 'priority' => '0.7'],
    ['loc' => '/register.php',   'priority' => '0.9'],
    ['loc' => '/gallery.php',    'priority' => '0.6'],
    ['loc' => '/faq.php',        'priority' => '0.6'],
    ['loc' => '/contact.php',    'priority' => '0.8'],
];
echo '<?xml version="1.0" encoding="UTF-8"?>';
?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<?php foreach ($pages as $page): ?>
    <url>
        <loc><?php echo e($base . $page['loc']); ?></loc>
        <lastmod><?php echo date('Y-m-d'); ?></lastmod>
        <priority><?php echo $page['priority']; ?></priority>
    </url>
<?php endforeach; ?>
</urlset>
