Pages vues depuis 25/05/2001 : 104 272 474
Index du forum »» Sécurité »» lecture forum réservé
Message édité par : leloup31 / 05-10-2006 08:33
function map_forum()
{
global $nuke_url, $priority_forum, $nburl;
$result = mysql_query("SELECT topic_id, forum_id FROM forumtopics");
while (list($topic_id, $forum_id) = mysql_fetch_row($result))
{
echo "<url>\n";
echo "<loc>".$nuke_url."/viewtopic.php?topic=".$topic_id."&forum=".$forum_id."</loc>\n";
echo "<lastmod>".date("Y-m-d")."</lastmod>\n";
echo "<changefreq>weekly</changefreq>\n";
echo "<priority>".$priority_forum."</priority>\n";
echo "</url>\n";
$nburl = $nburl +1;
$result2 = mysql_query("SELECT post_id FROM posts WHERE topic_id='".$topic_id."'");
$page = 10;
while ($page < mysql_num_rows($result2))
{
echo "<url>\n";
echo "<loc>".$nuke_url."/viewtopic.php?topic=".$topic_id."&forum=".$forum_id."&start=".$page."</loc>\n";
echo "<lastmod>".date("Y-m-d")."</lastmod>\n";
echo "<changefreq>weekly</changefreq>\n";
echo "<priority>".$priority_forum."</priority>\n";
echo "</url>\n";
$nburl = $nburl + 1;
$page = $page + 10;
}
}
@mysql_free_result($result);
}