<?php
include($_SERVER["DOCUMENT_ROOT"] . "/inc/init.php");

?>
<rss version="2.0">
	<channel>
		<title> Resolution Interactive Media Inc. </title>
		<language>en-us</language><link>http://www.resolutionim.com/</link>
		<description>Team Blogs</description>
		<docs>http://www.resolutionim.com/rss/</docs>
			
		<generator>Resolution Interactive Media Inc.</generator>
		<managingEditor>jonathan@resolutionim.com</managingEditor>
		<webMaster>webmaster@resolutionim.com</webMaster>
				<image>
					<url>http://www.resolutionim.com/images/resolutionim.gif</url>
					<title> Resolution Interactive Media Inc. </title>
					<link>http://www.resolutionim.com/</link>
				</image>
				
	<?php
				
	$getBlogItems = "SELECT itemID, shortURL, systemName, title, content, sysDateCreated FROM tblPosts WHERE sysActive = '1' AND sysOpen= '1' ORDER BY sysDateCreated DESC;";
	$result = draggin_query($getBlogItems);
	
	if(mysql_num_rows($result)) {
			while($RS = draggin_fetch_array($result)) {
					print "
						<item>
						<title><![CDATA[" . stripslashes($RS['title']). "]]></title>";
						
						if(!empty($RS['shortURL'])) {
							print "<link>  $RS[shortURL] </link>";
						} else {
							print "<link> http://www.resolutionim.com/feed/$RS[systemName] </link>";
						}
						
						
						print "
						<description><![CDATA[" . stripslashes($RS['content']) . "]]></description>
			
						<pubDate> " .  date("r", strtotime($RS['sysDateCreated'])) . " </pubDate>
						";
						if(!empty($RS['shortURL'])) {
							print "<guid isPermaLink=\"true\"> $RS[shortURL] </guid>";
						} else {
							print "<guid isPermaLink=\"true\"> http://www.resolutionim.com/feed/$RS[systemName] </guid>";
						}
						
						print "</item>
						
						";
				
			}
	}
	?>

 </channel>

<?php mysql_close($DRAGGIN['dbgen']['link']); ?></rss>
