<?php header('Content-type: text/xml'); ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>VetClick - Veterinary Jobs</title>
<description>Jobs for veterinary surgeons, nurses and locums</description>
<link>http://www.vetclick.com/</link>
<copyright>All material Copyright VetClick (UK) Ltd 2000 - 2006 All rights reserved</copyright>

<?php
include ("../../database_connection.php");

$q="SELECT *, UNIX_TIMESTAMP(DatePosted) AS DatePosted, jobs.Description as Description FROM jobs, practices, categories WHERE practices.PracticeId = jobs.PracticeId AND jobs.CategoryId = categories.Id AND jobs.DatePosted > (NOW() - INTERVAL 7 DAY) ORDER BY DatePosted DESC LIMIT 20";
$doGet=mysql_query($q);

while($row = mysql_fetch_object($doGet)){


//$Description = str_replace('£','UK Pound',$row->Description);

$Description = preg_replace('/[^\x09\x0A\x0D\x20-\x7F]/e', '"&#".ord($0).";"', $row->Description);

$JobTitle = str_replace('–', '-', $row->JobTitle);
$Description = substr($Description, 0, 200);


?> 
     <item> 
        <title><?=htmlentities(strip_tags($JobTitle)); ?></title>         <description><?=htmlentities(strip_tags($Description,'ENT_QUOTES'));?>...</description> 
        <link>http://www.vetclick.com/recruitment/jobs/view_detail.php?Id=<?=$row->JobId ;?>&amp;PracticeId=<?=$row->PracticeId ;?>&amp;CategoryId=<?=$row->CategoryId ;?></link> 
        <pubDate><?=strftime( "%a, %d %b %Y %T %z" , $row->DatePosted);?></pubDate>
		<guid>http://www.vetclick.com/recruitment/jobs/view_detail.php?Id=<?=$row->JobId ;?>&amp;PracticeId=<?=$row->PracticeId ;?>&amp;CategoryId=<?=$row->CategoryId ;?></guid>
     </item>    
<? } ?>  

<atom:link href="http://www.vetclick.com/recruitment/jobs/rss-feed.xml" rel="self" type="application/rss+xml" />
</channel>
</rss>




