<?php 
/******************************************************************************
* linkbase 1.1.                                                           *
* Copyright (C) 2008 -  Predrag Rukavina - admin@phpform.net             *
* http://phpform.net/                                                   *
******************************************************************************/

/******************************************************************************
*  Any attempt to remove or alter "Powered by PHPForm.net" link will          *
*  automatically wave your rights to any use of linkbase 1.1. software!       *
*                                                                             *
* This program is distributed in the hope that it will be useful,             *
* but WITHOUT ANY WARRANTY; without even the implied warranty of              *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.                        *
*                                                                             *
******************************************************************************/
session_start();
require_once('pdba/config.php');
include('pdba/functions.php');

require_once('pdba/options.php');

print '<?xml version="1.0"?><rss version="2.0">';

?><channel><title>PalmDesertBook.com COUPONS</title><link>http://palmdesertbook.com/coupons.rss</link><description>Everyday Coupons from PalmDesertBook.com</description><ttl>30</ttl><?php
$result = mysql_query("SELECT * FROM oscoup WHERE main = 2 ORDER BY coid DESC")
or die(mysql_error());  
while($myrow = mysql_fetch_assoc($result))
{
$headline = htmlspecialchars($myrow[headline], ENT_QUOTES);
$subhead = htmlspecialchars($myrow[subhead], ENT_QUOTES);
?>
<item><title><?php print $headline; ?></title><link>http://www.palmdesertbook.com/coupon.php?id=<?php print $myrow[busid]; ?>&amp;print=<?php print $myrow[coid]; ?></link><description><?php print $subhead; ?></description></item><?php } ?></channel></rss>