• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP CExtranet类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: prepareParams

 /**
  * Prepares component parameters.
  * @return $this
  * @throws ArgumentException
  */
 protected function prepareParams()
 {
     parent::prepareParams();
     if (!empty($this->arParams['STORAGE'])) {
         if (!$this->arParams['STORAGE'] instanceof Storage) {
             throw new ArgumentException('STORAGE must be instance of \\Bitrix\\Disk\\Storage');
         }
     } elseif (!empty($this->arParams['STORAGE_ID'])) {
         $this->arParams['STORAGE_ID'] = (int) $this->arParams['STORAGE_ID'];
     } else {
         if (empty($this->arParams['STORAGE_MODULE_ID'])) {
             throw new ArgumentException('STORAGE_MODULE_ID required');
         }
         if (empty($this->arParams['STORAGE_ENTITY_TYPE'])) {
             throw new ArgumentException('STORAGE_ENTITY_TYPE required');
         }
         if (!isset($this->arParams['STORAGE_ENTITY_ID'])) {
             throw new ArgumentException('STORAGE_ENTITY_ID required');
         }
     }
     if (empty($this->arParams['PATH_TO_USER'])) {
         $siteId = SITE_ID;
         $currentUser = User::buildFromArray($this->getUser()->getById($this->getUser()->getId())->fetch());
         $default = '/company/personal/user/#user_id#/';
         if ($currentUser->isExtranetUser()) {
             /** @noinspection PhpDynamicAsStaticMethodCallInspection */
             $siteId = \CExtranet::getExtranetSiteID();
             $default = '/extranet/contacts/personal/user/#user_id#/';
         }
         $this->arParams['PATH_TO_USER'] = strtolower(COption::getOptionString('intranet', 'path_user', $default, $siteId));
     }
     return $this;
 }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:38,代码来源:diskcomponent.php


示例2: FilterViewableUsers

 function FilterViewableUsers($var)
 {
     if (!CModule::IncludeModule("extranet") || CExtranet::IsIntranetUser() || CExtranet::IsProfileViewableByID($var["ID"], $GLOBALS["GROUP_SITE_ID"])) {
         return true;
     } else {
         return false;
     }
 }
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:8,代码来源:functions.php


示例3: Enable

 public function Enable($number = '')
 {
     $enable = !IsModuleInstalled('extranet') || CModule::IncludeModule('extranet') && CExtranet::IsIntranetUser();
     if ($enable && strlen($number) > 0) {
         if (!CVoxImplantPhone::Normalize($number)) {
             $enable = false;
         }
     }
     return $enable;
 }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:10,代码来源:vi_main.php


示例4: installBitrix24MailService

 public function installBitrix24MailService()
 {
     if (CModule::IncludeModule("mail")) {
         $result = \Bitrix\Main\SiteTable::getList();
         while (($site = $result->fetch()) !== false) {
             if (CModule::IncludeModule('extranet') && CExtranet::IsExtranetSite($site['LID'])) {
                 continue;
             }
             \Bitrix\Mail\MailServicesTable::add(array('SITE_ID' => $site['LID'], 'ACTIVE' => 'Y', 'NAME' => 'bitrix24', 'SERVICE_TYPE' => 'controller'));
         }
     }
 }
开发者ID:Satariall,项目名称:izurit,代码行数:12,代码来源:index.php


示例5: __GCEGetGroup

 function __GCEGetGroup(&$group_id, &$arGroupProperties = array(), &$arGroupTmp = array(), $tab = false)
 {
     if (!CModule::IncludeModule("socialnetwork")) {
         $group_id = 0;
         return;
     }
     $arGroup = CSocNetGroup::GetByID($group_id);
     if ($arGroup && ($tab == "edit" && ($arGroup["OWNER_ID"] == $GLOBALS["USER"]->GetID() || CSocNetUser::IsCurrentUserModuleAdmin()) || $tab == "invite" && (CSocNetUser::IsCurrentUserModuleAdmin() || CSocNetGroup::CanUserInitiate($GLOBALS["USER"]->GetID(), $group_id)))) {
         $arGroupTmp["NAME"] = $arGroup["NAME"];
         $arGroupTmp["DESCRIPTION"] = $arGroup["DESCRIPTION"];
         $arGroupTmp["IMAGE_ID_DEL"] = "N";
         $arGroupTmp["SUBJECT_ID"] = $arGroup["SUBJECT_ID"];
         $arGroupTmp["VISIBLE"] = $arGroup["VISIBLE"];
         $arGroupTmp["OPENED"] = $arGroup["OPENED"];
         $arGroupTmp["CLOSED"] = $arGroup["CLOSED"];
         $arGroupTmp["KEYWORDS"] = $arGroup["KEYWORDS"];
         $arGroupTmp["OWNER_ID"] = $arGroup["OWNER_ID"];
         $arGroupTmp["INITIATE_PERMS"] = $arGroup["INITIATE_PERMS"];
         $arGroupTmp["SPAM_PERMS"] = $arGroup["SPAM_PERMS"];
         $arGroupTmp["IMAGE_ID"] = $arGroup["IMAGE_ID"];
         $arGroupTmp["IMAGE_ID_FILE"] = CFile::GetFileArray($arGroup["IMAGE_ID"]);
         $arGroupTmp["IMAGE_ID_IMG"] = '<img src="' . ($arGroupTmp["IMAGE_ID_FILE"] != false ? $arGroupTmp["IMAGE_ID_FILE"]["SRC"] : "/bitrix/images/1.gif") . '" height="60" class="sonet-group-create-popup-image" id="sonet_group_create_popup_image" border="0">';
         foreach ($arGroupProperties as $field => $arUserField) {
             if (array_key_exists($field, $arGroup)) {
                 $arGroupProperties[$field]["VALUE"] = $arGroup["~" . $field];
                 $arGroupProperties[$field]["ENTITY_VALUE_ID"] = $arGroup["ID"];
             }
         }
         $arGroupTmp["IS_EXTRANET_GROUP"] = "N";
         if (CModule::IncludeModule("extranet") && CExtranet::IsExtranetSocNetGroup($group_id)) {
             $arGroupTmp["IS_EXTRANET_GROUP"] = "Y";
         }
     } else {
         $arGroupTmp["VISIBLE"] = "Y";
         $arGroupTmp["IS_EXTRANET_GROUP"] = "N";
         $group_id = 0;
     }
 }
开发者ID:webgksupport,项目名称:alpina,代码行数:38,代码来源:include.php


示例6: define

<?php

define("PUBLIC_AJAX_MODE", true);
define("NO_KEEP_STATISTIC", "Y");
define("NO_AGENT_STATISTIC", "Y");
define("NO_AGENT_CHECK", true);
define("DisableEventsCheck", true);
require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_before.php";
header('Content-Type: application/x-javascript; charset=' . LANG_CHARSET);
if (!CModule::IncludeModule("socialnetwork")) {
    echo CUtil::PhpToJsObject(array('ERROR' => 'MODULE_NOT_INSTALLED'));
    die;
}
if (check_bitrix_sessid()) {
    if (CModule::IncludeModule('extranet') && !CExtranet::IsIntranetUser()) {
        echo CUtil::PhpToJsObject(array('ERROR' => 'EXTRANET_USER'));
    } else {
        if (isset($_POST["nt"])) {
            preg_match_all("/(#NAME#)|(#LAST_NAME#)|(#SECOND_NAME#)|(#NAME_SHORT#)|(#SECOND_NAME_SHORT#)|\\s|\\,/", urldecode($_REQUEST["nt"]), $matches);
            $nameTemplate = implode("", $matches[0]);
        } else {
            $nameTemplate = CSite::GetNameFormat(false);
        }
        if ($_POST['LD_SEARCH'] == 'Y') {
            CUtil::decodeURIComponent($_POST);
            echo CUtil::PhpToJsObject(array('USERS' => CSocNetLogDestination::SearchUsers($_POST['SEARCH'], $nameTemplate, false, IsModuleInstalled("extranet"))));
        } elseif ($_POST['LD_DEPARTMENT_RELATION'] == 'Y' && IsModuleInstalled("intranet")) {
            echo CUtil::PhpToJsObject(array('USERS' => CSocNetLogDestination::GetUsers(array('deportament_id' => $_POST['DEPARTMENT_ID'], "NAME_TEMPLATE" => $nameTemplate), false)));
        } elseif (isset($_POST["bitrix_processes"])) {
            if (CModule::IncludeModule('lists')) {
                IncludeModuleLangFile(__FILE__);
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:post.ajax.php


示例7: SendEvent

	public static function SendEvent($ID, $mailTemplate = "SONET_NEW_EVENT", $tmp_id = false, $bAgent = false, $bTransport = false)
	{
		$ID = IntVal($ID);
		if ($ID <= 0)
			return false;

		if (intval($tmp_id) > 0)
			$arFilter = array("ID" => $tmp_id);
		else
			$arFilter = array("ID" => $ID);

		$dbLog = CSocNetLog::GetList(
			array(),
			$arFilter,
			false,
			false,
			array("ID", "ENTITY_TYPE", "ENTITY_ID", "USER_ID", "USER_NAME", "USER_LAST_NAME", "USER_SECOND_NAME", "USER_LOGIN", "EVENT_ID", "LOG_DATE", "TITLE_TEMPLATE", "TITLE", "MESSAGE", "TEXT_MESSAGE", "URL", "MODULE_ID", "CALLBACK_FUNC", "SITE_ID", "PARAMS", "SOURCE_ID", "GROUP_NAME", "CREATED_BY_NAME", "CREATED_BY_SECOND_NAME", "CREATED_BY_LAST_NAME", "CREATED_BY_LOGIN", "LOG_SOURCE_ID"),
			array("MIN_ID_JOIN" => true)
		);
		$arLog = $dbLog->Fetch();
		if (!$arLog)
			return $bAgent;

		if (MakeTimeStamp($arLog["LOG_DATE"]) > (time() + CTimeZone::GetOffset()))
		{
			$agent = "CSocNetLog::SendEventAgent(".$ID.", '".$mailTemplate."', ".($tmp_id ? $tmp_id : 'false').");";
			$rsAgents = CAgent::GetList(array("ID"=>"DESC"), array("NAME" => $agent));
			if(!$rsAgents->Fetch())
			{
				$res = CAgent::AddAgent($agent, "socialnetwork", "N", 0, $arLog["LOG_DATE"], "Y", $arLog["LOG_DATE"]);
				if(!$res)
					$GLOBALS["APPLICATION"]->ResetException();
			}
			elseif ($bAgent)
			{
				CAgent::RemoveAgent($agent, "socialnetwork");
				CAgent::AddAgent($agent, "socialnetwork", "N", 0, $arLog["LOG_DATE"], "Y", $arLog["LOG_DATE"]);
				return true;
			}
			return false;
		}

		$arEvent = CSocNetLogTools::FindLogEventByID($arLog["EVENT_ID"], $arLog["ENTITY_TYPE"]);
		if (
			$arEvent
			&& array_key_exists("CLASS_FORMAT", $arEvent)
			&& array_key_exists("METHOD_FORMAT", $arEvent)
		)
		{
			$dbSiteCurrent = CSite::GetByID(SITE_ID);
			if ($arSiteCurrent = $dbSiteCurrent->Fetch())
				if ($arSiteCurrent["LANGUAGE_ID"] != LANGUAGE_ID)
					$arLog["MAIL_LANGUAGE_ID"] = $arSiteCurrent["LANGUAGE_ID"];

			$arLog["FIELDS_FORMATTED"] = call_user_func(array($arEvent["CLASS_FORMAT"], $arEvent["METHOD_FORMAT"]), $arLog, array(), true);
		}

		if (
			array_key_exists($arLog["ENTITY_TYPE"], $GLOBALS["arSocNetAllowedSubscribeEntityTypesDesc"])
			&& array_key_exists("HAS_MY", $GLOBALS["arSocNetAllowedSubscribeEntityTypesDesc"][$arLog["ENTITY_TYPE"]])
			&& $GLOBALS["arSocNetAllowedSubscribeEntityTypesDesc"][$arLog["ENTITY_TYPE"]]["HAS_MY"] == "Y"
			&& array_key_exists("CLASS_OF", $GLOBALS["arSocNetAllowedSubscribeEntityTypesDesc"][$arLog["ENTITY_TYPE"]])
			&& array_key_exists("METHOD_OF", $GLOBALS["arSocNetAllowedSubscribeEntityTypesDesc"][$arLog["ENTITY_TYPE"]])
			&& strlen($GLOBALS["arSocNetAllowedSubscribeEntityTypesDesc"][$arLog["ENTITY_TYPE"]]["CLASS_OF"]) > 0
			&& strlen($GLOBALS["arSocNetAllowedSubscribeEntityTypesDesc"][$arLog["ENTITY_TYPE"]]["METHOD_OF"]) > 0
			&& method_exists($GLOBALS["arSocNetAllowedSubscribeEntityTypesDesc"][$arLog["ENTITY_TYPE"]]["CLASS_OF"], $GLOBALS["arSocNetAllowedSubscribeEntityTypesDesc"][$arLog["ENTITY_TYPE"]]["METHOD_OF"])
		)
			$arOfEntities = call_user_func(array($GLOBALS["arSocNetAllowedSubscribeEntityTypesDesc"][$arLog["ENTITY_TYPE"]]["CLASS_OF"], $GLOBALS["arSocNetAllowedSubscribeEntityTypesDesc"][$arLog["ENTITY_TYPE"]]["METHOD_OF"]), $arLog["ENTITY_ID"]);

		if ($bTransport)
		{
			$arListParams = array(
				"USE_SUBSCRIBE" => "Y",
				"ENTITY_TYPE" => $arLog["ENTITY_TYPE"],
				"ENTITY_ID" => $arLog["ENTITY_ID"],
				"EVENT_ID" => $arLog["EVENT_ID"],
				"USER_ID" => $arLog["USER_ID"],
				"OF_ENTITIES" => $arOfEntities,
				"TRANSPORT" => array("M", "X")
			);

			$arLogSites = array();
			$rsLogSite = CSocNetLog::GetSite($ID);

			while($arLogSite = $rsLogSite->Fetch())
				$arLogSites[] = $arLogSite["LID"];

			if (CModule::IncludeModule("extranet"))
			{
				$arSites = array();
				$dbSite = CSite::GetList($by="sort", $order="desc", array("ACTIVE" => "Y"));
				while($arSite = $dbSite->Fetch())
					$arSites[$arSite["ID"]] = array(
						"DIR" => (strlen(trim($arSite["DIR"])) > 0 ? $arSite["DIR"] : "/"),
						"SERVER_NAME" => (strlen(trim($arSite["SERVER_NAME"])) > 0 ? $arSite["SERVER_NAME"] : COption::GetOptionString("main", "server_name", $_SERVER["HTTP_HOST"]))
					);

				$extranet_site_id = CExtranet::GetExtranetSiteID();
				$intranet_site_id = CSite::GetDefSite();

//.........这里部分代码省略.........
开发者ID:ASDAFF,项目名称:bxApiDocs,代码行数:101,代码来源:log.php


示例8: IsExternalMailAvailable

 /**
  * duplicate CIMMail::IsExternalMailAvailable()
  * for performance reasons
  */
 public static function IsExternalMailAvailable()
 {
     global $USER;
     if (!is_object($USER) || !$USER->IsAuthorized()) {
         return false;
     }
     if (!IsModuleInstalled('mail')) {
         return false;
     }
     if (COption::GetOptionString('intranet', 'allow_external_mail', 'Y') != 'Y') {
         return false;
     }
     if (COption::GetOptionString('extranet', 'extranet_site', '') == SITE_ID) {
         return false;
     }
     if (isset($_SESSION['aExtranetUser_' . $USER->GetID()][SITE_ID])) {
         if (!$_SESSION['aExtranetUser_' . $USER->GetID()][SITE_ID]) {
             return false;
         }
     } else {
         if (CModule::IncludeModule('extranet') && !CExtranet::IsIntranetUser()) {
             return false;
         }
     }
     if (!IsModuleInstalled('dav')) {
         return true;
     }
     if (COption::GetOptionString('dav', 'exchange_server', '') == '') {
         return true;
     }
     if (COption::GetOptionString('dav', 'agent_mail', 'N') != 'Y') {
         return true;
     }
     if (COption::GetOptionString('dav', 'exchange_use_login', 'Y') == 'Y') {
         return false;
     }
     if (!CUserOptions::GetOption('global', 'davex_mailbox')) {
         $arUser = CUser::GetList($by = 'ID', $order = 'ASC', array('ID_EQUAL_EXACT' => $USER->GetID()), array('SELECT' => array('UF_BXDAVEX_MAILBOX'), 'FIELDS' => array('ID')))->Fetch();
         CUserOptions::SetOption('global', 'davex_mailbox', empty($arUser['UF_BXDAVEX_MAILBOX']) ? 'N' : 'Y');
     }
     if (CUserOptions::GetOption('global', 'davex_mailbox') == 'Y') {
         return false;
     }
     return true;
 }
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:49,代码来源:utils.php


示例9: GetMessage

                 if (!CSocNetUserToGroup::Delete($arRelation["ID"])) {
                     if ($e = $APPLICATION->GetException()) {
                         $errorMessage .= $e->GetString();
                     }
                     if (StrLen($errorMessage) <= 0) {
                         $errorMessage .= GetMessage("SONET_C12_CANT_DELETE_INVITATION") . $arRelation["ID"];
                     }
                 }
             }
             $APPLICATION->ThrowException($errorMessage, "ERROR_DELETE_RELATION");
         }
     }
     if (strlen($errorMessage) > 0) {
         $arResult["ErrorMessage"] = $errorMessage;
     }
 } elseif (CModule::IncludeModule('extranet') && CExtranet::IsExtranetSite() && intval($_REQUEST["invite_user_id"]) > 0) {
     $rsInvitedUser = CUser::GetByID(intval($_REQUEST["invite_user_id"]));
     if (($arInvitedUser = $rsInvitedUser->Fetch()) && (!is_array($arInvitedUser["UF_DEPARTMENT"]) || intval($arInvitedUser["UF_DEPARTMENT"][0]) <= 0)) {
         if (strlen($arInvitedUser["LAST_LOGIN"]) <= 0 && strlen($arInvitedUser["LAST_ACTIVITY_DATE"]) <= 0) {
             $event = new CEvent();
             $arFields = array("USER_ID" => $arInvitedUser["ID"], "CHECKWORD" => $arInvitedUser["CONFIRM_CODE"], "EMAIL" => $arInvitedUser["EMAIL"]);
             $event->Send("EXTRANET_INVITATION", SITE_ID, $arFields);
             LocalRedirect($APPLICATION->GetCurPageParam("invite_sent=Y", array("invite_user_id", "employee")));
         }
     }
 }
 $parser = new CSocNetTextParser(LANGUAGE_ID, $arParams["PATH_TO_SMILE"]);
 $arResult["Requests"] = false;
 $dbRequests = CSocNetUserToGroup::GetList(array("DATE_CREATE" => "ASC"), array("GROUP_ID" => $arResult["Group"]["ID"], "ROLE" => SONET_ROLES_REQUEST, "INITIATED_BY_TYPE" => SONET_INITIATED_BY_GROUP), false, $arNavParams, array("ID", "USER_ID", "DATE_CREATE", "DATE_UPDATE", "MESSAGE", "USER_NAME", "USER_LAST_NAME", "USER_SECOND_NAME", "USER_LOGIN", "USER_PERSONAL_PHOTO", "USER_PERSONAL_GENDER"));
 if ($dbRequests) {
     $arResult["Requests"] = array();
开发者ID:Satariall,项目名称:izurit,代码行数:31,代码来源:component.php


示例10: SendEvent

 function SendEvent($ID, $mailTemplate = "SONET_NEW_EVENT")
 {
     $ID = IntVal($ID);
     if ($ID <= 0) {
         return false;
     }
     $arFilter = array("ID" => $ID);
     $dbLogComments = CSocNetLogComments::GetList(array(), $arFilter, false, false, array("ID", "LOG_ID", "ENTITY_TYPE", "ENTITY_ID", "USER_ID", "USER_NAME", "USER_LAST_NAME", "USER_SECOND_NAME", "USER_LOGIN", "EVENT_ID", "LOG_DATE", "MESSAGE", "TEXT_MESSAGE", "URL", "MODULE_ID", "GROUP_NAME", "CREATED_BY_NAME", "CREATED_BY_SECOND_NAME", "CREATED_BY_LAST_NAME", "CREATED_BY_LOGIN", "LOG_SITE_ID", "SOURCE_ID", "LOG_SOURCE_ID"));
     $arLogComment = $dbLogComments->Fetch();
     if (!$arLogComment) {
         return false;
     }
     $arLog = array();
     if (intval($arLogComment["LOG_ID"]) > 0) {
         $dbLog = CSocNetLog::GetList(array(), array("ID" => $arLogComment["LOG_ID"]));
         $arLog = $dbLog->Fetch();
         if (!$arLog) {
             $arLog = array();
         }
     }
     $arEvent = CSocNetLogTools::FindLogCommentEventByID($arLogComment["EVENT_ID"]);
     if ($arEvent && array_key_exists("CLASS_FORMAT", $arEvent) && array_key_exists("METHOD_FORMAT", $arEvent) && strlen($arEvent["CLASS_FORMAT"]) > 0 && strlen($arEvent["METHOD_FORMAT"]) > 0) {
         $dbSiteCurrent = CSite::GetByID(SITE_ID);
         if ($arSiteCurrent = $dbSiteCurrent->Fetch()) {
             if ($arSiteCurrent["LANGUAGE_ID"] != LANGUAGE_ID) {
                 $arLogComment["MAIL_LANGUAGE_ID"] = $arSiteCurrent["LANGUAGE_ID"];
             }
         }
         $arLogComment["FIELDS_FORMATTED"] = call_user_func(array($arEvent["CLASS_FORMAT"], $arEvent["METHOD_FORMAT"]), $arLogComment, array(), true, $arLog);
     }
     if (array_key_exists($arLogComment["ENTITY_TYPE"], $GLOBALS["arSocNetAllowedSubscribeEntityTypesDesc"]) && array_key_exists("HAS_MY", $GLOBALS["arSocNetAllowedSubscribeEntityTypesDesc"][$arLogComment["ENTITY_TYPE"]]) && $GLOBALS["arSocNetAllowedSubscribeEntityTypesDesc"][$arLogComment["ENTITY_TYPE"]]["HAS_MY"] == "Y" && array_key_exists("CLASS_OF", $GLOBALS["arSocNetAllowedSubscribeEntityTypesDesc"][$arLogComment["ENTITY_TYPE"]]) && array_key_exists("METHOD_OF", $GLOBALS["arSocNetAllowedSubscribeEntityTypesDesc"][$arLogComment["ENTITY_TYPE"]]) && strlen($GLOBALS["arSocNetAllowedSubscribeEntityTypesDesc"][$arLogComment["ENTITY_TYPE"]]["CLASS_OF"]) > 0 && strlen($GLOBALS["arSocNetAllowedSubscribeEntityTypesDesc"][$arLogComment["ENTITY_TYPE"]]["METHOD_OF"]) > 0 && method_exists($GLOBALS["arSocNetAllowedSubscribeEntityTypesDesc"][$arLogComment["ENTITY_TYPE"]]["CLASS_OF"], $GLOBALS["arSocNetAllowedSubscribeEntityTypesDesc"][$arLogComment["ENTITY_TYPE"]]["METHOD_OF"])) {
         $arOfEntities = call_user_func(array($GLOBALS["arSocNetAllowedSubscribeEntityTypesDesc"][$arLogComment["ENTITY_TYPE"]]["CLASS_OF"], $GLOBALS["arSocNetAllowedSubscribeEntityTypesDesc"][$arLogComment["ENTITY_TYPE"]]["METHOD_OF"]), $arLogComment["ENTITY_ID"]);
     }
     $arListParams = array("USE_SUBSCRIBE" => "Y", "ENTITY_TYPE" => $arLogComment["ENTITY_TYPE"], "ENTITY_ID" => $arLogComment["ENTITY_ID"], "EVENT_ID" => $arLogComment["EVENT_ID"], "USER_ID" => $arLogComment["USER_ID"], "OF_ENTITIES" => $arOfEntities, "TRANSPORT" => array("M", "X"));
     $arLogSites = array();
     $rsLogSite = CSocNetLog::GetSite($arLog["ID"]);
     while ($arLogSite = $rsLogSite->Fetch()) {
         $arLogSites[] = $arLogSite["LID"];
     }
     if (CModule::IncludeModule("extranet")) {
         if ($arLogComment["ENTITY_TYPE"] == SONET_ENTITY_GROUP) {
             $arSites = array();
             $dbSite = CSite::GetList($by = "sort", $order = "desc", array("ACTIVE" => "Y"));
             while ($arSite = $dbSite->Fetch()) {
                 $arSites[$arSite["ID"]] = array("DIR" => strlen(trim($arSite["DIR"])) > 0 ? $arSite["DIR"] : "/", "SERVER_NAME" => strlen(trim($arSite["SERVER_NAME"])) > 0 ? $arSite["SERVER_NAME"] : COption::GetOptionString("main", "server_name", $_SERVER["HTTP_HOST"]));
             }
             $intranet_site_id = CSite::GetDefSite();
         }
         $arIntranetUsers = CExtranet::GetIntranetUsers();
         $extranet_site_id = CExtranet::GetExtranetSiteID();
     }
     $dbSubscribers = CSocNetLogEvents::GetList(array("TRANSPORT" => "DESC"), array("USER_ACTIVE" => "Y", "SITE_ID" => array_merge($arLogSites, array(false))), false, false, array("USER_ID", "ENTITY_TYPE", "ENTITY_ID", "ENTITY_CB", "ENTITY_MY", "USER_NAME", "USER_LAST_NAME", "USER_LOGIN", "USER_LID", "USER_EMAIL", "TRANSPORT"), $arListParams);
     $arListParams = array("USE_SUBSCRIBE" => "Y", "ENTITY_TYPE" => $arLogComment["ENTITY_TYPE"], "ENTITY_ID" => $arLogComment["ENTITY_ID"], "EVENT_ID" => $arLogComment["EVENT_ID"], "USER_ID" => $arLogComment["USER_ID"], "OF_ENTITIES" => $arOfEntities, "TRANSPORT" => "N");
     $dbUnSubscribers = CSocNetLogEvents::GetList(array("TRANSPORT" => "DESC"), array("USER_ACTIVE" => "Y", "SITE_ID" => array_merge($arLogSites, array(false))), false, false, array("USER_ID", "SITE_ID", "ENTITY_TYPE", "ENTITY_ID", "ENTITY_CB", "ENTITY_MY", "TRANSPORT", "EVENT_ID"), $arListParams);
     $arUnSubscribers = array();
     while ($arUnSubscriber = $dbUnSubscribers->Fetch()) {
         $arUnSubscribers[] = $arUnSubscriber["USER_ID"] . "_" . $arUnSubscriber["ENTITY_TYPE"] . "_" . $arUnSubscriber["ENTITY_ID"] . "_" . $arUnSubscriber["ENTITY_MY"] . "_" . $arUnSubscriber["ENTITY_CB"] . "_" . $arUnSubscriber["EVENT_ID"];
     }
     $bHasAccessAll = CSocNetLogRights::CheckForUserAll($arLog["ID"] ? $arLog["ID"] : $arLogComment["LOG_ID"]);
     $arSentUserID = array("M" => array(), "X" => array());
     while ($arSubscriber = $dbSubscribers->Fetch()) {
         if (is_array($arIntranetUsers) && !in_array($arSubscriber["USER_ID"], $arIntranetUsers) && !in_array($extranet_site_id, $arLogSites)) {
             continue;
         }
         if (array_key_exists($arSubscriber["TRANSPORT"], $arSentUserID) && in_array($arSubscriber["USER_ID"], $arSentUserID[$arSubscriber["TRANSPORT"]])) {
             continue;
         }
         if (intval($arSubscriber["ENTITY_ID"]) != 0 && $arSubscriber["EVENT_ID"] == "all" && (in_array($arSubscriber["USER_ID"] . "_" . $arSubscriber["ENTITY_TYPE"] . "_" . $arSubscriber["ENTITY_ID"] . "_N_" . $arSubscriber["ENTITY_CB"] . "_" . $arLogComment["EVENT_ID"], $arUnSubscribers) || in_array($arSubscriber["USER_ID"] . "_" . $arSubscriber["ENTITY_TYPE"] . "_" . $arSubscriber["ENTITY_ID"] . "_Y_" . $arSubscriber["ENTITY_CB"] . "_" . $arLogComment["EVENT_ID"], $arUnSubscribers))) {
             continue;
         } elseif (intval($arSubscriber["ENTITY_ID"]) == 0 && $arSubscriber["ENTITY_CB"] == "N" && $arSubscriber["EVENT_ID"] != "all" && (in_array($arSubscriber["USER_ID"] . "_" . $arSubscriber["ENTITY_TYPE"] . "_" . $arLogComment["ENTITY_ID"] . "_Y_N_all", $arUnSubscribers) || in_array($arSubscriber["USER_ID"] . "_" . $arSubscriber["ENTITY_TYPE"] . "_" . $arLogComment["ENTITY_ID"] . "_N_N_all", $arUnSubscribers) || in_array($arSubscriber["USER_ID"] . "_" . $arSubscriber["ENTITY_TYPE"] . "_" . $arLogComment["ENTITY_ID"] . "_Y_N_" . $arLogComment["EVENT_ID"], $arUnSubscribers) || in_array($arSubscriber["USER_ID"] . "_" . $arSubscriber["ENTITY_TYPE"] . "_" . $arLogComment["ENTITY_ID"] . "_N_N_" . $arLogComment["EVENT_ID"], $arUnSubscribers))) {
             continue;
         }
         $arSentUserID[$arSubscriber["TRANSPORT"]][] = $arSubscriber["USER_ID"];
         if (!$bHasAccessAll) {
             $bHasAccess = CSocNetLogRights::CheckForUserOnly($arLog["ID"] ? $arLog["ID"] : $arLogComment["LOG_ID"], $arSubscriber["USER_ID"]);
             if (!$bHasAccess) {
                 continue;
             }
         }
         if ($arLogComment["ENTITY_TYPE"] == SONET_ENTITY_GROUP && is_array($arIntranetUsers) && CModule::IncludeModule("extranet")) {
             $server_name = $arSites[!in_array($arSubscriber["USER_ID"], $arIntranetUsers) && $extranet_site_id ? $extranet_site_id : $intranet_site_id]["SERVER_NAME"];
             $arLogComment["FIELDS_FORMATTED"]["EVENT_FORMATTED"]["URL_TO_SEND"] = str_replace(array("#SERVER_NAME#", "#GROUPS_PATH#"), array($server_name, COption::GetOptionString("socialnetwork", "workgroups_page", false, !in_array($arSubscriber["USER_ID"], $arIntranetUsers) && $extranet_site_id ? $extranet_site_id : $intranet_site_id)), $arLogComment["FIELDS_FORMATTED"]["EVENT_FORMATTED"]["URL"]);
         } else {
             $arLogComment["FIELDS_FORMATTED"]["EVENT_FORMATTED"]["URL_TO_SEND"] = $arLogComment["FIELDS_FORMATTED"]["EVENT_FORMATTED"]["URL"];
         }
         switch ($arSubscriber["TRANSPORT"]) {
             case "X":
                 if (array_key_exists("URL_TO_SEND", $arLogComment["FIELDS_FORMATTED"]["EVENT_FORMATTED"]) && strlen($arLogComment["FIELDS_FORMATTED"]["EVENT_FORMATTED"]["URL_TO_SEND"]) > 0) {
                     $link = GetMessage("SONET_GLC_SEND_EVENT_LINK") . $arLogComment["FIELDS_FORMATTED"]["EVENT_FORMATTED"]["URL_TO_SEND"];
                 } else {
                     $link = "";
                 }
                 $arMessageFields = array("FROM_USER_ID" => intval($arLogComment["USER_ID"]) > 0 ? $arLogComment["USER_ID"] : 1, "TO_USER_ID" => $arSubscriber["USER_ID"], "MESSAGE" => $arLogComment["FIELDS_FORMATTED"]["EVENT_FORMATTED"]["TITLE"] . " #BR# " . $arLogComment["FIELDS_FORMATTED"]["EVENT_FORMATTED"]["MESSAGE"] . (strlen($link) > 0 ? "#BR# " . $link : ""), "=DATE_CREATE" => $GLOBALS["DB"]->CurrentTimeFunction(), "MESSAGE_TYPE" => SONET_MESSAGE_SYSTEM, "IS_LOG" => "Y");
                 CSocNetMessages::Add($arMessageFields);
                 break;
             case "M":
                 $arFields["SUBSCRIBER_ID"] = $arSubscriber["USER_ID"];
                 $arFields["SUBSCRIBER_NAME"] = $arSubscriber["USER_NAME"];
                 $arFields["SUBSCRIBER_LAST_NAME"] = $arSubscriber["USER_LAST_NAME"];
                 $arFields["SUBSCRIBER_LOGIN"] = $arSubscriber["USER_LOGIN"];
//.........这里部分代码省略.........
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:101,代码来源:log_comments.php


示例11: elseif

}
/********************************************************************
				/Content search
********************************************************************/
/********************************************************************
				Buziness-process
********************************************************************/
if ($componentPage == "bizproc_task") {
    $componentPage = "bizproc_edit";
} elseif ($componentPage == "bizproc_task_list") {
    $componentPage = "bizproc";
}
/********************************************************************
				/Buziness-process
********************************************************************/
if (!in_array($componentPage, array("message_form_mess", "messages_chat", "messages_users_messages")) && IntVal($arResult["VARIABLES"]["user_id"]) > 0 && $arResult["VARIABLES"]["user_id"] != $USER->GetID() && $bExtranetEnabled && CModule::IncludeModule('extranet') && !CExtranet::IsProfileViewableByID($arResult["VARIABLES"]["user_id"])) {
    if ($componentPage = "user_blog_post") {
        if (isset($arResult["VARIABLES"]["post_id"]) && intval($arResult["VARIABLES"]["post_id"]) > 0) {
            $rsLog = CSocNetLog::GetList(array(), array("EVENT_ID" => array("blog_post", "blog_post_important"), "SOURCE_ID" => intval($arResult["VARIABLES"]["post_id"])), false, false, array("ID"), array("CHECK_RIGHTS" => "Y"));
            if ($arLog = $rsLog->Fetch()) {
                $bAccessFound = true;
            }
        }
    }
    if (!$bAccessFound) {
        ShowError(GetMessage("SONET_ACCESS_DENIED"));
        return;
    }
}
CUtil::InitJSCore(array("window", "ajax"));
$this->IncludeComponentTemplate($componentPage, array_key_exists($componentPage, $arCustomPagesPath) ? $arCustomPagesPath[$componentPage] : "");
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:component.php


示例12: CPHPCache

         $obCache = new CPHPCache();
         $cache_dir = '/bitrix/sonet_log_sg';
         if ($obCache->InitCache($ttl, $cache_id, $cache_dir)) {
             $tmpVal = $obCache->GetVars();
             $GLOBALS["arExtranetGroupID"] = $tmpVal['EX_GROUP_ID'];
             $GLOBALS["arExtranetUserID"] = $tmpVal['EX_USER_ID'];
             unset($tmpVal);
         } elseif (CModule::IncludeModule("extranet") && !CExtranet::IsExtranetSite()) {
             global $CACHE_MANAGER;
             $CACHE_MANAGER->StartTagCache($cache_dir);
             $dbGroupTmp = CSocNetGroup::GetList(array(), array("SITE_ID" => CExtranet::GetExtranetSiteID()), false, false, array("ID"));
             while ($arGroupTmp = $dbGroupTmp->Fetch()) {
                 $GLOBALS["arExtranetGroupID"][] = $arGroupTmp["ID"];
                 $CACHE_MANAGER->RegisterTag('sonet_group_' . $arGroupTmp["ID"]);
             }
             $rsUsers = CUser::GetList($by = "ID", $order = "asc", array("GROUPS_ID" => array(CExtranet::GetExtranetUserGroupID()), "UF_DEPARTMENT" => false));
             while ($arUser = $rsUsers->Fetch()) {
                 $GLOBALS["arExtranetUserID"][] = $arUser["ID"];
                 $CACHE_MANAGER->RegisterTag('sonet_user2group_U' . $arUser["ID"]);
             }
             $CACHE_MANAGER->EndTagCache();
             if ($obCache->StartDataCache()) {
                 $obCache->EndDataCache(array('EX_GROUP_ID' => $GLOBALS["arExtranetGroupID"], 'EX_USER_ID' => $GLOBALS["arExtranetUserID"]));
             }
         }
         unset($obCache);
     }
 }
 if (!$GLOBALS["USER"]->IsAuthorized()) {
     $arResult[0] = "*";
 } elseif (!check_bitrix_sessid()) {
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:ajax.php


示例13: CheckPhoneStatus

	public static function CheckPhoneStatus()
	{
		return IsModuleInstalled('voximplant') && IsModuleInstalled('pull') && CPullOptions::GetNginxStatus() && (!IsModuleInstalled('extranet') || CModule::IncludeModule('extranet') && CExtranet::IsIntranetUser());
	}
开发者ID:ASDAFF,项目名称:1C_Bitrix_info_site,代码行数:4,代码来源:im_messenger.php


示例14: array

<?php

if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
    die;
}
include_once $_SERVER['DOCUMENT_ROOT'] . '/bitrix/components/bitrix/desktop/include.php';
$arGadgetsFixed = array();
$arGadgets = BXGadget::GetList();
foreach ($arGadgets as $gd) {
    if ($gd["SU_ONLY"] == true || $gd["SG_ONLY"] == true) {
        continue;
    }
    if (!array_key_exists("CAN_BE_FIXED", $gd) || !$gd["CAN_BE_FIXED"]) {
        continue;
    }
    if ($gd["EXTRANET_ONLY"] == true && (!CModule::IncludeModule('extranet') || !CExtranet::IsExtranetSite($_REQUEST["src_site"]))) {
        continue;
    }
    if ($gd["SEARCH_ONLY"] == true && !IsModuleInstalled("search")) {
        continue;
    }
    if ($gd["FORUM_ONLY"] == true && !IsModuleInstalled("forum")) {
        continue;
    }
    if ($gd["BLOG_ONLY"] == true && !IsModuleInstalled("blog")) {
        continue;
    }
    if ($gd["PHOTOGALLERY_ONLY"] == true && !IsModuleInstalled("photogallery")) {
        continue;
    }
    if ($gd["WEBDAV_ONLY"] == true && !IsModuleInstalled("webdav")) {
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:.parameters.php


示例15: array

 $arResult["CanComment"] = $GLOBALS["USER"]->IsAuthorized();
 $arResult["dest_users"] = array();
 foreach ($arResult["Post"]["SPERM"] as $key => $value) {
     foreach ($value as $kk => $vv) {
         $arResult["PostSrc"]["SPERM"][$key][] = $kk;
         if ($key == "U") {
             $arResult["dest_users"][] = $kk;
         }
     }
 }
 $arResult["PostSrc"]["HAVE_ALL_IN_ADR"] = $arResult["Post"]["HAVE_ALL_IN_ADR"];
 if ($arParams["CHECK_PERMISSIONS_DEST"] == "N" && !CSocNetUser::IsCurrentUserModuleAdmin() && is_object($GLOBALS["USER"])) {
     $arResult["Post"]["SPERM_HIDDEN"] = 0;
     $arGroupID = CSocNetLogTools::GetAvailableGroups($arResult["bExtranetUser"] ? "Y" : "N", $arResult["bExtranetSite"] ? "Y" : "N");
     if (!$arResult["bExtranetUser"] && CModule::IncludeModule("extranet")) {
         $arAvailableExtranetUserID = CExtranet::GetMyGroupsUsersSimple(CExtranet::GetExtranetSiteID());
     }
     foreach ($arResult["Post"]["SPERM"] as $group_code => $arBlogSPerm) {
         foreach ($arBlogSPerm as $entity_id => $arBlogSPermDesc) {
             if ($group_code == "SG" && !in_array($entity_id, $arGroupID) || $group_code == "DR" && $arResult["bExtranetUser"] || $group_code == "U" && isset($arUserIdVisible) && is_array($arUserIdVisible) && !in_array($entity_id, $arUserIdVisible) || $group_code == "U" && isset($arBlogSPermDesc["IS_EXTRANET"]) && $arBlogSPermDesc["IS_EXTRANET"] == "Y" && isset($arAvailableExtranetUserID) && is_array($arAvailableExtranetUserID) && !in_array($entity_id, $arAvailableExtranetUserID)) {
                 unset($arResult["Post"]["SPERM"][$group_code][$entity_id]);
                 $arResult["Post"]["SPERM_HIDDEN"]++;
                 $arResult["PostSrc"]["SPERM_HIDDEN"][] = $group_code . $entity_id;
             }
         }
     }
 }
 $arResult["PostSrc"]["SPERM_NAME"] = $arResult["Post"]["SPERM"];
 if ($arResult["PostPerm"] > BLOG_PERMS_MODERATE || $arResult["PostPerm"] >= BLOG_PERMS_WRITE && $arPost["AUTHOR_ID"] == $arResult["USER_ID"]) {
     $arResult["urlToEdit"] = CComponentEngine::MakePathFromTemplate($arParams["PATH_TO_POST_EDIT"], array("post_id" => $arPost["ID"], "user_id" => $arPost["AUTHOR_ID"]));
     if (in_array($arParams["TYPE"], array("DRAFT", "MODERATION"))) {
开发者ID:Satariall,项目名称:izurit,代码行数:31,代码来源:component.php


示例16: IncludeModuleLangFile

<?php

if ($_SERVER["REQUEST_METHOD"] == "POST" && array_key_exists("IM_AJAX_CALL", $_REQUEST) && $_REQUEST["IM_AJAX_CALL"] === "Y" && $_POST['IM_PHONE'] == 'Y') {
    if (intval($USER->GetID()) <= 0 || !(IsModuleInstalled('voximplant') && (!IsModuleInstalled('extranet') || CModule::IncludeModule('extranet') && CExtranet::IsIntranetUser()))) {
        echo CUtil::PhpToJsObject(array('ERROR' => 'AUTHORIZE_ERROR'));
        require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/epilog_after.php";
        die;
    }
    if (check_bitrix_sessid()) {
        IncludeModuleLangFile($_SERVER['DOCUMENT_ROOT'] . BX_ROOT . '/modules/voximplant/ajax_hit.php');
        $chatId = intval($_POST['CHAT_ID']);
        $userId = intval($USER->GetId());
        if ($_POST['COMMAND'] == 'authorize') {
            $updateInfo = $_POST['UPDATE_INFO'] == 'Y';
            $ViMain = new CVoxImplantMain($userId);
            $result = $ViMain->GetAuthorizeInfo($updateInfo);
            if (!$result) {
                echo CUtil::PhpToJsObject(array('CODE' => $ViMain->GetError()->code, 'ERROR' => $ViMain->GetError()->msg));
            } else {
                echo CUtil::PhpToJsObject(array('ACCOUNT' => $result['ACCOUNT'], 'SERVER' => $result['SERVER'], 'LOGIN' => $result['LOGIN'], 'CALLERID' => $result['CALLERID'], 'HR_PHOTO' => $result['HR_PHOTO'], 'ERROR' => ''));
            }
        } else {
            if ($_POST['COMMAND'] == 'onetimekey') {
                $ViMain = new CVoxImplantMain($userId);
                $result = $ViMain->GetOneTimeKey($_POST['KEY']);
                if (!$result) {
                    echo CUtil::PhpToJsObject(array('CODE' => $ViMain->GetError()->code, 'ERROR' => $ViMain->GetError()->msg));
                } else {
                    echo CUtil::PhpToJsObject(array('HASH' => $result, 'ERROR' => ''));
                }
            } else {
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:ajax_hit.php


示例17: Update

该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP CF7DBPlugin类代码示例发布时间:2022-05-23
下一篇:
PHP CEventType类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap