<?php  
echo "<" . "?xml version=\"1.0\" encoding=\"UTF-8\"" . "?" . ">";
echo '
<urlset xmlns="http://www.google.com/schemas/sitemap/0.84"> 
<url>
  <loc>http://www.toucheexperiencias.com/</loc>
  <changefreq>weekly</changefreq>
  <priority>1.00</priority>
</url>
<url>
  <loc>http://www.toucheexperiencias.com/menu.php</loc>
  <changefreq>weekly</changefreq>
  <priority>0.80</priority>
</url>
<url>
  <loc>http://www.toucheexperiencias.com/formacion.php</loc>
  <changefreq>weekly</changefreq>
  <priority>0.64</priority>
</url>
<url>
  <loc>http://www.toucheexperiencias.com/viajes.php</loc>
  <changefreq>weekly</changefreq>
  <priority>0.64</priority>
</url>
<url>
  <loc>http://www.toucheexperiencias.com/eventos.php</loc>
  <changefreq>weekly</changefreq>
  <priority>0.64</priority>
</url>
<url>
  <loc>http://www.toucheexperiencias.com/promocion.php</loc>
  <changefreq>weekly</changefreq>
  <priority>0.64</priority>
</url>
<url>
  <loc>http://www.toucheexperiencias.com/presenciales.php?pagina=1</loc>
  <changefreq>weekly</changefreq>
  <priority>0.64</priority>
</url>
<url>
  <loc>http://www.toucheexperiencias.com/somostouche.php</loc>
  <changefreq>weekly</changefreq>
  <priority>0.64</priority>
</url>
<url>
  <loc>http://www.toucheexperiencias.com/escribenos.php</loc>
  <changefreq>weekly</changefreq>
  <priority>0.64</priority>
</url>
<url>
  <loc>http://www.toucheexperiencias.com/avisolegal.php?lightbox[iframe]=true&amp;lightbox[width]=800&amp;lightbox[height]=600</loc>
  <changefreq>weekly</changefreq>
  <priority>0.64</priority>
</url>
<url>
  <loc>http://www.toucheexperiencias.com/pdf/Dossier%20Australias%20Coral%20Sea%20touche%20viajes.pdf</loc>
  <lastmod>2013-09-18T18:03:35+00:00</lastmod>
  <changefreq>weekly</changefreq>
  <priority>0.51</priority>
</url>
<url>
  <loc>http://www.toucheexperiencias.com/pdf/Dossier%20Wild%20West%20Route%2066%20%20touche%20viajes.pdf</loc>
  <lastmod>2013-09-18T18:03:48+00:00</lastmod>
  <changefreq>weekly</changefreq>
  <priority>0.51</priority>
</url>			
			';


include "bd.php";
include "funciones.php";
$Query = "SELECT * FROM categorias where categoria_activo='s'";
$resultado = mysqli_query($conexion, $Query);
$NFilas = mysqli_num_rows($resultado);
for($i=0;$i<$NFilas;$i++)  {
$ResultQuery = mysqli_fetch_assoc($resultado);
$categoria=$ResultQuery["categoria_id"];

$Query2 = "SELECT * FROM cursos where curso_categoria='$categoria' order by curso_titulo asc";
$resultado2 = mysqli_query($conexion2, $Query);
$NFilas2 = mysqli_num_rows($resultado2);
for($j=0;$j<$NFilas2;$j++)  {
$ResultQuery2 = mysql_fetch_array($IdConsulta2);
echo '
<url>
  <loc>http://www.toucheexperiencias.com/cursosdetalle.php?id='.$ResultQuery2["curso_id"].'&amp;nombre=Curso_'.cambia_espacios(rtrim(cambia_textosin($ResultQuery2["curso_titulo"]))).'</loc>
  <lastmod>'.date("Y-m-d").'T18:03:48+00:00</lastmod>
  <changefreq>weekly</changefreq>
  <priority>1</priority>
</url>	';
if ($ResultQuery2["curso_tutor"]<>"")
echo '
<url>
  <loc>http://www.toucheexperiencias.com/Curso-'.$ResultQuery2["curso_id"].'-'.cambia_espacios(ltrim(cambia_textosin($ResultQuery2["curso_titulo"]))).'</loc>
  <lastmod>'.date("Y-m-d").'T18:03:48+00:00</lastmod>
  <changefreq>weekly</changefreq>
  <priority>1</priority>
</url>	';
}
}
$Query2 = "SELECT * FROM presenciales";
$resultado2 = mysqli_query($conexion2, $Query);
$NFilas2 = mysqli_num_rows($resultado2);
for($j=0;$j<$NFilas2;$j++)  {
$ResultQuery2 = mysql_fetch_array($IdConsulta2);
echo '
<url>
  <loc>http://www.toucheexperiencias.com/presencialesdetalle.php?id='.$ResultQuery2["id"].'&amp;nombre=Curso_'.cambia_espacios(rtrim(cambia_textosin($ResultQuery2["titular"]))).'</loc>
  <lastmod>'.date("Y-m-d").'T18:03:48+00:00</lastmod>
  <changefreq>weekly</changefreq>
  <priority>1</priority>
</url>	';

}
echo '</urlset>';
?> 
