function GetRSS($ID, $LANG, $TYPE, $LIMIT_NUM = false, $LIMIT_DAY = false, $yandex = false) { $dbr = GetIBlockListLang($LANG, $TYPE, array($ID)); $bAccessable = False; if (($arIBlock = $dbr->GetNext()) && $arIBlock["RSS_ACTIVE"] == "Y") { $bAccessable = True; } echo "<" . "?xml version=\"1.0\" encoding=\"" . LANG_CHARSET . "\"?" . ">\n"; echo "<rss version=\"2.0\""; // echo "<rss version=\"2.0\" xmlns=\"http://backend.userland.com/rss2\""; // if ($yandex) echo " xmlns:yandex=\"http://news.yandex.ru\""; echo ">\n"; if ($bAccessable) { echo CIBlockRSS::GetRSSText($arIBlock, $LIMIT_NUM, $LIMIT_DAY, $yandex); } echo "</rss>\n"; }
/** * Returns list of the information blocks of specified $type linked to the current site * * @param string $type Information blocks type to get blocks from. * @param array|string|int $arTypesInc Information block ID or CODE or array of IDs or CODEs to get. * @param array|string|int $arTypesExc Information block ID or CODE or array of IDs or CODEs to exclude. * @param array $arOrder Order in which blocks will be returned. * @param int $cnt Maximum count of iblocks to be returned. * * @return CIBlockResult * @deprecated No longer used by internal code and not recommended. */ function GetIBlockList($type, $arTypesInc = array(), $arTypesExc = array(), $arOrder = array("sort" => "asc"), $cnt = 0) { return GetIBlockListLang(SITE_ID, $type, $arTypesInc, $arTypesExc, $arOrder, $cnt); }
function GetIBlockList($type, $arTypesInc = array(), $arTypesExc = array(), $arOrder = array("SORT" => "ASC"), $cnt = 0) { return GetIBlockListLang(LANG, $type, $arTypesInc, $arTypesExc, $arOrder, $cnt); }