<?
require_once ('Settings.php');
mysql_connect($db_server,$db_user,$db_passwd);
mysql_select_db($db_name);
$query = mysql_query("SELECT ID_BOARD AS id FROM smf_boards WHERE ID_BOARD NOT IN (13,14,26,39)");

if($query === FALSE) {
	header('HTTP/1.1 500 Internal Server Error');
	echo "<html><head><title>500 Internal Server Error</title></head><body>Internal server error. Please, come again later.</body><html>";
	exit;
}

echo '<?xml version="1.0" encoding="UTF-8"?>'."\n";
?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<?
while($row = mysql_fetch_row($query)) {
	if (empty ($row[0])) continue;
?>
  <sitemap>
    <loc>http://rock.ru/forum/sitemap-board.php?board=<?=$row[0]?></loc>
  </sitemap>
<? } ?>
</sitemapindex>
