<?php
	include('dbconnect.php');
	include('misc.php');
	$entries=GetData::GetTableRowsWhere("post", "where pub=1 and cat<900 order by d desc limit 5"); 
?>
<? header('Content-type: text/xml'); ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Jesser.Org</title>
		<link>http://www.jesser.org</link>
		<atom:link href="http://jesser.org/feed.xml" rel="self" type="application/rss+xml" />
		<description>Matt and Jess share their world of cooking, crafts, projects, travel, photography, dogs, art, and fun.</description>
		<pubDate><?php list($y,$m,$d)=sscanf($entries[0]['d'], "%d-%d-%d"); list($h,$mn,$s)=sscanf($entries[0]['t'], "%d:%d:%d"); echo date("D, d M Y H:i:s", mktime($h,$m,$s,$m,$d,$y)); echo " MST"; ?></pubDate>		
		<ttl>360</ttl>
		<image>
			<link>http://www.jesser.org</link>
			<url>http://www.jesser.org/images/rss_title.gif</url>
			<title>Jesser.Org</title>
			<width>100</width>
			<height>36</height>
		</image>
		<?php foreach($entries as $entry) { ?>
		<item>
			<title><?php echo strip_tags($entry['title']); ?></title>
			<description><![CDATA[<?php echo $entry['entry']; if($entry['more']) { echo $entry['more']; } ?>]]></description>
			<link>http://www.jesser.org/index.php?pid=<?php echo $entry['pid']; ?></link>
			<guid>http://www.jesser.org/index.php?pid=<?php echo $entry['pid']; ?></guid>
			<pubDate>
				<?php 
					list($y,$m,$d)=sscanf($entry['d'], "%d-%d-%d"); 
					list($h,$mn,$s)=sscanf($entry['t'],"%d:%d:%d");  
					echo date("D, d M Y H:i:s", mktime($h,$mn,$s,$m,$d,$y)); echo " MST"; 
				?>
			</pubDate>
			<comments>http://www.jesser.org/index.php?pid=<?php echo $entry['pid']; ?></comments>
		</item>
		<?php } ?>
	</channel>
</rss>