<?php
// Konfiguration
include_once('content/config/config.php');
include_once('content/create/generate.php');
include_once('content/db/dbconnect.php');
header("Content-type: text/xml");
echo "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n
<urlset xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd\" xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\">

 <url>
 <loc>$linkhome/index.html</loc>
 <changefreq>daily</changefreq>
 <priority>1.0</priority>
 </url>
 <url>
 <loc>$linkhome/kontakt.html</loc>
 <changefreq>monthly</changefreq>
 <priority>0.5</priority>
 </url>
 <url>
 <loc>$linkhome/impressum.html</loc>
 <changefreq>monthly</changefreq>
 <priority>0.2</priority>
 </url>
 <url>
 <loc>$linkhome/infos.html</loc>
 <changefreq>monthly</changefreq>
 <priority>0.3</priority>
 </url>
 <url>
 <loc>$linkhome/stripper.html</loc>
 <changefreq>weekly</changefreq>
 <priority>0.8</priority>
 </url>
 <url>
 <loc>$linkhome/stripperin.html</loc>
 <changefreq>weekly</changefreq>
 <priority>0.8</priority>
 </url>
  <url>
 <loc>$linkhome/anfrage.html</loc>
 <changefreq>weekly</changefreq>
 <priority>0.8</priority>
 </url>
 <url>
 <loc>$linkhome/rss.xml.php</loc>
 <changefreq>weekly</changefreq>
 <priority>0.6</priority>
 </url>
 <url>
 <loc>$linkhome/links.html</loc>
 <changefreq>monthly</changefreq>
 <priority>0.2</priority>
 </url>
 <url>
 <loc>$linkhome/sitemap.html</loc>
 <changefreq>weekly</changefreq>
 <priority>0.8</priority>
 </url>
 <url>
 <loc>$linkhome/robots.txt</loc>
 <changefreq>monthly</changefreq>
 <priority>0.2</priority>
 </url>
 ";

// auslesen aus Tabelle
$query = "
        SELECT
                *
        FROM
                artists
        WHERE
                bundesland IN ('$state','$state2')
        AND
                (ort LIKE '%Leipzig%' OR ort LIKE '%Halle%')
        AND
                status = 'freigeschaltet'
        ORDER BY
                bewerbung DESC
";
$result = mysql_query($query);
while($row = mysql_fetch_array($result))
{
        echo " <url>\n";
        echo " <loc>$linkhome/".getLink($row['id'])."</loc>\n";
        echo " <changefreq>weekly</changefreq>\n";
        echo " <priority>0.8</priority>\n";
        echo " </url>\n";
}
?>
</urlset>
