<?php
ini_set("short_open_tag",0); // opcjonalnie
header('Content-type: application/xml; charset="utf-8"');
echo '<?xml version="1.0" encoding="utf-8">?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
    <title>Nasze Radio 104,7 FM</title>
    <link>http://nasze.fm</link>
    <description>Najnowsze wiadomości z regionu</description>
    <language>pl</language>
    <copyright>Copyright 2009, Nasze Radio</copyright>
    <managingEditor>angelus@nasze.pl</managingEditor>
    <webMaster>angelus@nasze.pl</webMaster>
    <pubDate>Sat, 13 Sep 2003 08:00:46 EET</pubDate>
<image>
<title>Nasze Radio 104,7 FM</title>
<url>http://nasze.fm/logo01.jpg</url>
<link>http://nasze.fm</link>
<width>950</width>
<height>80</height>
</image>';
include 'polacz.php';
$id=1;
$data='Sat, 20 Dec 2003 21:00:00 GMT';
$temat=1;
$wstep=1;
$tresc =1;
echo '<item>
<link>http://www.nasze.fm/index.php?a=news&b='.$id.'</link>
<title>'.$temat.'</title>
<description><![CDATA['.$wstep.']]></description>
<category>newsy?:P</category>
<pubDate>'.$data.'</pubDate>
</item>';
$zap = "SELECT * FROM newsy WHERE what='n' AND kosz='0' ORDER BY data DESC, LIMIT 0,5";
$zap = mysql_query($zap) or die(mysql_error()."błąd z pobieraniem newsów!");
while($row = mysql_fetch_array($zap))
{
/*
$id = $row['id'];
$data = $row['data'];
$temat = $row['temat'];
$wstep = $row['introduce'];
$tresc = $row['tresc'];
*/
$id=1;
$data=1;
$temat=1;
$wstep=1;
$tresc =1;
echo '<item>
<link>http://www.nasze.fm/index.php?a=news&b='.$id.'</link>
<title>'.$temat.'</title>
<description><![CDATA['.$wstep.']]></description>
<category>newsy?:P</category>
<pubDate>'.$data.'</pubDate>
</item>';
} 
echo '</channel>
</rss>';
?>
