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


PHP CCalendar::IsPersonal方法代码示例

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


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

示例1: SectionDelete

 public static function SectionDelete($arParams = array(), $nav = null, $server = null)
 {
     $userId = CCalendar::GetCurUserId();
     $methodName = "calendar.section.delete";
     if (isset($arParams['type'])) {
         $type = $arParams['type'];
     } else {
         throw new Exception(GetMessage('CAL_REST_PARAM_EXCEPTION', array('#REST_METHOD#' => $methodName, '#PARAM_NAME#' => 'type')));
     }
     if (isset($arParams['ownerId'])) {
         $ownerId = intval($arParams['ownerId']);
     } elseif ($type == 'user') {
         $ownerId = $userId;
     } else {
         throw new Exception(GetMessage('CAL_REST_PARAM_EXCEPTION', array('#REST_METHOD#' => $methodName, '#PARAM_NAME#' => 'ownerId')));
     }
     if (isset($arParams['id']) && intVal($arParams['id']) > 0) {
         $id = intVal($arParams['id']);
     } else {
         throw new Exception(GetMessage('CAL_REST_SECT_ID_EXCEPTION'));
     }
     if (!CCalendar::IsPersonal($type, $ownerId, $userId) && !CCalendarSect::CanDo('calendar_edit_section', $id, $userId)) {
         throw new Exception(GetMessage('CAL_REST_ACCESS_DENIED'));
     }
     $res = CCalendar::DeleteSection($id);
     if (!$res) {
         throw new Exception(GetMessage('CAL_REST_SECTION_DELETE_ERROR'));
     }
     return $res;
 }
开发者ID:Satariall,项目名称:izurit,代码行数:30,代码来源:calendar_restservice.php

示例2: FormatDate

    $event['UF_CRM_CAL_EVENT'] = false;
}
$event['UF_WEBDAV_CAL_EVENT'] = $UF['UF_WEBDAV_CAL_EVENT'];
if (empty($event['UF_WEBDAV_CAL_EVENT']['VALUE'])) {
    $event['UF_WEBDAV_CAL_EVENT'] = false;
}
$event['FROM_WEEK_DAY'] = FormatDate('D', $fromTs);
$event['FROM_MONTH_DAY'] = FormatDate('j', $fromTs);
$event['FROM_MONTH'] = FormatDate('n', $fromTs);
$arHost = CCalendar::GetUser($event['MEETING_HOST'], true);
$arHost['AVATAR_SRC'] = CCalendar::GetUserAvatarSrc($arHost);
$arHost['URL'] = CCalendar::GetUserUrl($event['MEETING_HOST'], $arParams["PATH_TO_USER"]);
$arHost['DISPLAY_NAME'] = CCalendar::GetUserName($arHost);
$curUserStatus = '';
$userId = CCalendar::GetCurUserId();
$viewComments = CCalendar::IsPersonal($event['CAL_TYPE'], $event['OWNER_ID'], $userId) || CCalendarSect::CanDo('calendar_view_full', $event['SECT_ID'], $userId);
if ($event['IS_MEETING'] && empty($event['ATTENDEES_CODES'])) {
    $event['ATTENDEES_CODES'] = CCalendarEvent::CheckEndUpdateAttendeesCodes($event);
}
if ($event['IS_MEETING']) {
    $attendees = array('y' => array('users' => array(), 'count' => 4, 'countMax' => 8, 'title' => GetMessage('EC_ATT_Y'), 'id' => "bxview-att-cont-y-" . $event['ID']), 'n' => array('users' => array(), 'count' => 2, 'countMax' => 3, 'title' => GetMessage('EC_ATT_N'), 'id' => "bxview-att-cont-n-" . $event['ID']), 'q' => array('users' => array(), 'count' => 2, 'countMax' => 3, 'title' => GetMessage('EC_ATT_Q'), 'id' => "bxview-att-cont-q-" . $event['ID']), 'm' => array('users' => array(), 'count' => 4, 'countMax' => 8, 'title' => GetMessage('EC_ATT_M'), 'id' => "bxview-att-cont-m-" . $event['ID']));
    if (is_array($event['~ATTENDEES'])) {
        foreach ($event['~ATTENDEES'] as $att) {
            if ($userId == $att["USER_ID"]) {
                $curUserStatus = $att['STATUS'];
                $viewComments = true;
            }
            $att['AVATAR_SRC'] = CCalendar::GetUserAvatarSrc($att);
            $att['URL'] = CCalendar::GetUserUrl($att["USER_ID"], $arParams["PATH_TO_USER"]);
            $status = strtolower($att['STATUS']) == 'h' || $att['STATUS'] == '' ? 'y' : $att['STATUS'];
            // ?
开发者ID:webgksupport,项目名称:alpina,代码行数:31,代码来源:template.php

示例3: DialogViewEvent

    public static function DialogViewEvent($Params)
    {
        global $APPLICATION, $USER_FIELD_MANAGER;
        $id = $Params['id'];
        $event = $Params['event'];
        $event['~DT_FROM_TS'] = $event['DT_FROM_TS'];
        $event['~DT_TO_TS'] = $event['DT_TO_TS'];
        $event['DT_FROM_TS'] = $Params['fromTs'];
        $event['DT_TO_TS'] = $Params['fromTs'] + $event['DT_LENGTH'];
        $UF = $USER_FIELD_MANAGER->GetUserFields("CALENDAR_EVENT", $event['ID'], LANGUAGE_ID);
        $event['UF_CRM_CAL_EVENT'] = $UF['UF_CRM_CAL_EVENT'];
        if (empty($event['UF_CRM_CAL_EVENT']['VALUE'])) {
            $event['UF_CRM_CAL_EVENT'] = false;
        }
        $event['UF_WEBDAV_CAL_EVENT'] = $UF['UF_WEBDAV_CAL_EVENT'];
        if (empty($event['UF_WEBDAV_CAL_EVENT']['VALUE'])) {
            $event['UF_WEBDAV_CAL_EVENT'] = false;
        }
        $event['FROM_WEEK_DAY'] = FormatDate('D', $event['DT_FROM_TS']);
        $event['FROM_MONTH_DAY'] = FormatDate('j', $event['DT_FROM_TS']);
        $event['FROM_MONTH'] = FormatDate('n', $event['DT_FROM_TS']);
        $arHost = CCalendar::GetUser($event['MEETING_HOST'], true);
        $arHost['AVATAR_SRC'] = CCalendar::GetUserAvatarSrc($arHost);
        $arHost['URL'] = CCalendar::GetUserUrl($event['MEETING_HOST'], $Params["PATH_TO_USER"]);
        $arHost['DISPLAY_NAME'] = CCalendar::GetUserName($arHost);
        $curUserStatus = '';
        $userId = CCalendar::GetCurUserId();
        $viewComments = CCalendar::IsPersonal($event['CAL_TYPE'], $event['OWNER_ID'], $userId) || CCalendarSect::CanDo('calendar_view_full', $event['SECT_ID'], $userId);
        if ($event['IS_MEETING'] && empty($event['ATTENDEES_CODES'])) {
            $event['ATTENDEES_CODES'] = CCalendarEvent::CheckEndUpdateAttendeesCodes($event);
        }
        if ($event['IS_MEETING']) {
            $attendees = array('y' => array('users' => array(), 'count' => 4, 'countMax' => 8, 'title' => GetMessage('EC_ATT_Y'), 'id' => "bxview-att-cont-y-" . $event['ID']), 'n' => array('users' => array(), 'count' => 2, 'countMax' => 3, 'title' => GetMessage('EC_ATT_N'), 'id' => "bxview-att-cont-n-" . $event['ID']), 'q' => array('users' => array(), 'count' => 2, 'countMax' => 3, 'title' => GetMessage('EC_ATT_Q'), 'id' => "bxview-att-cont-q-" . $event['ID']));
            if (is_array($event['~ATTENDEES'])) {
                foreach ($event['~ATTENDEES'] as $att) {
                    if ($userId == $att["USER_ID"]) {
                        $curUserStatus = $att['STATUS'];
                        $viewComments = true;
                    }
                    $att['AVATAR_SRC'] = CCalendar::GetUserAvatarSrc($att);
                    $att['URL'] = CCalendar::GetUserUrl($att["USER_ID"], $Params["PATH_TO_USER"]);
                    $attendees[strtolower($att['STATUS'])]['users'][] = $att;
                }
            }
        }
        $arTabs = array(array('name' => GetMessage('EC_BASIC'), 'title' => GetMessage('EC_BASIC_TITLE'), 'id' => $id . "view-tab-0", 'active' => true), array('name' => GetMessage('EC_EDEV_ADD_TAB'), 'title' => GetMessage('EC_EDEV_ADD_TAB_TITLE'), 'id' => $id . "view-tab-1"));
        ?>
<div id="bxec_view_ed_<?php 
        echo $id;
        ?>
" class="bxec-popup">
	<div style="width: 700px; height: 1px;"></div>
	<div class="bxec-d-tabs" id="<?php 
        echo $id;
        ?>
_viewev_tabs">
		<?php 
        foreach ($arTabs as $tab) {
            ?>
			<div class="bxec-d-tab <?php 
            if ($tab['active']) {
                echo 'bxec-d-tab-act';
            }
            ?>
" title="<?php 
            echo isset($tab['title']) ? $tab['title'] : $tab['name'];
            ?>
" id="<?php 
            echo $tab['id'];
            ?>
" <?php 
            if ($tab['show'] === false) {
                echo 'style="display:none;"';
            }
            ?>
>
				<b></b><div><span><?php 
            echo $tab['name'];
            ?>
</span></div><i></i>
			</div>
		<?php 
        }
        ?>
	</div>
	<div class="bxec-d-cont">
<?php 
        /* ####### TAB 0 : BASIC ####### */
        ?>
<div id="<?php 
        echo $id;
        ?>
view-tab-0-cont" class="bxec-d-cont-div" style="display: block;">
	<div class="bx-cal-view-icon">
		<div class="bx-cal-view-icon-day"><?php 
        echo $event['FROM_WEEK_DAY'];
        ?>
</div>
		<div class="bx-cal-view-icon-date"><?php 
        echo $event['FROM_MONTH_DAY'];
//.........这里部分代码省略.........
开发者ID:Satariall,项目名称:izurit,代码行数:101,代码来源:calendar_sceleton.php


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