<?php include 'url_amigable.php';?>
<? $salida = "<?xml version='1.0' encoding='UTF-8'?>
<urlset
      xmlns='http://www.sitemaps.org/schemas/sitemap/0.9'
      xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
      xsi:schemaLocation='http://www.sitemaps.org/schemas/sitemap/0.9
            http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd'>
<!-- created with Free Online Sitemap Generator www.xml-sitemaps.com -->
";

include('concha.php');

 $salida .= "<url>
  <loc>$dom</loc>
   </url>";
?>


<?
mysql_connect ("$host", "$usuario", "$contra");
mysql_select_db ("$basedatos");

$sql = "SELECT * FROM menu ORDER BY ID";

$consulta = mysql_query ($sql);
while ($row = mysql_fetch_array($consulta))
{
$nombre = $row["nombre"];
$tipo = $row["tipo"];
$link = $row["link"];
$ID_menu = $row["ID"];


    if ($tipo == 'noticias'){  
	



$sql55 = "SELECT * FROM categorias WHERE ID = '$link'";
$consulta55 = mysql_query ($sql55);
while ($row55 = mysql_fetch_array($consulta55))
{
$titulo_cat = $row55["nombre"];

}
mysql_free_result($consulta55);

include 'url_amigable.php';

	
	 $titulo_cat = urls_amigables($titulo_cat);
	
	
	
   
$salida .= "<url>
  <loc>$dom/noticias/$link/$titulo_cat</loc>
   </url>  ";
	 
	 
	 };

}
mysql_free_result($consulta); ?>



<?
mysql_connect ("$host", "$usuario", "$contra");
mysql_select_db ("$basedatos");

$sql = "SELECT * FROM notas ORDER BY ID desc";

$consulta = mysql_query ($sql);
while ($row = mysql_fetch_array($consulta))
{
$ID = $row["ID"];
$titulo = $row["titulo"];


$titulo = urls_amigables($titulo);

$salida .= "

  <url>
  <loc>$dom/nota/$ID/$titulo</loc>
   </url>

        ";


}
mysql_free_result($consulta);





		

$salida .= "			

</urlset>";



$fh = fopen("config.xml","w");  
fwrite($fh,$salida); 
fclose($fh); 

?>


<style type="text/css">
<!--
.Estilo1 {
	font-family: "Trebuchet MS";
	font-size: 18px;
}
-->
</style>
<p align="center" class="Estilo1">INFORMACION SINCRONIZADA</p>
<p align="center" class="Estilo1"> [<a href="javascript:close()">CERRAR ESTA VENTANA</a>] </p>