當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。