<? header('Content-type: text/xml'); ?>
<? 	include_once('admin/db.php'); ?>
<rss version="2.0">
<channel>
<title>Philadelphia Mixing Solutions</title>
<description>Philadelphia Mixing Solutions</description>
<link>http://<?=$_SERVER['SERVER_NAME'].dirname($_SERVER['PHP_SELF'])?>/</link>
<copyright>2008 Philadelphia Mixing Solutions Limited - All rights reserved. A Wind River Holdings Company</copyright>
<?
$news_cat = "-'1'|'2'|'3'|'4'|'5'/";
$news_cat = str_replace(array("-","|","/"),array(" && (news_catagory.Catagory_id="," || news_catagory.Catagory_id=",")"),$news_cat);
$query = 	"SELECT * FROM news, news_cat_list, news_catagory 
	WHERE (news.News_id = news_cat_list.News_id && news_catagory.Catagory_id = news_cat_list.Catagory_id)
	".$news_cat."ORDER BY news.News_date DESC  LIMIT 0,15 ";

$doGet=mysql_query($query);

?>
<?
while($result = mysql_fetch_array($doGet)){
?>
     <item>
        <title> <?=htmlspecialchars(strip_tags($result['News_subject'])); ?></title>
        <description> <?=substr(htmlspecialchars(strip_tags($result['News_text'],'ENT_QUOTES')),0,300);?>...(more)</description>
        <link>http://<?=$_SERVER['SERVER_NAME'].dirname($_SERVER['PHP_SELF'])?>/news.php?news=<?=$result['News_id'];?></link>
        <pubDate> <?=strftime( "%a, %d %b %Y %T %Z" , $result['News_date']); ?></pubDate>
     </item>  
<? } ?>  
<?=mysql_error();?>
</channel>
</rss>