<?php
include '../includes/db_global.php';
include '../includes/define_cnt.php';

?>
<?php header('Content-type: text/xml'); ?>
<rss version="2.0">
<channel>
<title>CanalAvist</title>
<description>A description of your site</description>
<link>http://www.canalavist.org/</link>
<copyright>Copyright CanalAvist</copyright>


<?php
		$qry_sql = "SELECT * FROM events ".
								 "WHERE status_id = ". TB_STATUS_APPROVE. " ".
								 "ORDER BY start_date ASC LIMIT 10";
		$result  = db_get_result($qry_sql);
		
		while($rs=mysql_fetch_object($result)){
			?>
			<item>
		    <title> <?php print htmlentities(strip_tags( $rs->title)); ?></title>
		    <description> <?php print htmlentities(strip_tags($rs->organizer.', '.$rs->venue,'ENT_QUOTES'));?></description>
		    <link><?php print $rs->web_link?></link>
		    <pubDate> <?php print $rs->created_date; ?></pubDate>
		 </item>  
			<?php
			
		}
?>


  
</channel>
</rss>

