本文整理汇总了PHP中CCalendar::GetCurUserId方法的典型用法代码示例。如果您正苦于以下问题:PHP CCalendar::GetCurUserId方法的具体用法?PHP CCalendar::GetCurUserId怎么用?PHP CCalendar::GetCurUserId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CCalendar
的用法示例。
在下文中一共展示了CCalendar::GetCurUserId方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: AddComment_Calendar
public static function AddComment_Calendar($arFields)
{
global $DB;
if (!CModule::IncludeModule("forum")) {
return false;
}
$ufFileID = array();
$ufDocID = array();
$dbResult = CSocNetLog::GetList(array(), array("ID" => $arFields["LOG_ID"]), false, false, array("ID", "SOURCE_ID", "SITE_ID"));
if ($arLog = $dbResult->Fetch()) {
$arCalendarEvent = CCalendarEvent::GetById($arLog["SOURCE_ID"]);
if ($arCalendarEvent) {
$arCalendarSettings = CCalendar::GetSettings();
$forumID = $arCalendarSettings["forum_id"];
if ($forumID) {
$arFilter = array("FORUM_ID" => $forumID, "XML_ID" => "EVENT_" . $arLog["SOURCE_ID"]);
$dbTopic = CForumTopic::GetList(null, $arFilter);
if ($dbTopic && ($arTopic = $dbTopic->Fetch())) {
$topicID = $arTopic["ID"];
} else {
$topicID = 0;
}
$currentUserId = CCalendar::GetCurUserId();
$strPermission = $currentUserId == $arCalendarEvent["OWNER_ID"] ? "Y" : "M";
$arFieldsMessage = array("POST_MESSAGE" => $arFields["TEXT_MESSAGE"], "USE_SMILES" => "Y", "PERMISSION_EXTERNAL" => "Q", "PERMISSION" => $strPermission, "APPROVED" => "Y");
if ($topicID === 0) {
$arFieldsMessage["TITLE"] = "EVENT_" . $arLog["SOURCE_ID"];
$arFieldsMessage["TOPIC_XML_ID"] = "EVENT_" . $arLog["SOURCE_ID"];
}
$arTmp = false;
$GLOBALS["USER_FIELD_MANAGER"]->EditFormAddFields("SONET_COMMENT", $arTmp);
if (is_array($arTmp)) {
if (array_key_exists("UF_SONET_COM_DOC", $arTmp)) {
$GLOBALS["UF_FORUM_MESSAGE_DOC"] = $arTmp["UF_SONET_COM_DOC"];
} elseif (array_key_exists("UF_SONET_COM_FILE", $arTmp)) {
$arFieldsMessage["FILES"] = array();
foreach ($arTmp["UF_SONET_COM_FILE"] as $file_id) {
$arFieldsMessage["FILES"][] = array("FILE_ID" => $file_id);
}
}
}
$messageID = ForumAddMessage($topicID > 0 ? "REPLY" : "NEW", $forumID, $topicID, 0, $arFieldsMessage, $sError, $sNote);
// get UF DOC value and FILE_ID there
if ($messageID > 0) {
$messageUrl = CCalendar::GetPath("user", $arCalendarEvent["OWNER_ID"]);
$messageUrl = $messageUrl . (strpos($messageUrl, "?") === false ? "?" : "&") . "EVENT_ID=" . $arCalendarEvent["ID"] . "&MID=" . $messageID;
$dbAddedMessageFiles = CForumFiles::GetList(array("ID" => "ASC"), array("MESSAGE_ID" => $messageID));
while ($arAddedMessageFiles = $dbAddedMessageFiles->Fetch()) {
$ufFileID[] = $arAddedMessageFiles["FILE_ID"];
}
$ufDocID = $GLOBALS["USER_FIELD_MANAGER"]->GetUserFieldValue("FORUM_MESSAGE", "UF_FORUM_MESSAGE_DOC", $messageID, LANGUAGE_ID);
}
}
}
}
if (!$messageID) {
$sError = GetMessage("EC_LF_ADD_COMMENT_SOURCE_ERROR");
}
return array("SOURCE_ID" => $messageID, "MESSAGE" => $arFieldsMessage ? $arFieldsMessage["POST_MESSAGE"] : false, "RATING_TYPE_ID" => "FORUM_POST", "RATING_ENTITY_ID" => $messageID, "ERROR" => $sError, "NOTES" => $sNote, "UF" => array("FILE" => $ufFileID, "DOC" => $ufDocID), "URL" => $messageUrl);
}
示例2: GetAbsent
public static function GetAbsent($users = false, $Params = array())
{
global $DB;
// Can be called from agent... So we have to create $USER if it is not exists
$tempUser = CCalendar::TempUser(false, true);
$curUserId = isset($Params['userId']) ? intVal($Params['userId']) : CCalendar::GetCurUserId();
$arUsers = array();
if ($users !== false && is_array($users)) {
foreach ($users as $id) {
if ($id > 0) {
$arUsers[] = intVal($id);
}
}
}
if (!count($arUsers)) {
$users = false;
}
// Part 1: select ordinary events
$arFilter = array('CAL_TYPE' => 'user', 'DELETED' => 'N', 'ACCESSIBILITY' => 'absent');
if (isset($Params['fromLimit'])) {
$arFilter['FROM_LIMIT'] = CCalendar::Date(CCalendar::Timestamp($Params['fromLimit'], false), true, false);
}
if (isset($Params['toLimit'])) {
$arFilter['TO_LIMIT'] = CCalendar::Date(CCalendar::Timestamp($Params['toLimit'], false), true, false);
}
$arEvents = CCalendarEvent::GetList(array('arFilter' => $arFilter, 'getUserfields' => false, 'parseRecursion' => true, 'fetchAttendees' => false, 'fetchMeetings' => true, 'userId' => $curUserId, 'checkPermissions' => false, 'preciseLimits' => true));
// Part 2: select attendees
CTimeZone::Disable();
if (count($arUsers) > 0) {
$userQ = ' AND CA.USER_ID in (' . implode(',', $arUsers) . ')';
} else {
$userQ = '';
}
$strSql = "\n\t\t\tSELECT\n\t\t\t\tCA.EVENT_ID as ID, CA.USER_ID, CA.STATUS, CA.ACCESSIBILITY,\n\t\t\t\tCE.CAL_TYPE,CE.OWNER_ID,CE.NAME," . $DB->DateToCharFunction("CE.DT_FROM") . " as DT_FROM," . $DB->DateToCharFunction("CE.DT_TO") . " as DT_TO, CE.DT_LENGTH, CE.PRIVATE_EVENT, CE.ACCESSIBILITY, CE.IMPORTANCE, CE.IS_MEETING, CE.MEETING_HOST, CE.MEETING, CE.LOCATION, CE.RRULE, CE.EXRULE, CE.RDATE, CE.EXDATE,\n\t\t\t\tCES.SECT_ID\n\t\t\tFROM b_calendar_attendees CA\n\t\t\tLEFT JOIN\n\t\t\t\tb_calendar_event CE ON(CA.EVENT_ID=CE.ID)\n\t\t\tLEFT JOIN\n\t\t\t\tb_calendar_event_sect CES ON (CA.EVENT_ID=CES.EVENT_ID)\n\t\t\tWHERE\n\t\t\t\t\tCE.ID IS NOT NULL\n\t\t\t\tAND\n\t\t\t\t\tCE.DELETED='N'\n\t\t\t\tAND\n\t\t\t\t\tSTATUS='Y'\n\t\t\t\tAND\n\t\t\t\t\tCA.ACCESSIBILITY='absent'\n\t\t\t\t{$userQ}\n\t\t\t";
if (isset($arFilter['FROM_LIMIT'])) {
$strSql .= "AND ";
if (strtoupper($DB->type) == "MYSQL") {
$strSql .= "CE.DT_TO>=FROM_UNIXTIME('" . MkDateTime(FmtDate($arFilter['FROM_LIMIT'], "D.M.Y"), "d.m.Y") . "')";
} elseif (strtoupper($DB->type) == "MSSQL") {
$strSql .= "CE.DT_TO>=" . $DB->CharToDateFunction($arFilter['FROM_LIMIT'], "SHORT");
} elseif (strtoupper($DB->type) == "ORACLE") {
$strSql .= "CE.DT_TO>=TO_DATE('" . FmtDate($arFilter['FROM_LIMIT'], "D.M.Y") . " 00:00:00','dd.mm.yyyy hh24:mi:ss')";
}
}
if ($arFilter['TO_LIMIT']) {
$strSql .= "AND ";
if (strtoupper($DB->type) == "MYSQL") {
$strSql .= "CE.DT_FROM<=FROM_UNIXTIME('" . MkDateTime(FmtDate($arFilter['TO_LIMIT'], "D.M.Y") . " 23:59:59", "d.m.Y H:i:s") . "')";
} elseif (strtoupper($DB->type) == "MSSQL") {
$strSql .= "CE.DT_FROM<=dateadd(day, 1, " . $DB->CharToDateFunction($arFilter['TO_LIMIT'], "SHORT") . ")";
} elseif (strtoupper($DB->type) == "ORACLE") {
$strSql .= "CE.DT_FROM<=TO_DATE('" . FmtDate($arFilter['TO_LIMIT'], "D.M.Y") . " 23:59:59','dd.mm.yyyy hh24:mi:ss')";
}
}
$res = $DB->Query($strSql, false, "File: " . __FILE__ . "<br>Line: " . __LINE__);
$arEvents2 = array();
while ($event = $res->Fetch()) {
$event = self::PreHandleEvent($event);
if ($event['CAL_TYPE'] == 'user' && $event['IS_MEETING'] && $event['OWNER_ID'] == $event['USER_ID']) {
continue;
}
if (self::CheckRecurcion($event)) {
self::ParseRecursion($arEvents2, $event, array('fromLimit' => $arFilter["FROM_LIMIT"], 'toLimit' => $arFilter["TO_LIMIT"]));
} else {
self::HandleEvent($arEvents2, $event);
}
}
CTimeZone::Enable();
$arEvents = array_merge($arEvents, $arEvents2);
$bSocNet = CModule::IncludeModule("socialnetwork");
$result = array();
$settings = CCalendar::GetSettings(array('request' => false));
foreach ($arEvents as $event) {
$userId = isset($event['USER_ID']) ? $event['USER_ID'] : $event['OWNER_ID'];
if ($users !== false && !in_array($userId, $arUsers)) {
continue;
}
if ($bSocNet && !CSocNetFeatures::IsActiveFeature(SONET_ENTITY_USER, $userId, "calendar")) {
continue;
}
if ((!$event['CAL_TYPE'] != 'user' || $curUserId != $event['OWNER_ID']) && $curUserId != $event['CREATED_BY'] && !isset($arUserMeeting[$event['ID']])) {
$sectId = $event['SECT_ID'];
if (!$event['ACCESSIBILITY']) {
$event['ACCESSIBILITY'] = 'busy';
}
$private = $event['PRIVATE_EVENT'] && $event['CAL_TYPE'] == 'user';
$bManager = false;
if (!$private && CCalendar::IsIntranetEnabled() && CModule::IncludeModule('intranet') && $event['CAL_TYPE'] == 'user' && $settings['dep_manager_sub']) {
$bManager = in_array($curUserId, CCalendar::GetUserManagers($event['OWNER_ID'], true));
}
if ($private || !CCalendarSect::CanDo('calendar_view_full', $sectId) && !$bManager) {
if ($private) {
$event['NAME'] = '[' . GetMessage('EC_ACCESSIBILITY_' . strtoupper($event['ACCESSIBILITY'])) . ']';
} else {
if (!CCalendarSect::CanDo('calendar_view_title', $sectId)) {
$event['NAME'] = '[' . GetMessage('EC_ACCESSIBILITY_' . strtoupper($event['ACCESSIBILITY'])) . ']';
} else {
$event['NAME'] = $event['NAME'] . ' [' . GetMessage('EC_ACCESSIBILITY_' . strtoupper($event['ACCESSIBILITY'])) . ']';
}
}
//.........这里部分代码省略.........
示例3: GetSocNetDestination
public static function GetSocNetDestination($user_id = false, $selected = array())
{
global $CACHE_MANAGER;
if (!is_array($selected)) {
$selected = array();
}
$DESTINATION = array('LAST' => array('SONETGROUPS' => CSocNetLogDestination::GetLastSocnetGroup()));
if (!$user_id) {
$user_id = CCalendar::GetCurUserId();
}
$DESTINATION['LAST']['SONETGROUPS'] = CSocNetLogDestination::GetLastSocnetGroup();
$cacheTtl = defined("BX_COMP_MANAGED_CACHE") ? 3153600 : 3600 * 4;
$cacheId = 'blog_post_form_dest_' . $user_id;
$cacheDir = '/blog/form/dest/' . SITE_ID . '/' . $user_id;
$obCache = new CPHPCache();
if ($obCache->InitCache($cacheTtl, $cacheId, $cacheDir)) {
$DESTINATION['SONETGROUPS'] = $obCache->GetVars();
} else {
$obCache->StartDataCache();
$DESTINATION['SONETGROUPS'] = CSocNetLogDestination::GetSocnetGroup(array('features' => array("blog", array("premoderate_post", "moderate_post", "write_post", "full_post"))));
if (defined("BX_COMP_MANAGED_CACHE")) {
$CACHE_MANAGER->StartTagCache($cacheDir);
foreach ($DESTINATION['SONETGROUPS'] as $val) {
$CACHE_MANAGER->RegisterTag("sonet_features_G_" . $val["entityId"]);
$CACHE_MANAGER->RegisterTag("sonet_group_" . $val["entityId"]);
}
$CACHE_MANAGER->RegisterTag("sonet_user2group_U" . $user_id);
$CACHE_MANAGER->EndTagCache();
}
$obCache->EndDataCache($DESTINATION['SONETGROUPS']);
}
$arDestUser = array();
$DESTINATION['SELECTED'] = array();
foreach ($selected as $ind => $code) {
if (substr($code, 0, 2) == 'DR') {
$DESTINATION['SELECTED'][$code] = "department";
} elseif (substr($code, 0, 2) == 'UA') {
$DESTINATION['SELECTED'][$code] = "groups";
} elseif (substr($code, 0, 2) == 'SG') {
$DESTINATION['SELECTED'][$code] = "sonetgroups";
} elseif (substr($code, 0, 1) == 'U') {
$DESTINATION['SELECTED'][$code] = "users";
$arDestUser[] = str_replace('U', '', $code);
}
}
// intranet structure
$arStructure = CSocNetLogDestination::GetStucture();
//$arStructure = CSocNetLogDestination::GetStucture(array("LAZY_LOAD" => true));
$DESTINATION['DEPARTMENT'] = $arStructure['department'];
$DESTINATION['DEPARTMENT_RELATION'] = $arStructure['department_relation'];
$DESTINATION['DEPARTMENT_RELATION_HEAD'] = $arStructure['department_relation_head'];
$DESTINATION['LAST']['DEPARTMENT'] = CSocNetLogDestination::GetLastDepartment();
// users
$DESTINATION['LAST']['USERS'] = CSocNetLogDestination::GetLastUser();
if (CModule::IncludeModule('extranet') && !CExtranet::IsIntranetUser()) {
$DESTINATION['EXTRANET_USER'] = 'Y';
$DESTINATION['USERS'] = CSocNetLogDestination::GetExtranetUser();
} else {
foreach ($DESTINATION['LAST']['USERS'] as $value) {
$arDestUser[] = str_replace('U', '', $value);
}
$DESTINATION['EXTRANET_USER'] = 'N';
$DESTINATION['USERS'] = CSocNetLogDestination::GetUsers(array('id' => $arDestUser));
}
$users = array();
foreach ($DESTINATION['USERS'] as $key => $entry) {
if ($entry['isExtranet'] == 'N') {
$users[$key] = $entry;
}
}
$DESTINATION['USERS'] = $users;
return $DESTINATION;
}
示例4: FormatDate
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', $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'];
示例5: GetSPExportLink
public static function GetSPExportLink()
{
$userId = CCalendar::GetCurUserId();
return '&user_id=' . $userId . '&sign=' . CCalendarSect::GetSign($userId, 'superposed_calendars');
}
示例6: UserSettingsClear
public static function UserSettingsClear($arParams = array(), $nav = null, $server = null)
{
$userId = CCalendar::GetCurUserId();
$methodName = "calendar.user.settings.clear";
CCalendar::SetUserSettings(false, $userId);
return true;
}
示例7: GetOperations
public static function GetOperations($xmlId, $userId = false)
{
if ($userId === false) {
$userId = CCalendar::GetCurUserId();
}
$arCodes = array();
$rCodes = CAccess::GetUserCodes($userId);
while ($code = $rCodes->Fetch()) {
$arCodes[] = $code['ACCESS_CODE'];
}
if (!in_array('G2', $arCodes)) {
$arCodes[] = 'G2';
}
$key = $xmlId . '|' . implode(',', $arCodes);
if (!is_array(self::$arOp[$key])) {
if (!isset(self::$Permissions[$xmlId])) {
self::GetArrayPermissions(array($xmlId));
}
$perms = self::$Permissions[$xmlId];
self::$arOp[$key] = array();
if (is_array($perms)) {
foreach ($perms as $code => $taskId) {
if (in_array($code, $arCodes)) {
self::$arOp[$key] = array_merge(self::$arOp[$key], CTask::GetOperations($taskId, true));
}
}
}
}
return self::$arOp[$key];
}
示例8: GetAbsent
public static function GetAbsent($users = false, $Params = array())
{
// Can be called from agent... So we have to create $USER if it is not exists
$tempUser = CCalendar::TempUser(false, true);
$curUserId = isset($Params['userId']) ? intVal($Params['userId']) : CCalendar::GetCurUserId();
$arUsers = array();
if ($users !== false && is_array($users)) {
foreach ($users as $id) {
if ($id > 0) {
$arUsers[] = intVal($id);
}
}
}
if (!count($arUsers)) {
$users = false;
}
$arFilter = array('DELETED' => 'N', 'ACCESSIBILITY' => 'absent');
if ($users) {
$arFilter['CREATED_BY'] = $users;
}
if (isset($Params['fromLimit'])) {
$arFilter['FROM_LIMIT'] = CCalendar::Date(CCalendar::Timestamp($Params['fromLimit'], false), true, false);
}
if (isset($Params['toLimit'])) {
$arFilter['TO_LIMIT'] = CCalendar::Date(CCalendar::Timestamp($Params['toLimit'], false), true, false);
}
$arEvents = CCalendarEvent::GetList(array('arFilter' => $arFilter, 'parseRecursion' => true, 'getUserfields' => false, 'userId' => $curUserId, 'preciseLimits' => true, 'checkPermissions' => false, 'skipDeclined' => true));
$bSocNet = CModule::IncludeModule("socialnetwork");
$result = array();
$settings = CCalendar::GetSettings(array('request' => false));
foreach ($arEvents as $event) {
$userId = isset($event['USER_ID']) ? $event['USER_ID'] : $event['CREATED_BY'];
if ($users !== false && !in_array($userId, $arUsers)) {
continue;
}
if ($bSocNet && !CSocNetFeatures::IsActiveFeature(SONET_ENTITY_USER, $userId, "calendar")) {
continue;
}
if ((!$event['CAL_TYPE'] != 'user' || $curUserId != $event['OWNER_ID']) && $curUserId != $event['CREATED_BY'] && !isset($arUserMeeting[$event['ID']])) {
$sectId = $event['SECT_ID'];
if (!$event['ACCESSIBILITY']) {
$event['ACCESSIBILITY'] = 'busy';
}
$private = $event['PRIVATE_EVENT'] && $event['CAL_TYPE'] == 'user';
$bManager = false;
if (!$private && CCalendar::IsIntranetEnabled() && CModule::IncludeModule('intranet') && $event['CAL_TYPE'] == 'user' && $settings['dep_manager_sub']) {
$bManager = in_array($curUserId, CCalendar::GetUserManagers($event['OWNER_ID'], true));
}
if ($private || !CCalendarSect::CanDo('calendar_view_full', $sectId) && !$bManager) {
$event = self::ApplyAccessRestrictions($event, $userId);
}
}
$skipTime = $event['DT_SKIP_TIME'] === 'Y';
$fromTs = CCalendar::Timestamp($event['DATE_FROM'], false, !$skipTime);
$toTs = CCalendar::Timestamp($event['DATE_TO'], false, !$skipTime);
if ($event['DT_SKIP_TIME'] !== 'Y') {
$fromTs -= $event['~USER_OFFSET_FROM'];
$toTs -= $event['~USER_OFFSET_TO'];
}
$result[] = array('ID' => $event['ID'], 'NAME' => $event['NAME'], 'DATE_FROM' => CCalendar::Date($fromTs, !$skipTime, false), 'DATE_TO' => CCalendar::Date($toTs, !$skipTime, false), 'DT_FROM_TS' => $fromTs, 'DT_TO_TS' => $toTs, 'CREATED_BY' => $userId, 'DETAIL_TEXT' => '', 'USER_ID' => $userId);
}
// Sort by DATE_FROM_TS_UTC
usort($result, array('CCalendar', '_NearestSort'));
CCalendar::TempUser($tempUser, false);
return $result;
}
示例9: 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'];
//.........这里部分代码省略.........