caching = true; $smarty->cache_lifetime = 172800;//Два дня function delxml ($text) { // ФУНКЦИЯ очистки кода $old1 = array(".xml", "info-");#Ищем вредное ">",, "<" $new1 = array("", "");#Меняем на полезное">", , "<" $text = str_replace($old1, $new1, $text);#Собсно сама замена =) return $text; } function delbugs ($text) { // ФУНКЦИЯ очистки кода $old1 = array(" ");#Ищем вредное ">",, "<" $new1 = array("");#Меняем на полезное">", , "<" $text = str_replace($old1, $new1, $text);#Собсно сама замена =) return $text; } // /rss/info-0-999.xml //берем из адресной строки гет с по урезаем xml $description=\core::getSettings('about'); $period=delxml($_GET['id']); $pieces = explode("-",$period); $table=mb_substr($_GET['id'], 0, 5); if ($table=='info-') $table='pages'; $rss=\DB::getAll("SELECT `id`,`title`, `time`, `json`, `txt` FROM `content` WHERE `status`=1 AND `site`=?",$_SERVER['SERVER_NAME']);// array( $_SERVER['SERVER_NAME'], $pieces[0] , $pieces[1] ) $count=count($rss); for ($i=0; $i<$count; $i++){ $rss[$i]['alias']=\core::j($rss[$i]['json'])['alias']; } $smarty->assign('rss', @$rss); $smarty->assign('description', strip_tags(delbugs(@$description))); ?>