| Server IP : 103.82.32.14 / Your IP : 216.73.217.121 Web Server : Apache/2.2.32 (Unix) mod_ssl/2.2.32 OpenSSL/1.0.1e-fips mod_fcgid/2.3.9 System : Linux cloud.lonmanhoabinh.com 2.6.32-754.35.1.el6.x86_64 #1 SMP Sat Nov 7 12:42:14 UTC 2020 x86_64 User : lonmakmf ( 524) PHP Version : 5.6.30 Disable Function : NONE MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /home/blogwnph/public_html/rss/ |
Upload File : |
<?php
/*
////////////////////////////////////////////////////////////////////////////////
// JohnCMS Mobile Content Management System //
// Project site: http://johncms.com //
// Support site: http://gazenwagen.com //
////////////////////////////////////////////////////////////////////////////////
// Lead Developer: Oleg Kasyanov (AlkatraZ) alkatraz@gazenwagen.com //
// Development Team: Eugene Ryabinin (john77) john77@gazenwagen.com //
// Dmitry Liseenko (FlySelf) flyself@johncms.com //
////////////////////////////////////////////////////////////////////////////////
// Спасибо Esi0n за помощь в написании модуля RSS
*/
define('_IN_JOHNCMS', 1);
require_once ('../incfiles/core.php');
header('content-type: application/rss+xml');
echo '<?xml version="1.0" encoding="utf-8"?>' .
'<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel>' .
'<title>' . htmlspecialchars($set['copyright']) . ' | News</title>' .
'<link>' . $set['homeurl'] . '</link>' .
'<description>News</description>' .
'<language>vi-VI</language>' .
'<webMaster>' . $set['email'] . '</webMaster> ';
// Новости
$req = mysql_query("SELECT * FROM `forum` WHERE `type` = 't' and kedit='0' AND `close`!='1' ORDER BY `time` DESC LIMIT 20");
if (mysql_num_rows($req) > 0) {
while ($res = mysql_fetch_assoc($req)) {
echo '<item>
<title>'.$res['text'].'</title>
<pubDate>'.$res['time'].'</pubDate>
<link>'.$home.'/forum/index.php?id='.$res['id'].'</link>
<author>ADMIN</author>
<dc:creator>ADMIN</dc:creator>
</item>
';
}
}
// Библиотека
$req = mysql_query("select * from `lib` where `type`='bk' and `moder`='1' order by `time` desc LIMIT 15;");
if (mysql_num_rows($req) > 0) {
while ($res = mysql_fetch_array($req)) {
echo '<item>' .
'<title>Library: ' . $res['name'] . '</title>' .
'<link>' . $set['homeurl'] . '/library/index.php?id=' . $res['id'] . '</link>' .
'<author>' . $res['avtor'] . '</author>' .
'<description>' . $res['announce'] .
'</description>' .
'<pubDate>' . date('r', $res['time']) . '</pubDate>' .
'</item>';
}
}
echo '</channel></rss>';
?>