本文整理汇总了PHP中CCalendar::GetUserUrl方法的典型用法代码示例。如果您正苦于以下问题:PHP CCalendar::GetUserUrl方法的具体用法?PHP CCalendar::GetUserUrl怎么用?PHP CCalendar::GetUserUrl使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CCalendar
的用法示例。
在下文中一共展示了CCalendar::GetUserUrl方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: GetAttendees
public static function GetAttendees($arEventIds = array())
{
global $DB;
$arAttendees = array();
if (!is_array($arEventIds)) {
$arEventIds = array($arEventIds);
}
$strMeetIds = "";
foreach ($arEventIds as $id) {
if (intVal($id) > 0) {
$strMeetIds .= ',' . intVal($id);
}
}
$strMeetIds = trim($strMeetIds, ', ');
if ($strMeetIds != '') {
$strSql = "\n\t\t\tSELECT\n\t\t\t\tCA.*,\n\t\t\t\tU.LOGIN, U.NAME, U.LAST_NAME, U.SECOND_NAME, U.EMAIL, U.PERSONAL_PHOTO, U.WORK_POSITION,\n\t\t\t\tBUF.UF_DEPARTMENT\n\t\t\tFROM\n\t\t\t\tb_calendar_attendees CA\n\t\t\t\tLEFT JOIN b_user U ON (U.ID=CA.USER_ID)\n\t\t\t\tLEFT JOIN b_uts_user BUF ON (BUF.VALUE_ID = CA.USER_ID)\n\t\t\tWHERE\n\t\t\t\tU.ACTIVE = 'Y' AND\n\t\t\t\tCA.EVENT_ID in (" . $strMeetIds . ")";
$res = $DB->Query($strSql, false, "File: " . __FILE__ . "<br>Line: " . __LINE__);
while ($attendee = $res->Fetch()) {
if (!isset($arAttendees[$attendee['EVENT_ID']])) {
$arAttendees[$attendee['EVENT_ID']] = array();
}
$attendee["STATUS"] = trim($attendee["STATUS"]);
$attendee["DESCRIPTION"] = trim($attendee["DESCRIPTION"]);
$attendee["COLOR"] = trim($attendee["COLOR"]);
$attendee["TEXT_COLOR"] = trim($attendee["TEXT_COLOR"]);
$attendee["ACCESSIBILITY"] = trim($attendee["ACCESSIBILITY"]);
if (empty($attendee["ACCESSIBILITY"])) {
$attendee["ACCESSIBILITY"] = 'busy';
}
CCalendar::SetUserDepartment($attendee["USER_ID"], empty($attendee['UF_DEPARTMENT']) ? array() : unserialize($attendee['UF_DEPARTMENT']));
$attendee['DISPLAY_NAME'] = CCalendar::GetUserName($attendee);
$attendee['URL'] = CCalendar::GetUserUrl($attendee["USER_ID"]);
$attendee['AVATAR'] = CCalendar::GetUserAvatarSrc($attendee);
$arAttendees[$attendee['EVENT_ID']][] = $attendee;
}
}
return $arAttendees;
}
示例2: array
$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'];
// ?
$attendees[strtolower($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
示例3: Request
//.........这里部分代码省略.........
// case 'userfield_view':
// CCalendarSceleton::GetUserfieldsViewHtml(intVal($_REQUEST['event_id']));
// CCalendar::OutputJSRes($reqId, array('result' => true));
// break;
// case 'userfield_edit':
// CCalendarSceleton::GetUserfieldsEditHtml(intVal($_REQUEST['event_id']), self::$actionUrl);
// CCalendar::OutputJSRes($reqId, array('result' => true));
// break;
// case 'userfield_save':
// $arFields = array();
// $bRefresh = false;
// foreach ($_POST as $field => $value)
// if (substr($field, 0, 3) == "UF_")
// {
// $arFields[$field] = $value;
// if ($field == 'UF_CRM_CAL_EVENT')
// $bRefresh = true;
// }
// if (count($arFields) > 0)
// CCalendarEvent::UpdateUserFields($_REQUEST['event_id'], $arFields);
//
// CCalendar::OutputJSRes($reqId, array('result' => true, 'refresh' => $bRefresh));
// break;
// case 'userfield_view':
// CCalendarSceleton::GetUserfieldsViewHtml(intVal($_REQUEST['event_id']));
// CCalendar::OutputJSRes($reqId, array('result' => true));
// break;
// case 'userfield_edit':
// CCalendarSceleton::GetUserfieldsEditHtml(intVal($_REQUEST['event_id']), self::$actionUrl);
// CCalendar::OutputJSRes($reqId, array('result' => true));
// break;
// case 'userfield_save':
// $arFields = array();
// $bRefresh = false;
// foreach ($_POST as $field => $value)
// if (substr($field, 0, 3) == "UF_")
// {
// $arFields[$field] = $value;
// if ($field == 'UF_CRM_CAL_EVENT')
// $bRefresh = true;
// }
// if (count($arFields) > 0)
// CCalendarEvent::UpdateUserFields($_REQUEST['event_id'], $arFields);
//
// CCalendar::OutputJSRes($reqId, array('result' => true, 'refresh' => $bRefresh));
// break;
case 'get_view_event_dialog':
$APPLICATION->ShowAjaxHead();
$jsId = $color = preg_replace('/[^\\d|\\w]/', '', $_REQUEST['js_id']);
$event_id = intval($_REQUEST['event_id']);
$Event = CCalendarEvent::GetList(array('arFilter' => array("ID" => $event_id), 'parseRecursion' => false, 'fetchAttendees' => true, 'checkPermissions' => true, 'setDefaultLimit' => false));
if ($Event && is_array($Event[0])) {
CCalendarSceleton::DialogViewEvent(array('id' => $jsId, 'event' => $Event[0], 'sectionName' => $_REQUEST['section_name'], 'fromTs' => self::_fixTimestamp($_REQUEST['from_ts']), 'bIntranet' => self::IsIntranetEnabled(), 'bSocNet' => self::IsSocNet(), 'AVATAR_SIZE' => 21));
}
require $_SERVER["DOCUMENT_ROOT"] . BX_ROOT . "/modules/main/include/epilog_after.php";
break;
case 'get_edit_event_dialog':
$APPLICATION->ShowAjaxHead();
$jsId = $color = preg_replace('/[^\\d|\\w]/', '', $_REQUEST['js_id']);
$event_id = intval($_REQUEST['event_id']);
if ($event_id > 0) {
$Event = CCalendarEvent::GetList(array('arFilter' => array("ID" => $event_id), 'parseRecursion' => false, 'fetchAttendees' => true, 'checkPermissions' => true, 'setDefaultLimit' => false));
$Event = $Event && is_array($Event[0]) ? $Event[0] : false;
} else {
$Event = array();
}
CCalendarSceleton::DialogEditEvent(array('id' => $jsId, 'event' => $Event, 'type' => self::$type, 'bIntranet' => self::IsIntranetEnabled(), 'bSocNet' => self::IsSocNet(), 'AVATAR_SIZE' => 21));
require $_SERVER["DOCUMENT_ROOT"] . BX_ROOT . "/modules/main/include/epilog_after.php";
break;
case 'get_attendees_by_codes_planner':
case 'get_attendees_by_codes':
$bPlanner = $action == 'get_attendees_by_codes_planner';
$users = CCalendar::GetDestinationUsers($_REQUEST['codes'], true);
$userIds = array();
$result = array();
foreach ($users as $user) {
$userIds[] = $user['USER_ID'];
$result[] = array('USER_ID' => $user['USER_ID'], 'DISPLAY_NAME' => CCalendar::GetUserName($user), 'AVATAR' => CCalendar::GetUserAvatarSrc($user), 'ACC' => '', 'URL' => CCalendar::GetUserUrl($user['USER_ID'], self::$pathToUser));
}
if ($_REQUEST['event_from_ts'] && $_REQUEST['event_to_ts']) {
$acc = CCalendar::CheckUsersAccessibility(array('users' => $userIds, 'from' => self::Date(self::_fixTimestamp($_REQUEST['event_from_ts'])), 'to' => self::Date(self::_fixTimestamp($_REQUEST['event_to_ts'])), 'eventId' => intVal($_REQUEST['cur_event_id'])));
foreach ($result as $i => $user) {
$result[$i]['ACC'] = $acc[$user['USER_ID']];
}
}
if ($bPlanner) {
$accessibility = CCalendar::GetAccessibilityForUsers(array('users' => $userIds, 'from' => self::Date($_REQUEST['from_ts']), 'to' => self::Date($_REQUEST['to_ts']), 'curEventId' => intVal($_REQUEST['cur_event_id']), 'getFromHR' => true));
} else {
$accessibility = array();
}
CCalendar::OutputJSRes($reqId, array('users' => $result, 'accessibility' => $accessibility));
break;
}
}
if ($ex = $APPLICATION->GetException()) {
ShowError($ex->GetString());
}
CMain::FinalActions();
die;
}
示例4: 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'];
//.........这里部分代码省略.........