当前位置: 首页>>代码示例>>PHP>>正文


PHP CCalendar::ParseLocation方法代码示例

本文整理汇总了PHP中CCalendar::ParseLocation方法的典型用法代码示例。如果您正苦于以下问题:PHP CCalendar::ParseLocation方法的具体用法?PHP CCalendar::ParseLocation怎么用?PHP CCalendar::ParseLocation使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CCalendar的用法示例。


在下文中一共展示了CCalendar::ParseLocation方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: DeleteEmpty

    public static function DeleteEmpty()
    {
        global $DB;
        $strSql = 'SELECT CE.ID, CE.LOCATION
			FROM b_calendar_event CE
			LEFT JOIN b_calendar_event_sect CES ON (CE.ID=CES.EVENT_ID)
			WHERE CES.SECT_ID is null';
        $res = $DB->Query($strSql, false, "FILE: " . __FILE__ . "<br> LINE: " . __LINE__);
        $strItems = "0";
        while ($arRes = $res->Fetch()) {
            $loc = $arRes['LOCATION'];
            if ($loc && strlen($loc) > 5 && substr($loc, 0, 5) == 'ECMR_') {
                $loc = CCalendar::ParseLocation($loc);
                if ($loc['mrid'] !== false && $loc['mrevid'] !== false) {
                    // Release MR
                    CCalendar::ReleaseLocation($loc);
                }
            }
            $strItems .= "," . IntVal($arRes['ID']);
        }
        // Clean from 'b_calendar_event'
        if ($strItems != "0") {
            $DB->Query("DELETE FROM b_calendar_event WHERE ID in (" . $strItems . ")", false, "FILE: " . __FILE__ . "<br> LINE: " . __LINE__);
        }
        CCalendar::ClearCache(array('section_list', 'event_list'));
    }
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:26,代码来源:calendar_event.php

示例2: define

<?php

define("PUBLIC_AJAX_MODE", true);
define("NO_KEEP_STATISTIC", "Y");
define("NO_AGENT_STATISTIC", "Y");
define("NO_AGENT_CHECK", true);
define("DisableEventsCheck", true);
require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_before.php";
header('Content-Type: application/x-javascript; charset=' . LANG_CHARSET);
if (check_bitrix_sessid() && CModule::IncludeModule("calendar")) {
    if (isset($_REQUEST['bx_event_calendar_check_meeting_room']) && $_REQUEST['bx_event_calendar_check_meeting_room'] === 'Y') {
        $check = false;
        $settings = CCalendar::GetSettings();
        $from = CCalendar::Date(CCalendar::Timestamp($_REQUEST['from']));
        $to = CCalendar::Date(CCalendar::Timestamp($_REQUEST['to']));
        $loc_new = CCalendar::ParseLocation(trim($_REQUEST['location']));
        $params = array('dateFrom' => $from, 'dateTo' => $to, 'regularity' => 'NONE', 'members' => false);
        if ($loc_new['mrid'] == $settings['vr_iblock_id']) {
            $params['VMiblockId'] = $settings['vr_iblock_id'];
            $check = CCalendar::CheckVideoRoom($params);
        } else {
            $params['RMiblockId'] = $settings['rm_iblock_id'];
            $params['mrid'] = $loc_new['mrid'];
            $params['mrevid_old'] = 0;
            $check = CCalendar::CheckMeetingRoom($params);
        }
        ?>
<script>top.BXCRES_Check = <?php 
        echo CUtil::PhpToJSObject($check);
        ?>
;</script><?php 
开发者ID:webgksupport,项目名称:alpina,代码行数:31,代码来源:ajax_action.php

示例3: SetLocation

 public static function SetLocation($old = '', $new = '', $Params = array())
 {
     // *** ADD MEETING ROOM ***
     $locOld = CCalendar::ParseLocation($old);
     $locNew = CCalendar::ParseLocation($new);
     $allowReserveMeeting = isset($Params['allowReserveMeeting']) ? $Params['allowReserveMeeting'] : self::$allowReserveMeeting;
     $allowVideoMeeting = isset($Params['allowVideoMeeting']) ? $Params['allowVideoMeeting'] : self::$allowVideoMeeting;
     $RMiblockId = isset($Params['RMiblockId']) ? $Params['RMiblockId'] : self::$settings['rm_iblock_id'];
     $VMiblockId = isset($Params['VMiblockId']) ? $Params['VMiblockId'] : self::$settings['vr_iblock_id'];
     // If not allowed
     if (!$allowReserveMeeting && !$allowVideoMeeting) {
         return $locNew['mrid'] ? $locNew['str'] : $new;
     }
     if ($locOld['mrid'] !== false && $locOld['mrevid'] !== false) {
         if ($allowVideoMeeting && $locOld['mrid'] == $VMiblockId) {
             CCalendar::ReleaseVideoRoom(array('mrevid' => $locOld['mrevid'], 'mrid' => $locOld['mrid'], 'VMiblockId' => $VMiblockId));
         } elseif ($allowReserveMeeting) {
             CCalendar::ReleaseMeetingRoom(array('mrevid' => $locOld['mrevid'], 'mrid' => $locOld['mrid'], 'RMiblockId' => $RMiblockId));
         }
     }
     if ($locNew['mrid'] !== false) {
         if ($Params['bRecreateReserveMeetings']) {
             // video meeting
             if ($allowVideoMeeting && $locNew['mrid'] == $VMiblockId) {
                 $mrevid = CCalendar::ReserveVideoRoom(array('mrid' => $locNew['mrid'], 'dateFrom' => $Params['dateFrom'], 'dateTo' => $Params['dateTo'], 'name' => $Params['name'], 'description' => GetMessage('EC_RESERVE_FOR_EVENT') . ': ' . $Params['name'], 'persons' => $Params['persons'], 'members' => $Params['attendees'], 'VMiblockId' => $VMiblockId));
             } elseif ($allowReserveMeeting) {
                 $mrevid = CCalendar::ReserveMeetingRoom(array('RMiblockId' => $RMiblockId, 'mrid' => $locNew['mrid'], 'dateFrom' => $Params['dateFrom'], 'dateTo' => $Params['dateTo'], 'name' => $Params['name'], 'description' => GetMessage('EC_RESERVE_FOR_EVENT') . ': ' . $Params['name'], 'persons' => $Params['persons'], 'members' => $Params['attendees']));
             }
         } elseif (is_array($locNew) && $locNew['mrevid'] !== false) {
             $mrevid = $locNew['mrevid'];
         }
         if ($mrevid && $mrevid != 'reserved' && $mrevid != 'expire' && $mrevid > 0) {
             $locNew = 'ECMR_' . $locNew['mrid'] . '_' . $mrevid;
         } else {
             $locNew = '';
         }
     } else {
         $locNew = $locNew['str'];
     }
     return $locNew;
 }
开发者ID:andy-profi,项目名称:bxApiDocs,代码行数:41,代码来源:calendar.php

示例4: GetEvent

 public static function GetEvent($eventId)
 {
     if (self::IsNewCalendar()) {
         $arEvent = CCalendarEvent::GetByID($eventId);
         if ($arEvent['LOCATION']) {
             $arEvent['LOCATION'] = CCalendar::ParseLocation($arEvent['LOCATION']);
         }
         return $arEvent;
     }
 }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:10,代码来源:meeting.php


注:本文中的CCalendar::ParseLocation方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。