<?php header("Content-type: text/xml");
echo '<'.'?xml version="1.0" encoding="UTF-8"?'.'>'; 
?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<?php 
  include "inc/db.php";
  // Meldungen
  $result = mysql_query ( 
    " SELECT news.id           AS news_id         " .
    "   FROM news                                 " .
	"  WHERE news.vondatum     <= CURRENT_DATE    " .
	"    AND news.bisdatum     >= CURRENT_DATE    " .
	"    AND news.pageid        = '1'             " .
	"  ORDER BY news.vondatum DESC, news.id DESC  " )
   or die ( "Fehler in " . __FILE__ . " Zeile Nr. " . __LINE__ . " - " . mysql_error() );
  
  while ( $line = mysql_fetch_array($result) ) {
    include "inc/leseSqlResult.php";	
	print("<url>\n<loc>http://www.materialeinkauf.at/emsol/?show=$news_id</loc>\n<changefreq>monthly</changefreq>\n     <priority>0.7</priority>\n</url>\n");
  }
?>  
</urlset>