<?php header('Content-type: text/xml'); include("_includes/database.php"); ?>
<rss version="2.0">
<channel>
<title>Clearly A Blog</title>
<description>Things happen. When those things apply to Clearpage our clients or anything else that sparks our interest you can read about it here.</description>
<link>http://clearpage.net</link>
<copyright>2006 Clearpage Interactive</copyright>

<?php

$rs = mysql_query("SELECT * FROM blog ORDER BY blog_date desc LIMIT 0,50");

while ( $row = mysql_fetch_array($rs) ) {


$blog_id = $row["blog_id"];
$blog_date = $row["blog_date"];

$blog_day = date("D", strtotime($blog_date));
$blog_month = date("M", strtotime($blog_date));
$blog_day_num = date("d", strtotime($blog_date));
$blog_year = date("o", strtotime($blog_date));


$blog_year_link = date("y", strtotime($blog_date));
$blog_month_link = date("m", strtotime($blog_date));

?>
	 <item>
        <title><?=htmlentities(strip_tags($row['blog_title'])); ?></title>
        <description><?=htmlentities(strip_tags($row['blog_description'],'ENT_QUOTES'));?></description>
        <link><?=htmlentities(strip_tags("http://clearpage.net/blog.php?month=$blog_month_link&year=$blog_year_link#$blog_id")); ?></link>
        <pubDate><?= strip_tags("$blog_day, $blog_day_num $blog_month $blog_year 08:00:00 CST"); ?></pubDate>
     </item>  
	 
<? } ?>  

</channel>
</rss>

