本文整理汇总了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)));
}
示例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;
//.........这里部分代码省略.........