Location: PHPKode > projects > JobAppr > Jobappr-1.4/jobfeed.php
<?
header('Content-type: text/xml'); 
require_once('includes/functions.php');	
?>

<rss version="2.0">
<channel>

<title><?php echo meta('site_name'); ?> RSS Feed</title>
<description><?php echo meta('site_description'); ?></description>
<link><?php echo BASE_URL; ?></link>
<copyright>Copyright <?php echo date('Y'); ?>, <?php echo meta('site_name'); ?></copyright>
<language>en-us</language>

<?

# requirements: has preview flag, has completed flag and is not expired=Y
$select = "SELECT * FROM ".TB_JOBS." WHERE preview IS NOT NULL AND completed IS NOT NULL AND expired IS NULL ORDER BY category,job_id DESC LIMIT ". meta('rss_max_count');
$result = mysql_query($select);

while($job = mysql_fetch_assoc($result)) {
		if ($job['highlight'] == 'Y') {	$hlt = 'Featured: ';	} else {$hlt = '';	}
		$cat = $job['category'];
		$slug = BASE_URL . clean_url($job['location']).'/'.clean_url($job['title']).'/'.$job['job_id'].'/';
		
		echo '
		<item>
			<title>'.$job['title'].'</title>
			<description>'.$job['location'].' - '.strip_tags($job['description']).'</description>
  		<link>'.$slug.'</link>
  	</item>
  ';

	}

?></channel></rss>
Return current item: JobAppr