<?php header('Content-type: text/xml');
require_once("../setup.php");
$datetoday	= date("Y-m-d");
$timenow	= date("H:i");
 
echo "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>";
?>

<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>London Quality Assurance Reference Centre</title>
    <link>http://www.londonqarc.nhs.uk/</link>
    <description>Quality Assurance is a fundamental part of the NHS Cancer Screening Programmes (NHSCSP’s).</description>
    <language>en-gb</language>
    <pubDate><?php echo date("D, d M Y H:i:s"); ?> GMT</pubDate>

    <lastBuildDate><?php echo date("D, d M Y H:i:s"); ?> GMT</lastBuildDate>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <generator>Weblog Editor 2.0</generator>
    <managingEditor>qarefcentre@bartsandthelondon.nhs.uk</managingEditor>
    <webMaster>qarefcentre@bartsandthelondon.nhs.uk</webMaster>
    <atom:link href="http://www.londonqarc.nhs.uk/rss/latestupdates.xml" rel="self" type="application/rss+xml" />

<?php
$pages_results =& $dbQarc->getAll("SELECT page_id, section_name, qarc_content_pages.id, ins_date FROM qarc_content_pages left join qarc_sections ON qarc_content_pages.id=qarc_sections.section_id 
WHERE status = 10 AND (parent = 2 || parent = 19 || parent = 75)
ORDER BY qarc_sections.ins_date DESC LIMIT 10");
checkDBError($pages_results);
// echo $qry;

foreach ($pages_results as $row) {
	?><item>
      <title><?php echo strip_tags(str_replace("&", "&amp;", $row['section_name'])); ?></title>
      <link>http://www.londonqarc.nhs.uk/section.php?id=<?php echo $row['page_id']; ?></link>
      <pubDate><?php echo date("D, d M Y"); ?> GMT</pubDate>
    </item>

<?php } ?>
</channel>
</rss>