$arResult['MEETING']['CURRENT_RIGHTS'] = $arResult['ACCESS']; //$arResult['MEETING']['USERS'][$USER->GetID()]; // not arParams[USER_ID]! if (!$arResult['MEETING']['CURRENT_RIGHTS']) { return ShowError(GetMessage("ME_MEETING_ACCESS_DENIED")); } $arResult['MEETING']['FILES'] = array(); $dbFiles = CMeeting::GetFiles($arParams['MEETING_ID']); while ($arFile = $dbFiles->Fetch()) { $arResult['MEETING']['FILES'][$arFile['FILE_ID']] = $arFile; } if (!$arParams['COPY'] && $arResult['MEETING']['EVENT_ID'] > 0) { if ($arResult['IS_NEW_CALENDAR']) { $arResult['MEETING']['EVENT'] = CMeeting::GetEvent($arResult['MEETING']['EVENT_ID']); } $arResult['MEETING']['USERS_EVENT'] = array(); $arGuests = CMeeting::GetEventGuests($arResult['MEETING']['EVENT_ID'], $USER->GetID()); foreach ($arGuests as $guest) { $arResult['MEETING']['USERS_EVENT'][$guest['id']] = $guest['status']; } } $arResult['CAN_EDIT'] = $arParams['COPY'] || $arResult['MEETING']['CURRENT_RIGHTS'] == CMeeting::ROLE_OWNER || $arResult['MEETING']['CURRENT_RIGHTS'] == CMeeting::ROLE_KEEPER; $arResult['MEETING']['AGENDA'] = array(); if (!$arParams['COPY']) { $dbRes = CMeeting::GetItems($arParams['MEETING_ID']); while ($arRes = $dbRes->GetNext()) { // if ($arParams['COPY'] && $arRes['INSTANCE_TYPE'] == CMeetingInstance::TYPE_AGENDA) // continue; $arRes['RESPONSIBLE'] = CMeetingInstance::GetResponsible($arRes['ID']); $arRes['REPORTS'] = array(); $dbReports = CMeetingReports::GetList(array('ID' => 'ASC'), array('INSTANCE_ID' => $arRes['ID'])); while ($arReport = $dbReports->Fetch()) {