\n" . $pp_xml; $pp_xhtml = pp_xml_transform($pp_xml,"rss.xslt"); $links = array(); $links[] = array("name" => "rss", "url" => "rss.php"); echo GetMainTemplate(pp_bbdecode($pp_xhtml), $links); } $pp_channelarr = array('', 'film', 'zene', 'irodalom', 'szinhaz', 'epiteszet', 'kepzomuveszet', '', 'gyerek', 'hirek'); if ($pp_action == 'r' && $pp_channel != '') { $catarr = array_keys($pp_channelarr, $pp_channel); $cat = ($pp_channel == 'osszes')?'':' and cat>='.$catarr[0].'0 and cat <= '.$catarr[0].'9'; $pp_query = "(select a.aid as id, a.title, a.lead, a.cdate, ac.cat, '1' as mi, a.body FROM prae2014.tbl_article a, prae2014.tbl_article_categories ac WHERE a.state_deleted=0".$cat." and a.state_quarantined=0 and ac.aid=a.aid ORDER BY a.cdate DESC LIMIT 20) union (select a.aid as id, a.title, a.lead, a.cdate, ac.cat, '2' as mi, a.body FROM prae2014.tbl_news a, prae2014.tbl_news_categories ac WHERE a.state_deleted=0".$cat." and a.state_quarantined=0 and ac.aid=a.aid ORDER BY a.cdate DESC LIMIT 5) ORDER BY cdate desc LIMIT 20"; //print $pp_query; exit; $pp_res=pp_sql_query($pp_query); header('Content-Type: application/xml'); echo ''."\n"; echo ''."\n"; echo "\n"; echo "prae.hu\n"; echo "http://prae.hu\n"; echo "hu\n"; echo "http://blogs.law.harvard.edu/tech/rss\n"; echo "prae.hu\n"; echo "prae.hu hĂ­rcsatorna / $pp_channel"; echo "\n"; echo "Copyright prae.hu\n"; echo "info@prae.hu\n"; echo "info@prae.hu\n"; echo "".date("D, j M Y H:i:s O", strtotime("now"))."\n"; echo "60\n"; echo "\n"; echo "http://www.prae.hu/_images/front/praelogo.png\n"; echo "prae.hu\n"; echo "http://prae.hu\n"; echo "PRAE\n"; echo "128\n"; echo "47\n"; echo "\n"; while($pp_resline = pp_select_toarray($pp_res)) { $TimeStamp = strtotime($pp_resline['cdate']); $mit="/\[cimg(\d+)\]/imsUu"; $lead=preg_replace($mit, "", $pp_resline['lead']); $which=($pp_resline['mi']=='1')?'article':'news'; echo "\n"; echo "".$pp_resline['title']."\n"; echo "".$lead."\n"; echo "http://prae.hu/index.php?route=".$which."/".$which."&aid=".$pp_resline['id']."\n"; echo "http://prae.hu/index.php?route=".$which."/".$which."&aid=".$pp_resline['id']."\n"; echo "".date("D, j M Y H:i:s O", $TimeStamp)."\n"; echo "\n"; } echo "\n"; echo "\n"; } pp_sql_disconnect(); ?>