<?php
define('NTOP', 1);
require_once ('system/connect.php');
require_once ('system/core.php');
require_once ('system/function.php');
$all = mysql_num_rows(mysql_query("SELECT * FROM `".$prefix."sait`"));
if($all != 0) {
echo '<?xml version="1.0" encoding="UTF-8"?> 
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
';
$top = mysql_query("SELECT * FROM `".$prefix."sait` ORDER BY `hosts` DESC");
while($row = mysql_fetch_array($top))
{
echo '<url>
  <loc>http://keotop.ru/site/'.$row['url'].'</loc> 
  <lastmod>'.date("Y-m").'-10</lastmod> 
  <changefreq>never</changefreq> 
  <priority>0.5</priority> 
  </url>
';
}
echo '</urlset>';
}
?>