<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
        xmlns:xhtml="http://www.w3.org/1999/xhtml">
    
    <url>
        <loc>https://www.hefzkon.ir/</loc>
        <lastmod>2024-01-10</lastmod>
        <changefreq>daily</changefreq>
        <priority>1.0</priority>
    </url>
    
    <?php
    // این فایل را با نام sitemap.php ایجاد کرده و پسوند آن را به xml تغییر دهید
    // یا از پلاگین برای generate داینامیک استفاده کنید
    $quran = new QuranAudio();
    $reciters = $quran->getReciters();
    $surahs = $quran->getSurahs();
    $base_url = "https://www.hefzkon.ir/";
    
    foreach ($surahs as $surah_num => $surah_name) {
        // صفحه اصلی هر سوره
        echo "<url>\n";
        echo "    <loc>" . $base_url . "سوره-" . $surah_num . "</loc>\n";
        echo "    <lastmod>" . date('Y-m-d') . "</lastmod>\n";
        echo "    <changefreq>weekly</changefreq>\n";
        echo "    <priority>0.9</priority>\n";
        echo "</url>\n";
        
        // هر سوره با هر قاری
        foreach ($reciters as $reciter_key => $reciter_name) {
            echo "<url>\n";
            echo "    <loc>" . $base_url . "سوره-" . $surah_num . "-" . $reciter_key . "</loc>\n";
            echo "    <lastmod>" . date('Y-m-d') . "</lastmod>\n";
            echo "    <changefreq>monthly</changefreq>\n";
            echo "    <priority>0.8</priority>\n";
            echo "</url>\n";
        }
    }
    ?>
    
</urlset>