';
if ($reg != '')
$head .= "Elite Dealers " . ucfirst(trim($reg)) . " Region Feed";
else if ($terr != '')
$head .= "Elite Dealers " . ucwords(str_replace('-', ' ', trim($terr))) . " Territory Feed";
else if ($event != '')
$head .= "Elite Dealers Upcoming Events";
else if ($dealer == 1)
$head .= "All Elite Dealers";
$head .= '
http://www.elite-dealers.com./';
if ($reg != '')
$head .= 'These are our current active Dealers in the '. ucfirst(trim($reg)) . ' Region';
else if ($terr != '')
$head .= 'These are our current active Dealers in the '. ucwords(str_replace('-', ' ', trim($terr))) . ' Territory';
else if ($event == 1)
$head .= "These are our Schedualled Upcoming Events";
else if ($dealer == 1)
$head .= "These are All Active Dealers";
$head .= 'en-us
'.date("d/m/Y").'
';
// xmlns:content="http://purl.org/rss/1.0/modules/content/"
echo $head;
while($row = mysql_fetch_assoc($result)) {
//the channel items, they are the news of your channel. it could be used with database data
if ($event == 1)
$rss->setItemTitle($row['title']);
else
$rss->setItemTitle($row['name']);
if ($row['logo'] != 'no-image.gif') {
$image = "med/" . $row['logo'];
} else if ($row['image1'] != 'no-image.gif') {
$image = "med/" . $row['image1'];
} else if ($row['storefront'] != 'no-image.gif') {
$image = "med/" . $row['storefront'];
} else {
$image = "brand/" . strtolower($row['brand']) . ".jpg";
}
if ($event == 1) {
if ($row['link']) {
$link = json_decode($row['link']);
$linktext = '' . $link->text . '';
} else {
$linktext = '';
}
$rss->setItemLink("http://elite-dealers.com/events.php");
$desc = '' . $row['title'] . '
' . $row['description'] . ' ' . $linktext . '
' . $row['datetime']. ' - ' . $row['location'] . '';
} else {
$rss->setItemImg('http://elite-dealers.com/images/dealers/' . $image);
$rss->setItemLink("http://elite-dealers.com/bussiness_profile.php?dealer=" . $row['dealerid']);
$desc = $row['description'];
}
$rss->setItemDesc($desc);
$rss->setDtPosted('2006-06-16');
echo $rss->newRSS();
//display ad every five articles
if ( ($count % 5) == 0) {
echo $ad;
}
$count++;
}
echo "