Вход Регистрация
Файл: CMS/news/rss.php
Строк: 72
<?php
define
('CMS',TRUE);
define('ROOT','../');
require(
'../core/init.php');

error_reporting(0);
header("Content-type:application/rss+xml; charset=utf-8");
echo 
'<?xml version="1.0" encoding="utf-8"?>';
echo 
'<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel>';
echo 
'<title>' . $config['site_title'] . ' - Новости</title>';
echo 
'<link>' . $config['site_url'] . '</link>';
echo 
'<description>Новости RSS - ' . $config['site_title'] . '</description>';
echo 
'<image><url></url>';
echo 
'<title>' . $config['site_title'] . ' News</title>';
echo 
'<link>' . $config['site_url'] . '</link></image>';
echo 
'<language>ru</language>';
echo 
'<copyright>' . $config['site_copy'] . '</copyright>';
echo 
'<managingEditor>' . $config['email'] . ' (' . $config['nickname'] . ')</managingEditor>';
echo 
'<webMaster>' . $config['email'] . ' (' . $config['nickname'] . ')</webMaster>';
echo 
'<lastBuildDate>' . date("r", SITE_TIME) . '</lastBuildDate>';

$rows = $db->select("SELECT * FROM ?_news ORDER BY `news_id` DESC LIMIT 15;");

foreach(
$rows as $data) {

    
$data['news_text'] = bb_code($data['news_text']);
    
$data['news_text'] = str_replace('../images/smiles', $config['site_url'] . '/images/smiles', $data['news_text']);
    
$data['news_text'] = htmlspecialchars($data['news_text']);

    echo 
'<item><title>' . $data['news_title'] . '</title>';
    echo 
'<link>' . $config['site_url'] . '/news/' . gen_uri('news', $data['news_id']) . '</link>';
    echo 
'<description>' . $data['news_text'] . ' </description>';
    echo 
'<author>' . nickname($data['news_author']) . '</author>';
    echo 
'<pubDate>' . date("r", $data['news_time']) . '</pubDate>';
    echo 
'<category>Новости</category>';
    echo 
'<guid>' . $config['site_url'] . '/news/' . gen_uri('news', $data['news_id']) . '</guid></item>';
}

echo 
'</channel></rss>';

?>
Онлайн: 1
Реклама