<?php
/**
 * SocialBulk Shop - Dynamic Sitemap Index
 */

require_once __DIR__ . '/includes/config.php';

header('Content-Type: application/xml; charset=UTF-8');
echo '<?xml version="1.0" encoding="UTF-8"?>';

$lastmod = date('Y-m-d');
$url     = SITE_URL;

// Static pages
$staticPages = [
    ['loc' => $url . '/',                           'priority' => '1.0', 'freq' => 'daily'],
    ['loc' => $url . '/buy-account',                'priority' => '0.9', 'freq' => 'daily'],
    ['loc' => $url . '/sell-account',               'priority' => '0.9', 'freq' => 'weekly'],
    ['loc' => $url . '/blog',                       'priority' => '0.8', 'freq' => 'daily'],
    ['loc' => $url . '/about',                      'priority' => '0.6', 'freq' => 'monthly'],
    ['loc' => $url . '/contact',                    'priority' => '0.6', 'freq' => 'monthly'],
    ['loc' => $url . '/faq',                        'priority' => '0.7', 'freq' => 'monthly'],
    ['loc' => $url . '/buy-instagram-accounts',     'priority' => '0.9', 'freq' => 'weekly'],
    ['loc' => $url . '/sell-instagram-accounts',    'priority' => '0.8', 'freq' => 'weekly'],
    ['loc' => $url . '/aged-instagram-accounts',    'priority' => '0.8', 'freq' => 'weekly'],
    ['loc' => $url . '/instagram-theme-pages-for-sale',           'priority' => '0.8', 'freq' => 'weekly'],
    ['loc' => $url . '/instagram-business-accounts-for-sale',     'priority' => '0.8', 'freq' => 'weekly'],
    ['loc' => $url . '/instagram-influencer-accounts-for-sale',   'priority' => '0.8', 'freq' => 'weekly'],
    ['loc' => $url . '/instagram-meme-pages-for-sale',            'priority' => '0.8', 'freq' => 'weekly'],
    ['loc' => $url . '/instagram-account-marketplace',            'priority' => '0.8', 'freq' => 'weekly'],
    ['loc' => $url . '/buy-instagram-accounts-india',             'priority' => '0.7', 'freq' => 'monthly'],
    ['loc' => $url . '/buy-instagram-accounts-usa',               'priority' => '0.7', 'freq' => 'monthly'],
    ['loc' => $url . '/buy-instagram-accounts-uk',                'priority' => '0.7', 'freq' => 'monthly'],
    ['loc' => $url . '/buy-instagram-accounts-canada',            'priority' => '0.7', 'freq' => 'monthly'],
    ['loc' => $url . '/buy-instagram-accounts-australia',         'priority' => '0.7', 'freq' => 'monthly'],
    ['loc' => $url . '/privacy-policy',             'priority' => '0.3', 'freq' => 'yearly'],
    ['loc' => $url . '/terms',                      'priority' => '0.3', 'freq' => 'yearly'],
    ['loc' => $url . '/refund-policy',              'priority' => '0.3', 'freq' => 'yearly'],
    ['loc' => $url . '/disclaimer',                 'priority' => '0.3', 'freq' => 'yearly'],
];
?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<?php foreach ($staticPages as $p): ?>
  <url>
    <loc><?= htmlspecialchars($p['loc']) ?></loc>
    <lastmod><?= $lastmod ?></lastmod>
    <changefreq><?= $p['freq'] ?></changefreq>
    <priority><?= $p['priority'] ?></priority>
  </url>
<?php endforeach; ?>
</urlset>
