<?php header('Content-type: text/xml'); ?>

<rss version="2.0">
<channel>
<title>Nafol</title>
<description>National Forensic Science Laboratory, Lalitpur, Nepal</description>
<link>http://www.nafol.gov.np/</link>
<copyright>All content copyright to Nafol</copyright>

<?php
//$q="SELECT newsletter_id, newesletter_head, newsletter_body,UNIX_TIMESTAMP(datetime) AS pubDate FROM `tbl_newsletter` LIMIT 0,15 ORDER BY pubDate DESC";
include_once("../admin/functions.php");
connectdb();
$q="SELECT newsletter_id, newsletter_head, newsletter_body, newsletter_datetime FROM `tbl_newsletter` order by newsletter_datetime desc LIMIT 0 , 5";
$doGet=mysql_query($q);
?>

<?php
while($result = mysql_fetch_array($doGet)){
?>       
	<item>            
        <title><?php echo $result['newsletter_head']; ?></title>
      <!--  <description><?php //echo substr($result['newsletter_body'],0,10); ?></description> -->
	 	<link>http://localhost/nafol/news.php?id=<? echo $result['newsletter_id']; ?></link>
		<pubDate><? echo strftime($result[newsletter_datetime]); ?></pubDate>
	</item>
<?php } ?>        

</channel>
</rss>
