fetchDataList("WebArticleListQuery", null, 20, array("order"=>" a.datePublished DESC", "where"=>"d.IDtopic='".$tpl->aSID."'")); $rss .= ''.SolisShop::getStoreConfig("titleHP").''; $rss .= 'http://'.$_SERVER['HTTP_HOST'].''; $rss .= ''.SolisShop::getStoreConfig("metaDescription").''; $rss .= 'cs'; $rss .= ''.gmdate("D, d M Y H:i:s").' GMT'; $rss .= ''.gmdate("D, d M Y H:i:s").' GMT'; $rss .= ''.EMAIL_ADMIN.' ('.EMAIL_ADMIN_NAME.')'; $rss .= ''.EMAIL_ADMIN.' ('.EMAIL_ADMIN_NAME.')'; $rss .= 'Soliscms - info@soliscms.cz'; $rss .= '60'; foreach ($aList->dataList as $k=>$item) { $item->config->URIpositioning='absolute'; $link=$item->getWebHref(); $rss .= ''; $rss .= ''.htmlspecialchars($item->name).''; $rss .= ''.$link.''; $rss .= ''.$link.''; $rss .= ''.$item->getWebDescriptionShort(250).''; $rss .= ''.gmdate("D, d M Y H:i:s", $item->datePublished).' GMT'; $rss .= ''; } $dom = new DOMDocument('1.0', 'UTF-8'); $dom->formatOutput=true; $root = $dom->appendChild(new DOMElement('rss')); $root->setAttributeNode(new DOMAttr('version', '2.0')); // $root->setAttributeNode(new DOMAttr('xmlns:atom', 'http://www.w3.org/2005/Atom')); $f = $dom->createDocumentFragment(); $f->appendXML($rss); $channel = $root->appendChild(new DOMElement('channel')); $channel->appendChild($f); /* $f = $dom->createDocumentFragment(); $f->appendXML(''); $dom->root->channel->appendChild($f);*/ /* $atomlink=new DOMElement('atom:link'); $atomlink->setAttributeNode(new DOMAttr('href', "http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'])); $channel->appendChild($atomlink);*/ $dom->save($file); } $file = ROOT_DIR."/cached/rss-clanky-".$tpl->aSName."".str_replace(".","", VERSION).".xml"; if (!file_exists($file)) setRSS($file); elseif ( (filemtime($file) + 60) < time()) setRSS($file); header("Expires: " . gmdate("D, d M Y H:i:s") . " GMT"); // always modified header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // always modified header("Cache-Control: no-store, no-cache, must-revalidate"); // HTTP/1.1 header("Cache-Control: post-check=0, pre-check=0", false); header("Pragma: no-cache"); // HTTP/1.0 header("Content-Type: application/xml; charset=UTF-8"); echo file_get_contents($file); exit; ?>