if ($_REQUEST['AGENDA_EX'] && check_bitrix_sessid()) { $APPLICATION->RestartBuffer(); $arResult['POPUP'] = $_REQUEST['POPUP'] == 'Y'; $this->IncludeComponentTemplate('agenda_ex'); die; } $arResult['USERS'] = array(); $dbUsers = CUser::GetList($by = 'ID', $order = 'ASC', array('ID' => implode('|', array_keys($arResult['MEETING']['USERS'])))); while ($arUser = $dbUsers->GetNext()) { $arResult['USERS'][$arUser['ID']] = $arUser; } if (CModule::IncludeModule('forum')) { $obForumConnector = new CMeetingForumHandlers($arParams['FORUM_ID'], $arResult['MEETING']); $arParams['FORUM_ID'] = $obForumConnector->GetForumID(); foreach ($arResult['MEETING']['AGENDA'] as &$arItem) { $arItem['COMMENTS_COUNT'] = intval(CForumTopic::GetMessageCount($arParams['FORUM_ID'], "MEETING_ITEM_" . $arItem['ITEM_ID'], true)); if ($arItem['COMMENTS_COUNT'] > 0) { $arItem['COMMENTS_COUNT']--; } } } CJSCore::Init(array('ajax', 'popup', 'date', 'meeting')); if ($arResult['CAN_EDIT']) { $APPLICATION->AddHeadScript('/bitrix/js/main/utils.js'); $APPLICATION->AddHeadScript('/bitrix/js/main/dd.js'); } if ($arParams['EDIT'] && $arResult['CAN_EDIT'] || isset($arResult["MEETING"]["PLACE_ID"])) { $arResult['MEETING_ROOMS_LIST'] = array(); if ($arParams['RESERVE_MEETING_IBLOCK_ID'] || $arParams['RESERVE_VMEETING_IBLOCK_ID']) { $dbMeetingsList = CIBlockSection::GetList(array('IBLOCK_ID' => 'ASC', 'NAME' => 'ASC', 'ID' => 'DESC'), array('IBLOCK_ID' => array(intval($arParams['RESERVE_MEETING_IBLOCK_ID']), intval($arParams['RESERVE_VMEETING_IBLOCK_ID']))), false, array('ID', 'IBLOCK_ID', 'NAME', 'DESCRIPTION')); while ($arRoom = $dbMeetingsList->Fetch()) {
$arResult["SHOW_SUBSCRIBE"] = ((($arParams["SHOW_SUBSCRIBE"] == "Y") && ($arResult["USER"]["ID"] > 0 && $arResult["USER"]["PERMISSION"] > "E")) ? "Y" : "N"); $arResult["TOPIC_SUBSCRIBE"] = $arResult["USER"]["TOPIC_SUBSCRIBE"]; $arResult["FORUM_SUBSCRIBE"] = $arResult["USER"]["FORUM_SUBSCRIBE"]; $arResult["SHOW_LINK"] = (empty($arResult["read"]) ? "N" : "Y"); $arResult["SHOW_POSTS"] = (empty($arResult["MESSAGES"]) ? "N" : "Y"); $arResult["PARSER"] = $parser; $arResult["CURRENT_PAGE"] = $APPLICATION->GetCurPageParam(); $arResult["ELEMENT_REAL"] = $arResult["ELEMENT"]; $arResult["ELEMENT"] = array( "PRODUCT" => $arResult["ELEMENT"], "PRODUCT_PROPS" => array()); if (is_set($arResult["ELEMENT_REAL"], "PROPERTY_FORUM_TOPIC_ID_VALUE")) { $arResult["ELEMENT"]["PRODUCT_PROPS"]["FORUM_TOPIC_ID"] = array("VALUE" => $arResult["ELEMENT_REAL"]["PROPERTY_FORUM_TOPIC_ID_VALUE"]); $arResult["ELEMENT"]["PRODUCT_PROPS"]["~FORUM_TOPIC_ID"] = array("VALUE" => $arResult["ELEMENT_REAL"]["~PROPERTY_FORUM_TOPIC_ID_VALUE"]); } if (is_set($arResult["ELEMENT_REAL"], "PROPERTY_FORUM_MESSAGE_CNT_VALUE")) { $arResult["ELEMENT"]["PRODUCT_PROPS"]["FORUM_MESSAGE_CNT"] = array("VALUE" => $arResult["ELEMENT_REAL"]["PROPERTY_FORUM_MESSAGE_CNT_VALUE"]); $arResult["ELEMENT"]["PRODUCT_PROPS"]["~FORUM_MESSAGE_CNT"] = array("VALUE" => $arResult["ELEMENT_REAL"]["~PROPERTY_FORUM_MESSAGE_CNT_VALUE"]); } /* For custom template */ // ***************************************************************************************** $this->IncludeComponentTemplate(); // ***************************************************************************************** if ($arResult["FORUM_TOPIC_ID"] > 0) return CForumTopic::GetMessageCount($arParams["FORUM_ID"], $arResult["FORUM_TOPIC_ID"], (($arResult["USER"]["RIGHTS"]["MODERATE"] == "Y")?null:true)); else return 0; ?>
$res['LINK'] = array('SECTION_ID' => $res[CWebDavIblock::UF_LINK_SECTION_ID], 'IBLOCK_ID' => $res[CWebDavIblock::UF_LINK_IBLOCK_ID], 'CAN_FORWARD' => $res[CWebDavIblock::UF_LINK_CAN_FORWARD]); } if ($res["TYPE"] == "S" && isset($selfSharedSections[$res['ID']])) { $res['SHARED_SECTION'] = array('SECTION_ID' => $selfSharedSections['SECTION_ID'], 'IBLOCK_ID' => $selfSharedSections['IBLOCK_ID'], 'USER_ID' => $selfSharedSections['USER_ID']); } if (in_array("SECTION_CNT", $aColumns) || in_array("SECTIONS_CNT", $aColumns)) { $res["SECTION_CNT"] = $res["SECTIONS_CNT"] = intVal(CIBlockSection::GetCount(array("IBLOCK_ID" => $arParams["IBLOCK_ID"], "SECTION_ID" => $res["ID"]))); } if (in_array("ELEMENT_CNT", $aColumns) || in_array("ELEMENTS_CNT", $aColumns)) { $res["ELEMENT_CNT"] = $res["ELEMENTS_CNT"] = intVal(CIBlockSection::GetSectionElementsCount($res["ID"], array("CNT_ALL" => "Y"))); } } $res["~PATH"] = $res["PATH"]; $res["PATH"] = $ob->_uencode($res["~PATH"], array("utf8" => "Y", "convert" => $arParams["CONVERT"])); if ($arParams['USE_COMMENTS'] === 'Y' && CModule::IncludeModule('forum')) { $res["PROPERTY_FORUM_MESSAGE_CNT_VALUE"] = CForumTopic::GetMessageCount($arParams["FORUM_ID"], $res["PROPERTY_FORUM_TOPIC_ID_VALUE"], true); if ($res["PROPERTY_FORUM_MESSAGE_CNT_VALUE"] !== false) { $res["PROPERTY_FORUM_MESSAGE_CNT_VALUE"]--; } } else { $res["PROPERTY_FORUM_MESSAGE_CNT_VALUE"] = false; } /*********************** Name **************************************/ //$res["NAME"] = WrapLongWords($res["NAME"]); /*********************** Path **************************************/ __prepare_item_info($res, $arParams); /*********************** Actions ***********************************/ // Subscribe if ($res["TYPE"] != "S" && $res["SHOW"]["SUBSCRIBE"] == "Y") { $res["SUBSCRIBE"] = !empty($arResult["USER"]["SUBSCRIBE"]["TOPICS"][$res["PROPERTY_FORUM_TOPIC_ID_VALUE"]]) ? "N" : "Y"; }