useCached(); $rss->title = "KEPEA RSS"; $rss->description = "News from kepea.gr"; $rss->link = "http://www.kepea.gr/rss"; $rss->syndicationURL = "http://www.kepea.gr/".$PHP_SELF; $image = new FeedImage(); $image->title = "KEPEA"; $image->url = "http://www.kepea.gr/images/rss.jpg"; $image->link = "http://www.kepea.gr"; $image->description = "Feed provided by kepea.gr. Click to visit."; $rss->image = $image; $r=mysql_query("select a.*, b.catname FROM mynews a, cats b WHERE ((a.catid='18') or (a.catid='19') or (a.catid='137') or (a.catid='138')) and ((a.status='1') or ((a.status = '4') and (a.outdate <= now()) and (a.enddate >= now()))) and b.catid=a.catid order by cmsid desc limit 0,20"); while ($m = mysql_fetch_array($r)) { $hh = substr($m["inpdate"],11,2); $mn = substr($m["inpdate"],14,2); $ss = substr($m["inpdate"],17,2); $dd = substr($m["inpdate"],8,2); $mm = substr($m["inpdate"],5,2); $yy = substr($m["inpdate"],0,4); $item = new FeedItem(); $item->title = $m["mytitle"] . " (" . $m["catname"] . ")"; $item->link = "http://www.kepea.gr/article.php?id=" . $m["cmsid"]; $item->description = $m["mydescr"]; if ($yy > 2009) $item->date = mktime($hh, $mn, $ss, $mm, $dd, $yy); else $item->date = mktime('10', '00', '00', '07', '29', '2010'); $item->source = "http://www.kepea.gr"; $item->author = "Kepea.gr"; $rss->addItem($item); } $rss->saveFeed("RSS1.0", "../uplds/feed1.xml"); ?>