Files
legacy_rock/forum/sitemap-index.php
Aleksei Miheev 4fba837b4e Add new sitemaps
2014-01-01 13:31:07 +00:00

25 lines
746 B
PHP

<?
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>