<?php
header('Content-Type: application/xml; charset=utf-8');

$base_url = "https://launchhub.africa";

// List your static pages here
$pages = [
    ['', '1.0', 'daily'],          // Home page
    ['about.php', '0.8', 'monthly'],
    ['services.php', '0.8', 'monthly'],
    ['courses.php', '0.9', 'weekly'],
    ['contact.php', '0.7', 'monthly'],
];

// If you have dynamic pages (courses, services), you can fetch them from the database here

echo '<?xml version="1.0" encoding="UTF-8"?>' . "\n";
?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<?php foreach ($pages as $page): ?>
  <url>
    <loc><?= $base_url . '/' . $page[0] ?></loc>
    <changefreq><?= $page[2] ?></changefreq>
    <priority><?= $page[1] ?></priority>
  </url>
<?php endforeach; ?>
</urlset>
