ACC SHELL

Path : /srv/www/vhosts/unitedsolution/
File Upload :
Current File : /srv/www/vhosts/unitedsolution/rss.php

<?php

exit;

header ('Expires: ' . gmdate('D, d M Y H:i:s') . '  GMT');
header ('Last-Modified: ' . gmdate('D, d M Y H:i:s') . '  GMT');
header ('Content-Type: application/xml');

//$bad  = array('<', '&', '>', "'", '"');
//$good = array('&lt;', '&amp;',  '&gt;', '&apos;', '&quot;');

$bad  = array('&','<', '>');
$good = array('&amp;','&lt;','&gt;');


echo  '<?xml version="1.0" encoding="utf-8"?'.'>'. "\n"
     . '<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">'. "\n"
     .  '<channel>'. "\n"
     .  '<title>barevný tisk a kopírování tisk.digi.cz</title>'. "\n"
     .   '<link>http://www.tisk.digi.cz/</link>'. "\n"
     .   '<description>Nabízíme nejlevnější berevný i černobílý tisk a kopírování v Brně. Přinášíme komplexní tiskový servis od digitálního tisku po ofsetový tisk.</description>'. "\n"
     .   '<language>cs</language>'. "\n"
     .   '<pubDate>' . gmdate("D, d M Y H:i:s") . " GMT" . '</pubDate>'. "\n"
     .   '<lastBuildDate>' . gmdate("D, d M Y H:i:s") . " GMT" . '</lastBuildDate>'. "\n". "\n";


 include_once('admin/connect.php');
 connect();

 $query    = "SELECT id, title, memo,seo_url, DATE_FORMAT(date,'%d.%m.%Y') AS datum, DATE_FORMAT(date,'%a, %d %b %Y %H:%i:%s') AS datum_en
		      FROM ".DBPREFIX."novinky					
		      ORDER BY id DESC ";
		
 $result   = mysql_query($query);
		    
 while($row = mysql_fetch_object($result)) {
 
  $dest = stripslashes(str_replace($bad, $good, $row->memo));
  $dest = ereg_replace("(\<object(.)*\<\/object)","",$dest);
  //strip_tags(
  //$dest = $row->memo;
  echo  '<item>' . "\n"
       . '<title>'.$row->title . '</title>' . "\n"
       . '<link>http://www.tisk.digi.cz/Novinky/' . $row->seo_url . '/</link>' . "\n"
       . '<description>' . $dest . '</description>' . "\n"
       . '<pubDate>' . $row->datum_en . ' GMT</pubDate>' . "\n"
       //xs. '<guid>http://www.tisk.digi.cz/Novinky/' . $row->id . '/</guid>' . "\n"
       .'</item>' . "\n". "\n";
 }  
        
echo '<atom:link href="http://www.tisk.digi.cz/rss.php" rel="self" />' ."\n"
     . '</channel>' . "\n"
     .'</rss>';
?>

ACC SHELL 2018