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


PHP CSocServAuthManager::GetUserArrayForSendMessages方法代码示例

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


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

示例1: unserialize

{
	CUtil::JSPostUnescape();
	if($_REQUEST['action'] == "getuserdata" || $_REQUEST['action'] == 'getsettings')
	{
		$serializedSocservUser = CUserOptions::GetOption("socialservices", "user_socserv_array", '', $userId);
		if(CheckSerializedData($serializedSocservUser))
			$arResult['SOCSERVARRAY'] = unserialize($serializedSocservUser);
		if(!isset($arResult['SOCSERVARRAY']) || !is_array($arResult['SOCSERVARRAY']))
			$arResult['SOCSERVARRAY'] = '';
		if($_REQUEST['checkEnabled'] == 'true')
			$arResult['ENABLED'] = CUserOptions::GetOption("socialservices", "user_socserv_enable", "N", $userId);
		$arResult['STARTSEND'] = CUserOptions::GetOption("socialservices", "user_socserv_start_day", "N", $userId);
		$arResult['ENDSEND'] = CUserOptions::GetOption("socialservices", "user_socserv_end_day", "N", $userId);
		$arResult['STARTTEXT'] = CUserOptions::GetOption("socialservices", "user_socserv_start_text", GetMessage("JS_CORE_SS_WORKDAY_START"), $userId);
		$arResult['ENDTEXT'] = CUserOptions::GetOption("socialservices", "user_socserv_end_text", GetMessage("JS_CORE_SS_WORKDAY_END"), $userId);
		$arResult['SOCSERVARRAYALL'] = CSocServAuthManager::GetUserArrayForSendMessages($userId);
		$arResult['USER_ID'] = $userId;
		$tooltipPathToUser = COption::GetOptionString("main", "TOOLTIP_PATH_TO_USER", false, SITE_ID);
		if($tooltipPathToUser)
			$pathToUser = str_replace("#user_id#", $userId, $tooltipPathToUser)."edit/?current_fieldset=SOCSERV#soc-serv-title-id";
		else
			$pathToUser = "/company/personal/user/$userId/edit/?current_fieldset=SOCSERV#soc-serv-title-id";
		$arResult["SETUP_MESSAGE"] = GetMessage(("JS_CORE_SS_SETUP_ACCOUNT"), array("#class#" => "class=\"bx-ss-soc-serv-setup-link\"", "#link#" => $pathToUser));

		if($_REQUEST['action'] == "getuserdata")
		{
			echo CUtil::PhpToJSObject($arResult);
		}
		else
		{
			$t = filemtime($_SERVER["DOCUMENT_ROOT"].BX_ROOT."/js/socialservices/ss_timeman.js");
开发者ID:ASDAFF,项目名称:bitrix-5,代码行数:31,代码来源:socserv.ajax.php

示例2: unserialize

}

if (check_bitrix_sessid())
{
	CUtil::JSPostUnescape();
	if($_REQUEST['action'] == "getuserdata")
	{
		$arResult['SOCSERVARRAY'] = unserialize(CUserOptions::GetOption("socialservices", "user_socserv_array", '', $USER->GetID()));
		if(!is_array($arResult['SOCSERVARRAY']))
			$arResult['SOCSERVARRAY'] = '';
		$arResult['ENABLED'] = CUserOptions::GetOption("socialservices", "user_socserv_enable", "N", $USER->GetID());
		$arResult['STARTSEND'] = CUserOptions::GetOption("socialservices", "user_socserv_start_day", "N", $USER->GetID());
		$arResult['ENDSEND'] = CUserOptions::GetOption("socialservices", "user_socserv_end_day", "N", $USER->GetID());
		$arResult['STARTTEXT'] = CUserOptions::GetOption("socialservices", "user_socserv_start_text", GetMessage("JS_CORE_SS_WORKDAY_START"), $USER->GetID());
		$arResult['ENDTEXT'] = CUserOptions::GetOption("socialservices", "user_socserv_end_text", GetMessage("JS_CORE_SS_WORKDAY_END"), $USER->GetID());
		$arResult['SOCSERVARRAYALL'] = CSocServAuthManager::GetUserArrayForSendMessages($USER->GetID());

		echo CUtil::PhpToJSObject($arResult);
	}
	elseif($_REQUEST['action'] == "saveuserdata")
	{
		if(isset($_POST["ENABLED"]))
		{
			$userSocServSendEnable = $_POST["ENABLED"];
			CUserOptions::SetOption("socialservices","user_socserv_enable",$userSocServSendEnable, false,$USER->GetID());
		}
		else
		{
			$arUserSocServ = '';
			$userSocServSendEnable = $userSocServSendStart = $userSocServSendEnd = 'N';
			$userSocServEndText = GetMessage("JS_CORE_SS_WORKDAY_END");
开发者ID:nProfessor,项目名称:Mytb,代码行数:31,代码来源:socserv.ajax.php


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