當前位置: 首頁>>代碼示例>>PHP>>正文


PHP CCalendar::pathToUser方法代碼示例

本文整理匯總了PHP中CCalendar::pathToUser方法的典型用法代碼示例。如果您正苦於以下問題:PHP CCalendar::pathToUser方法的具體用法?PHP CCalendar::pathToUser怎麽用?PHP CCalendar::pathToUser使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在CCalendar的用法示例。


在下文中一共展示了CCalendar::pathToUser方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: GetUserUrl

 public static function GetUserUrl($userId = 0, $pathToUser = "")
 {
     if ($pathToUser == '') {
         if (self::$pathToUser == '') {
             if (empty(self::$pathesForSite)) {
                 self::$pathesForSite = self::GetPathes(SITE_ID);
             }
             self::$pathToUser = self::$pathesForSite['path_to_user'];
         }
         $pathToUser = self::$pathToUser;
     }
     return CUtil::JSEscape(CComponentEngine::MakePathFromTemplate($pathToUser, array("user_id" => $userId, "USER_ID" => $userId)));
 }
開發者ID:andy-profi,項目名稱:bxApiDocs,代碼行數:13,代碼來源:calendar.php

示例2: Init

	function Init($Params)
	{
		global $USER;
		$access = new CAccess();
		$access->UpdateCodes();

		// Owner params
		self::$siteId = isset($Params['siteId']) ? $Params['siteId'] : SITE_ID;
		self::$type = $Params['type'];
		self::$arTypes = CCalendarType::GetList();
		self::$bIntranet = CCalendar::IsIntranetEnabled();
		self::$bSocNet = self::IsSocNet();
		self::$userId = intVal(isset($Params['userId']) ? $Params['userId'] : $USER->GetID());
		self::$bOwner = self::$type == 'user' || self::$type == 'group';
		self::$settings = self::GetSettings();
		self::$userSettings = self::GetUserSettings();
		self::$pathesForSite = self::GetPathes(self::$siteId);
		self::$pathToUser = self::$pathesForSite['path_to_user'];
		self::$bSuperpose = $Params['allowSuperpose'] != false && self::$bSocNet;
		self::$bAnonym = !$USER || !$USER->IsAuthorized();
		self::$userNameTemplate = self::$settings['user_name_template'];
		self::$bAMPM = IsAmPmMode();
		self::$bWideDate = strpos(FORMAT_DATETIME, 'MMMM') !== false;

		if (isset($Params['SectionControlsDOMId']))
			self::$SectionsControlsDOMId = $Params['SectionControlsDOMId'];

		if (self::$bOwner && isset($Params['ownerId']) && $Params['ownerId'] > 0)
			self::$ownerId = intVal($Params['ownerId']);

		self::$bTasks = self::$type == 'user' && $Params['showTasks'] !== false && CModule::IncludeModule('tasks');
		if (self::$bTasks && self::$ownerId != self::$userId)
			self::$bTasks = false;

		self::GetPermissions(array(
			'type' => self::$type,
			'bOwner' => self::$bOwner,
			'userId' => self::$userId,
			'ownerId' => self::$ownerId,
		));

		// Cache params
		if (isset($Params['cachePath']))
			self::$cachePath = $Params['cachePath'];
		if (isset($Params['cacheTime']))
			self::$cacheTime = $Params['cacheTime'];
		self::$bCache = self::$cacheTime > 0;

		// Urls
		$page = preg_replace(
			array(
				"/EVENT_ID=.*?\&/i",
				"/CHOOSE_MR=.*?\&/i",
				"/action=.*?\&/i",
				"/bx_event_calendar_request=.*?\&/i",
				"/clear_cache=.*?\&/i",
				"/bitrix_include_areas=.*?\&/i",
				"/bitrix_show_mode=.*?\&/i",
				"/back_url_admin=.*?\&/i"
			),
			"", $Params['pageUrl'].'&'
		);
		$page = preg_replace(array("/^(.*?)\&$/i","/^(.*?)\?$/i"), "\$1", $page);
		self::$actionUrl = $page;

		if (self::$bOwner && !empty(self::$ownerId))
			self::$path = self::GetPath(self::$type, self::$ownerId, true);
		else
			self::$path = (CMain::IsHTTPS() ? "https://" : "http://").$_SERVER['HTTP_HOST'].$page;

		self::$outerUrl = $GLOBALS['APPLICATION']->GetCurPageParam('', array("action", "bx_event_calendar_request", "clear_cache", "bitrix_include_areas", "bitrix_show_mode", "back_url_admin", "SEF_APPLICATION_CUR_PAGE_URL", "EVENT_ID", "CHOOSE_MR"), false);

		//$this->fullUrl = (CMain::IsHTTPS() ? "https://" : "http://").$_SERVER['HTTP_HOST'].$page;

		// Superposing
		self::$bCanAddToSuperpose = false;
		if (self::$bSuperpose)
		{
			if (self::$type == 'user' || self::$type == 'group')
				self::$bCanAddToSuperpose = true;

			foreach(self::$arTypes as $t)
			{
				if (is_array(self::$settings['denied_superpose_types']) && !in_array($t['XML_ID'], self::$settings['denied_superpose_types']))
					self::$arSPTypes[] = $t['XML_ID'];
			}
			self::$bCanAddToSuperpose = (is_array(self::$arSPTypes) && in_array(self::$type, self::$arSPTypes));
		}

		// **** Reserve meeting and reserve video meeting
		// *** Meeting room params ***
		$RMiblockId = self::$settings['rm_iblock_id'];
		self::$allowReserveMeeting = $Params["allowResMeeting"] && $RMiblockId > 0;

		if(self::$allowReserveMeeting && !$USER->IsAdmin() && (CIBlock::GetPermission($RMiblockId) < "R"))
			self::$allowReserveMeeting = false;

		// *** Video meeting room params ***
		$VMiblockId = self::$settings['vr_iblock_id'];
		self::$allowVideoMeeting = $Params["allowVideoMeeting"] && $VMiblockId > 0;
//.........這裏部分代碼省略.........
開發者ID:ASDAFF,項目名稱:bitrix-5,代碼行數:101,代碼來源:calendar.php


注:本文中的CCalendar::pathToUser方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。