ttl = "5"; $rss_gen->htmlentities = true; $rss_gen->pubDate = date("r"); $rss_gen->link = "http://www.czfree.net"; $rss_gen->title = "CZFree.Net - posledni prispevky"; $rss_gen->description = "Posledni prispevky na foru CZFree.Net"; $rss_gen->image_url = "http://czfree.net/forum/images/czfree/czfree-logo.gif"; $maxlimit=time()-60*60*48; //$sqlwhere="thread.lastpost>=".(time() - (24 * 60 *60 * $days))." AND thread.open<>10"; $sqlwhere="thread.visible=1 AND post.dateline>=$maxlimit AND user.userid=post.userid AND forum.forumid<>47 AND forum.forumid<>122 AND forum.parentlist NOT LIKE '%127%' AND thread.threadid<>18588 AND modtype<3"; $sqlorder="post.dateline DESC"; switch ($_GET["feed"]) { case "news": $rss_gen->title = "CZFree.Net - novinky"; $rss_gen->description = "Novinky na foru CZFree.Net"; $sql = "SELECT headline as title, pagetext as description, CONCAT('http://czfree.net/forum/showthread.php?postid=',postid,'#post',postid) as link, CONCAT(DATE_FORMAT(FROM_UNIXTIME(news.dateline),'%a, %d %b %Y %T'),' +0100') as pubDate, MD5(pagetext) as guid FROM news ORDER BY dateline DESC LIMIT 10"; break; default: $rss_gen->title = "CZFree.Net - posledni prispevky"; $rss_gen->description = "Posledni prispevky na foru CZFree.Net"; $sql = "SELECT CONCAT('[',forum.title,'] ',thread.title,' (',user.username,')') as title, CONCAT('\n',post.title,'\n',pagetext) as description, forum.title as category, CONCAT('http://czfree.net/forum/showthread.php?postid=',postid,'#post',postid) as link, CONCAT('http://czfree.net/forum/showthread.php?postid=',postid,'#post',postid) as guid, CONCAT(DATE_FORMAT(FROM_UNIXTIME(post.dateline),'%a, %d %b %Y %T'),' +0100') as pubDate FROM (post LEFT JOIN thread USING (threadid) LEFT JOIN forum using (forumid)),user WHERE $sqlwhere ORDER BY $sqlorder LIMIT 40"; } $res = $DB_site->query($sql); $rss_gen->Generate(null, $res); ?>