if (!isset($YANDEX_EXPORT) || !is_array($YANDEX_EXPORT))
{
$YANDEX_EXPORT = array();
}
$boolAll = false;
$intCountChecked = 0;
$intCountAvailIBlock = 0;
$arIBlockList = array();
$db_res = CIBlock::GetList(Array("IBLOCK_TYPE"=>"ASC", "NAME"=>"ASC"),array('CHECK_PERMISSIONS' => 'Y','MIN_PERMISSION' => 'W'));
while ($res = $db_res->Fetch())
{
if ($ar_res1 = CCatalog::GetByID($res["ID"]))
{
$arSiteList = array();
$rsSites = CIBlock::GetSite($res["ID"]);
while ($arSite = $rsSites->Fetch())
{
$arSiteList[] = $arSite["SITE_ID"];
}
$boolYandex = (in_array($res['ID'],$YANDEX_EXPORT));
$arIBlockList[] = array(
'ID' => $res['ID'],
'NAME' => $res['NAME'],
'IBLOCK_TYPE_ID' => $res['IBLOCK_TYPE_ID'],
'YANDEX_EXPORT' => $boolYandex,
'SITE_LIST' => '('.implode(' ',$arSiteList).')',
);
if ($boolYandex)
$intCountChecked++;
$intCountAvailIBlock++;
}
}
if ($intCountChecked == $intCountAvailIBlock)
$boolAll = true;
?>
foreach ($arIBlockList as $key => $arIBlock)
{
?>
" checked>
}
?>
|