<?php 



// PHPLOCKITOPT NOENCODE

$isearch_path = './search';
define('IN_ISEARCH', true);

require_once("$isearch_path/inc/core.inc.php");
require_once("$isearch_path/inc/search.inc.php");

/* Open the search component (read only) */
isearch_open(True);

/* Show flat site map (ordered by url) */
$result = mysql_query("SELECT url, lastmod, changefreq, priority FROM $isearch_table_urls ORDER BY url", $isearch_ro_db);
if (!$result)
{
    echo "<P>MySQL error : " . mysql_error() . ' File: ' . __FILE__ . ', Line:' . __LINE__ . "</P>\n";
}
else if (mysql_num_rows($result) > 0)
{
header('Content-Type: text/xml');
    echo '<?xml version="1.0" encoding="UTF-8"?>
<urlset
  xmlns="http://www.google.com/schemas/sitemap/0.84"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://www.google.com/schemas/sitemap/0.84
                      http://www.google.com/schemas/sitemap/0.84/sitemap.xsd">
';
    while ($item = mysql_fetch_object($result))
    {
        echo '	<url>
		<loc>'.str_replace("&","&amp;",$item->url).'</loc>
		<lastmod>'.date('Y-m-d').'</lastmod>
		<priority>0.8</priority>
	</url>
';
    }
    echo '</urlset>';
}
?>