File size: 2.28Kb
<?php
#-----------------------------------------------------#
# ********* WAP-MOTORS ********* #
# Made by : VANTUZ #
# E-mail : [email protected] #
# Site : http://pizdec.ru #
# WAP-Site : http://visavi.net #
# ICQ : 36-44-66 #
# Вы не имеете право вносить изменения в код скрипта #
#-----------------------------------------------------#
require_once"../template/start.php";
require_once"../template/regglobals.php";
require_once"../template/config.php";
require_once"../template/functions.php";
require_once"../template/antidos.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>'.$config_title.' News</title>';
echo '<link>'.$config_home.'</link>';
echo '<description>Новости RSS - '.$config_title.'</description>';
echo '<image><url>'.$config_logotip.'</url>';
echo '<title>'.$config_title.' News</title>';
echo '<link>'.$config_home.'</link></image>';
echo '<language>ru</language>';
echo '<copyright>'.$config_copy.'</copyright>';
echo '<managingEditor>'.$config_emails.'</managingEditor>';
echo '<webMaster>'.$config_emails.'</webMaster>';
echo '<lastBuildDate>'.date(r,time()).'</lastBuildDate>';
$file = file("../local/news.dat");
$file = array_reverse($file);
$total = count($file);
if($total>15){$total=15;}
for ($i=0;$i<$total;$i++){
$data = explode("|",$file[$i]);
$data[1]=str_replace('<img src="../images/smiles','<img src="'.$config_home.'/images/smiles',$data[1]);
$data[1]=str_replace('" alt="">','" alt="">',$data[1]);
list($uday, $umonth, $uyear) = explode(".", $data[2]);
list($uhour, $umin) = explode(":", $data[3]);
$usecond = mktime($uhour,$umin,'0',$umonth,$uday,$uyear);
echo '<item><title>'.$data[0].'</title><link>'.$config_home.'</link>';
echo '<description>'.$data[1].' </description><author>'.$data[4].'</author>';
echo '<pubDate>'.date(r,$usecond).'</pubDate><category>Новости</category><guid>'.$config_home.'/news/komm.php?id='.$data[5].'</guid></item>';
}
echo '</channel></rss>';
?>