<?php
/**
 * LEBANCO.NET - Sitemap Index
 * 
 * Master sitemap index pointing to all specialized sitemaps:
 * - sitemap.php (general pages)
 * - sitemap_news.php (Google News - last 48h articles)
 * - sitemap_images.php (Image search)
 * - sitemap_videos.php (optional - future)
 * 
 * URL: https://lebanco.net/sitemap_index.xml
 * Submit to Google Search Console as primary sitemap
 * 
 * Reference: https://www.sitemaps.org/protocol.html
 */

header('Content-Type: application/xml; charset=UTF-8');
header('Cache-Control: public, max-age=86400'); // 24 hours cache

$siteName = 'https://lebanco.net'; // Use HTTPS only for sitemaps

echo '<?xml version="1.0" encoding="UTF-8"?>' . "\n";
?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">

    <!-- General Sitemap: Static pages + all articles (generic) -->
    <sitemap>
        <loc><?= $siteName; ?>/sitemap.php</loc>
        <lastmod><?= date('Y-m-d\TH:i:sP'); ?></lastmod>
    </sitemap>

    <!-- News Sitemap: Recent articles for Google News indexing -->
    <!-- Contains articles from last 48 hours as per Google News requirements -->
    <sitemap>
        <loc><?= $siteName; ?>/sitemap_news.php</loc>
        <lastmod><?= date('Y-m-d\TH:i:sP'); ?></lastmod>
    </sitemap>

    <!-- Image Sitemap: All article and gallery images -->
    <!-- Improves image search visibility and ranking -->
    <sitemap>
        <loc><?= $siteName; ?>/sitemap_images.php</loc>
        <lastmod><?= date('Y-m-d\TH:i:sP'); ?></lastmod>
    </sitemap>

    <!-- Video Sitemap: (Optional - implement if needed) -->
    <!-- <sitemap>
        <loc><?= $siteName; ?>/sitemap_videos.php</loc>
        <lastmod><?= date('Y-m-d\TH:i:sP'); ?></lastmod>
    </sitemap> -->

</sitemapindex>
