public static function ServicesRedirect()
 {
     if (isset($_REQUEST["add_service"]) && $_REQUEST["add_service"]) {
         $service = DrclinicsHelper::getServices($_REQUEST["add_service"]);
         $service = end($service);
         if ($service) {
             $section = self::getSefviceMediaspect($service["ID"], $service["IBLOCK_SECTION_ID"]);
             if ($section) {
                 self::ServicesSession($service["ID"], "add");
                 LocalRedirect($section["SECTION_PAGE_URL"]);
             }
         }
     }
 }
示例#2
0
    $arItems[$k]["ACTIVE"] = $active_direction == $arItem["ID"];
    if ($arItems[$k]["ACTIVE"]) {
        $currentItem = $arItems[$k];
        if (isset($arParams["ADD_SECTION_CHAIN"]) && $arParams["ADD_SECTION_CHAIN"] == "Y") {
            $APPLICATION->AddChainItem("Услуги и цены", "/nashi-uslugi/med-uslugi/");
            if ($currentItem['NAME']) {
                $APPLICATION->AddChainItem($currentItem['NAME'], $currentItem["SECTION_PAGE_URL"]);
            }
        }
        if (isset($arParams["SET_TITLE"]) && $arParams["SET_TITLE"] == "Y") {
            $currentItem['NAME'] = $currentItem['NAME'] ? $currentItem['NAME'] : 'Услуги и цены';
            $APPLICATION->SetTitle($currentItem['NAME']);
        }
    }
    $k++;
}
$arResult = $currentItem;
$arResult["FILTERS"] = DrclinicsHelper::getMediaspectFilters(isset($arResult["ID"]) ? $arResult["ID"] : false);
if (isset($_SESSION["PICKED_SERVICES"]) && $_SESSION["PICKED_SERVICES"]) {
    $arResult['PICKED_SERVICES'] = DrclinicsHelper::getServices($_SESSION["PICKED_SERVICES"], false, true);
} else {
    $arResult['PICKED_SERVICES'] = array();
}
$arResult['ITEMS'] = $arItems;
$arResult["TAB"] = isset($_REQUEST["active_tab"]) && $_REQUEST["active_tab"] ? $_REQUEST["active_tab"] : "";
$arResult["VIEW_ALL_LINK"] = isset($arParams['VIEW_ALL_LINK']) ? $arParams['VIEW_ALL_LINK'] : "Y";
$arResult['SERVICES_ITEMS_COUNT'] = isset($arParams['SERVICES_ITEMS_COUNT']) && $arParams['SERVICES_ITEMS_COUNT'] > 0 ? $arParams['SERVICES_ITEMS_COUNT'] : 0;
$arResult['DOCTORS_ITEMS_COUNT'] = isset($arParams['DOCTORS_ITEMS_COUNT']) && $arParams['DOCTORS_ITEMS_COUNT'] > 0 ? $arParams['DOCTORS_ITEMS_COUNT'] : 0;
$arResult['CLINICS_ITEMS_COUNT'] = isset($arParams['CLINICS_ITEMS_COUNT']) && $arParams['CLINICS_ITEMS_COUNT'] > 0 ? $arParams['CLINICS_ITEMS_COUNT'] : 0;
$arResult['PROGRAMS_ITEMS_COUNT'] = isset($arParams['PROGRAMS_ITEMS_COUNT']) && $arParams['PROGRAMS_ITEMS_COUNT'] > 0 ? $arParams['PROGRAMS_ITEMS_COUNT'] : 0;
$this->IncludeComponentTemplate();