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


PHP CCalendar::GetUserAvatar方法代码示例

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


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

示例1: Request


//.........这里部分代码省略.........
                 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 '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::GetUserAvatar($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()) {
         return ShowError($ex->GetString());
     }
     die;
 }
开发者ID:rasuldev,项目名称:torino,代码行数:101,代码来源:calendar.php

示例2: 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 = "
			SELECT
				CA.*,
				U.LOGIN, U.NAME, U.LAST_NAME, U.SECOND_NAME, U.EMAIL, U.PERSONAL_PHOTO, U.WORK_POSITION,
				BUF.UF_DEPARTMENT
			FROM
				b_calendar_attendees CA
				LEFT JOIN b_user U ON (U.ID=CA.USER_ID)
				LEFT JOIN b_uts_user BUF ON (BUF.VALUE_ID = CA.USER_ID)
			WHERE
				U.ACTIVE = 'Y' AND
				CA.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::GetUserAvatar($attendee);
				$arAttendees[$attendee['EVENT_ID']][] = $attendee;
			}
		}

		return $arAttendees;
	}
开发者ID:ASDAFF,项目名称:bxApiDocs,代码行数:52,代码来源:calendar_event.php

示例3: elseif

             $result['ACCEPTED_ATTENDEES_COUNT']++;
         } elseif ($att['STATUS'] == "N") {
             $result['DECLINED_ATTENDEES_COUNT']++;
         }
     }
     if ($result['ACCEPTED_ATTENDEES_COUNT'] > 0) {
         $result['ACCEPTED_ATTENDEES_MESSAGE'] = CCalendar::GetAttendeesMessage($result['ACCEPTED_ATTENDEES_COUNT']);
     }
     if ($result['DECLINED_ATTENDEES_COUNT'] > 0) {
         $result['DECLINED_ATTENDEES_MESSAGE'] = CCalendar::GetAttendeesMessage($result['DECLINED_ATTENDEES_COUNT']);
     }
 } else {
     $result = array('ACCEPTED_ATTENDEES' => array(), 'DECLINED_ATTENDEES' => array(), 'ACCEPTED_PARAMS' => array("prefix" => "y"), 'DECLIINED_PARAMS' => array("prefix" => "n"));
     foreach ($Events[0]['~ATTENDEES'] as $i => $att) {
         if ($att['STATUS'] != "Q") {
             $att['AVATAR_SRC'] = CCalendar::GetUserAvatar($att);
             $att['URL'] = CCalendar::GetUserUrl($att["USER_ID"], $arParams["PATH_TO_USER"]);
         }
         if ($att['STATUS'] == "Y") {
             $result['ACCEPTED_ATTENDEES'][] = $att;
         } elseif ($att['STATUS'] == "N") {
             $result['DECLINED_ATTENDEES'][] = $att;
         }
     }
     $moreCountAcc = count($result['ACCEPTED_ATTENDEES']) - $ajaxParams['ATTENDEES_SHOWN_COUNT'];
     $moreCountDec = count($result['DECLINED_ATTENDEES']) - $ajaxParams['ATTENDEES_SHOWN_COUNT'];
     if ($moreCountAcc > 0) {
         $result['ACCEPTED_PARAMS']['MORE_MESSAGE'] = CCalendar::GetMoreAttendeesMessage($moreCountAcc);
     }
     if ($moreCountDec > 0) {
         $result['DECLINED_PARAMS']['MORE_MESSAGE'] = CCalendar::GetMoreAttendeesMessage($moreCountDec);
开发者ID:Satariall,项目名称:izurit,代码行数:31,代码来源:action.php


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