http://elite-dealers.com/wholesale_parts_advertisement.php Elite Dealers Wholesale Marketing Solutions ]]> '; } //events feed //$result = mysql_query("select * from `events` where `status` = 'active' order by `pos` asc"); //dealers feeds if (isset($_GET['dealer']) && $_GET['dealer'] != '') { $dealer = intval($_GET['dealer']); $insString = ''; if (isset($_GET['terr']) && $_GET['terr'] != '') { $terr = mysql_real_escape_string($_GET['terr']); $insString .= "territory LIKE '%" . str_replace('-', ' ', trim($terr)) . "%'"; } if (isset($_GET['reg']) && $_GET['reg'] != '') { $reg = mysql_real_escape_string($_GET['reg']); $insString .= 'region = \'' . $reg . '\''; } if ($insString != '') $insString = ' and ' . $insString; $result = mysql_query("select * from dealers where status = 'active'" . $insString . ' order by name asc'); mysql_num_rows($result); //echo "select * from dealers where status = 'active'" . $insString; } else if (isset($_GET['event']) && $_GET['event'] != '') { $event = 1; $result = mysql_query("select * from events where status = 'active' order by pos asc"); } //My constructor $rss = new RSS(); //The name o channel of new of my rss feed //$rss->setChannelTitle("My RSS Feed!"); //The link to the channel or site //$rss->setChannelLink("http://elite-dealers.com/rss/rss.php"); //The channel description //$rss->setChannelDesc("These are the elite dealers in the " . $row['territory'] . " area."); //The channel language //$rss->setLanguage("en-us"); //The copyritht //$rss->setCopyRight("Copyright Elite Dealers 2012"); $head = ' '; 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 "
"; ?>