当前位置: 首页>>代码示例>>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;未经允许,请勿转载。