<?php
//header("content-type: text/xml;charset=windows-1256");
include("connect.php");
header ('Content-type: text/xml');

$dat = date("j/n/Y",time());

echo "<?xml version=\"1.0\" encoding=\"windows-1256\"?>\n\n";
echo "<rss version=\"2.0\">\n\n";
echo "<channel>\n";

echo "<title>".$name_site." RSS</title>\n\n";
echo "<link>".$name_path."</link>\n\n";
echo "<date>".$dat."</date>\n";
echo "<ttl>40</ttl>\n";
echo "<description>".$LANGAUGE[290]."</description>\n";

$sql = mysql_query("select * from `news` where active='1' order by id desc limit 15");
while($row = mysql_fetch_array($sql))
{
$row['sub'] = text(3,$row['sub']);
$row['thumbs'] = text(3,$row['thumbs']);
$row['image'] = text(3,$row['image']);
$row['short'] = text(2,$row['short']);
$row['editor'] = text(3,$row['editor']);
$row['news'] = strip_tags($row['news']);
$news = text(3,$Row2['news']);

if ($htmlorphp=="1"){
$l = "news-".$row['id'].".html";
}else{
$l = "news.php?action=view&id=".$row['id']."";
}
$d = date("r",$row['date']);

echo"<item>\n";
echo "<title>".$row['sub']."</title>\n";
echo "<description><![CDATA[".$row['short']."]]></description>\n";
echo "<pubDate>".$d."</pubDate>\n";
echo "<guid>".$name_path."/".$l."</guid>\n";
echo "<link>".$name_path."/".$l."</link>\n";
echo"</item>\n";
}

echo "</channel>\n ";
echo "</rss>";
?>