Exemple #1
0
                    }
                    CMeetingInstance::Update($key, $arFields);
                }
                if (isset($arFields['TASK_ID'])) {
                    if (!$arFields['ITEM_ID']) {
                        $arFields['ITEM_ID'] = $arResult['MEETING']['AGENDA'][$key]['ITEM_ID'];
                    }
                    CMeetingItem::AddTask($arFields['ITEM_ID'], $arFields['TASK_ID']);
                }
            }
        }
        if ($bDeleted) {
            CMeetingItem::DeleteAbandoned();
        }
        if ($bUpdateEvent && is_array($arEventParams)) {
            CMeeting::AddEvent($arEventParams[0], $arEventParams[1], $arEventParams[2]);
        }
        if ($_REQUEST['save_type'] == 'BGSAVE') {
            $APPLICATION->RestartBuffer();
            ?>
<script type="text/javascript">
if (top.document.forms.meeting_edit)
{
	top.document.forms.meeting_edit.MEETING_ID.value = '<?php 
            echo $MEETING_ID;
            ?>
';
<?php 
            if ($arParams['COPY']) {
                ?>
	top.document.forms.meeting_edit.COPY.parentNode.removeChild(top.document.forms.meeting_edit.COPY);
Exemple #2
0
                CMeeting::Update($MEETING_ID, $arFields);
            }
        }
        $dbRes = CMeeting::GetByID($MEETING_ID);
        if ($arMeeting = $dbRes->Fetch()) {
            if ($arMeeting['EVENT_ID'] > 0) {
                $ownerId = $USER->GetID();
                $arMeeting['USERS'] = CMeeting::GetUsers($MEETING_ID);
                foreach ($arMeeting['USERS'] as $userId => $userRole) {
                    if ($userRole == CMeeting::ROLE_OWNER) {
                        $ownerId = $userId;
                    }
                }
                $arMeeting['OWNER_ID'] = $ownerId;
                $arMeeting['REINVITE'] = false;
                CMeeting::AddEvent($MEETING_ID, $arMeeting);
            }
            Header('Content-Type: application/json');
            echo "{id: '" . $MEETING_ID . "', state: '" . $arMeeting['CURRENT_STATE'] . "', date_start: '" . MakeTimeStamp($arMeeting['DATE_START']) . "000'}";
        }
    }
} elseif (isset($_REQUEST['PLACE_ID'])) {
    $arPlace = CMeeting::CheckPlace($_REQUEST['PLACE_ID']);
    if (is_array($arPlace) && $arPlace['ROOM_IBLOCK'] > 0 && $arPlace['ROOM_ID'] > 0) {
        $eventId = intval($_REQUEST['EVENT_ID']);
        $eventStart = CMeeting::MakeDateTime($_REQUEST['DATE_START_DATE'], $_REQUEST['DATE_START_TIME']);
        $eventFinish = CMeeting::MakeDateTime($_REQUEST['DATE_START_DATE'], $_REQUEST['DATE_START_TIME'], $_REQUEST['DURATION']);
        $arFilter = array("ACTIVE" => "Y", "IBLOCK_ID" => $arPlace['ROOM_IBLOCK'], "SECTION_ID" => $arPlace['ROOM_ID'], "<DATE_ACTIVE_FROM" => $eventFinish, ">DATE_ACTIVE_TO" => $eventStart, "PROPERTY_PERIOD_TYPE" => "NONE");
        $reservationId = 0;
        if ($eventId > 0) {
            $arEvent = CMeeting::GetEvent($eventId);