merhaba arkadaşlar,
bir scripte sitemap modülü buldum fakat bende 10.000 yakın link olduğundan hepsini aynı sayfada çıkartıyor. fakat ben bir sayfada 500 link olmasını istiyorum. 500 den sonraki linkler sayfa1-2-3 gibi sıralansın istiyorum. nasıl yapabilirim?

aşağıdaki kodda ne gibi düzenleme gerekiyor. yardım edermisiniz.
Alıntı
<?php
if(!defined('DATALIFEENGINE')){
die("404 Dosya Bulunamadı!");
}

$thisdate = date ("Y-m-d H:i:s", (time()+ $config['date_adjust']*60));

$map = dle_cache("sitemap", $config['skin']);
if(!$map) {
$map = "";
$result = $db->query("SELECT id,name,alt_name FROM " . PREFIX . "_category ORDER BY posi ASC");
while($row = $db->get_row($result)){
$map .= "<ul style='padding:20px;font-size:18px;'><a style='font-weight: bold;' href='".$config['http_home_url']."category/${row[alt_name]}/' style='font-size:10pt;font-weight:bold;'>$row[name]</a>\n";
$cat = intval($row[id]);

$result2 = $db->query("SELECT id,autor,date,title,alt_name,comm_num,rating,news_ read,approve FROM ". PREFIX ."_post WHERE category LIKE '%$cat%' AND approve = '1' AND date < '$thisdate' ORDER BY date DESC");
while ($row2 = $db->get_row($result2)){
$map .= "<li style='padding:2px;font-size:11px;' valign='absmiddle'> <font color=\"red\"> ". substr($row2['date'],0,10) ." </font>
<a style='font-weight: bold;' href=".$config['http_home_url'].str_replace("-","/",substr($row2['date'],0,10))."/".$row2['alt_name'].".html>".stripslashes($row2[title])."</a>
\n";
}
$map .= "</ul>\n";
}

#ubiriote sledujusije kovycki /* */ jesli nado ctoby pokazyvalo staticeskije stranicy
/*
$result = $db->query("SELECT id, name, descr FROM " . PREFIX . "_static ORDER BY name ASC");
while($row = $db->get_row($result)){
$map .= "<span style='padding-left:20px;padding-bottom:10px;font-size:16px;'><a style='font-weight: bold;' href='".$config['http_home_url']."static/{$row[name]}.html' style='font-size:10pt;font-weight:bold;'>$row[descr]</a></span><p>\n";
}
*/
create_cache("sitemap", $map);
}

$tpl->load_template('static.tpl');
$tpl->set('{description}', "&nbsp;");
$tpl->set('{static}', $map);
$tpl->compile('content');
$tpl->clear();

?>