Esempio n. 1
0
        if (strpos($key,"filter")===0 && is_array($value))
            $c += count($value);
    }
    return $c;
}


//======== Process sections (if in category of depth = 1)
$htmlForSections="";
if ($_REQUEST['is_root_section']) {
    $propFilter = $GLOBALS["arrFilterAjaxSection"];
    $sectionId = $_REQUEST['section_id'];
    $arFilter = Array("IBLOCK_ID" => $arResult["IBLOCK_ID"], "SECTION_ID" => $sectionId);
    $arFilter = array_merge($propFilter,$arFilter);
    require_once($_SERVER["DOCUMENT_ROOT"] . "/include/Sections.php");
    $nonEmptySections = Sections::GetNonEmpty3($arFilter);
    $htmlForSections = Sections::GenerateMarkup($nonEmptySections);
}
//============================

echo json_encode(
    array(
        "html" => ($html) ? $html : "",     // elements
        "sectionsHtml" => $htmlForSections, // sections
        "page" => ($page) ? $page : "",
        "showall" => $showAll,
        "nonEmptyProps" => $nonEmptyProps,
        "filterExpr" => $filterExpr
    )
);
?>