File size: 1.37Kb
<?php
#############################################
##UTF-8;lang-ru,en;"Monospace"(regular)[10]##
#############################################
##########################
##Отключение вывода ошибок
error_reporting(0);
##########################
//Подключение системных файлов
@include_once 'connect.php';
@include_once 'conf.php';
//<<
header('Content-type:application/rss+xml; charset=utf-8');
echo '<?xml version="1.0" encoding="utf-8" ?>';
echo '<rss version="2.0"><channel>';
echo '<title>'.RSS_TITLE.'</title>';
echo '<link>'.RSS_LINK.'</link>';
echo '<description>'.RSS_DESCRIPTION.'</description>';
echo RSS_IMAGE;
echo '<language>'.RSS_LANG.'</language>';
echo '<copyright>'.RSS_COPY.'</copyright>';
echo '<managingEditor>'.RSS_ME.'</managingEditor>';
echo '<webMaster>'.RSS_MASTER.'</webMaster>';
$sql = "SELECT * FROM mns_news ORDER BY news_date DESC LIMIT 0,".COL."";
$query = mysql_query($sql) or die(mysql_error());
while($res = mysql_fetch_array($query))
{
echo '<item>';
echo '<title>'.htmlspecialchars($res["news_theme"]).'</title>' ;
echo '<link>/index.php?do=1&id='.$res["news_id"].'</link>';
echo '<description>'.stripslashes($res["news_text"]).'</description>';
echo '<pubDate>'.date("d.m.y/H:i",$res["news_date"]).'</pubDate>';
echo '</item>';
}
echo '</channel>';
echo '</rss>';
?>