本文整理汇总了PHP中CExtranet::GetIntranetUsers方法的典型用法代码示例。如果您正苦于以下问题:PHP CExtranet::GetIntranetUsers方法的具体用法?PHP CExtranet::GetIntranetUsers怎么用?PHP CExtranet::GetIntranetUsers使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CExtranet
的用法示例。
在下文中一共展示了CExtranet::GetIntranetUsers方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: SendEvent
//.........这里部分代码省略.........
$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();
$arIntranetUsers = CExtranet::GetIntranetUsers();
}
$dbSubscribers = 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", "USER_NAME", "USER_LAST_NAME", "USER_LOGIN", "USER_LID", "USER_EMAIL", "TRANSPORT"),
$arListParams
);
$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" => "N"
);
$dbUnSubscribers = CSocNetLogEvents::GetList(
array("TRANSPORT" => "DESC"),
array(
"USER_ACTIVE" => "Y",
"SITE_ID" => array_merge($arLogSites, array(false))
),
false,
false,
示例2: BXClearCache
$arNewRights[] = "UA";
}
}
}
}
if (!empty($arNewRights)) {
if (CBlogPost::Update($arParams["ID"], array("SOCNET_RIGHTS" => $perms2update, "HAS_SOCNET_ALL" => "N"))) {
BXClearCache(true, "/blog/socnet_post/" . intval($arParams["ID"] / 100) . "/" . $arParams["ID"] . "/");
BXClearCache(true, "/blog/socnet_post/gen/" . intval($arParams["ID"] / 100) . "/" . $arParams["ID"] . "/");
BXClearCache(True, "/" . SITE_ID . "/blog/popular_posts/");
$arLogSitesNew = array();
$arNewRightsName = array();
$arUsers2Notify = array();
$arSPERM = CBlogPost::GetSocnetPermsName($arResult["Post"]["ID"]);
if ($arResult["bExtranetInstalled"]) {
$arIntranetUserID = CExtranet::GetIntranetUsers();
}
foreach ($arSPERM as $type => $v) {
foreach ($v as $vv) {
$name = "";
$link = "";
$id = "";
if ($type == "SG" && in_array($type . $vv["ENTITY_ID"], $arNewRights)) {
if ($arSocNetGroup = CSocNetGroup::GetByID($vv["ENTITY_ID"])) {
$name = $arSocNetGroup["NAME"];
$link = CComponentEngine::MakePathFromTemplate($arParams["PATH_TO_GROUP"], array("group_id" => $vv["ENTITY_ID"]));
$groupSiteID = false;
$rsGroupSite = CSocNetGroup::GetSite($vv["ENTITY_ID"]);
while ($arGroupSite = $rsGroupSite->Fetch()) {
$arLogSitesNew[] = $arGroupSite["LID"];
if (!$groupSiteID && (!$arResult["bExtranetInstalled"] || $arGroupSite["LID"] != CExtranet::GetExtranetSiteID())) {
示例3: 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"];
//.........这里部分代码省略.........
示例4: array
}
$arUsersToFilter = array();
$dbRequests = CSocNetUserToGroup::GetList(array(), array("GROUP_ID" => $group_id, "<=ROLE" => SONET_ROLES_USER, "USER_ACTIVE" => "Y"), false, false, array("ID", "USER_ID", "ROLE"));
if ($dbRequests) {
while ($arRequests = $dbRequests->Fetch()) {
$arUsersToFilter[] = $arRequests["USER_ID"];
}
}
} elseif ($EXTERNAL == 'A' && strlen($site) > 0 && CModule::IncludeModule("extranet") && CExtranet::IsExtranetSite($site)) {
if ($GLOBALS["APPLICATION"]->GetGroupRight("socialnetwork", false, "Y", "Y", array($site, false)) >= "W") {
$arUsersToFilter = CExtranet::GetExtranetGroupUsers();
} else {
$arUsersToFilter = CExtranet::GetMyGroupsUsers($site);
}
} elseif ($EXTERNAL == 'A' && CModule::IncludeModule("extranet") && CExtranet::IsIntranetUser()) {
$arUsersToFilter = CExtranet::GetIntranetUsers();
} elseif (IsModuleInstalled('extranet')) {
require_once $_SERVER["DOCUMENT_ROOT"] . BX_ROOT . "/modules/main/include/epilog_after.php";
die;
}
$matches = array();
if (preg_match('/^(.*?)<[a-z0-9.\\-_]+@[a-z0-9.\\-]+> \\[([\\d]+?)\\]/i', $search, $matches)) {
$matches[2] = intval($matches[2]);
if ($matches[2] > 0 && (!is_array($arUsersToFilter) || in_array($matches[2], $arUsersToFilter))) {
$dbRes = CUser::GetByID($matches[2]);
if ($arRes = $dbRes->Fetch()) {
$arUsers = array(array('ID' => $arRes['ID'], 'NAME' => str_replace(array(';', ','), ' ', CIntranetUtils::FormatName($nameTemplate, $arRes, false)) . ' <' . $arRes['EMAIL'] . '>', 'UF_DEPARTMENT' => $arRes['UF_DEPARTMENT'], 'READY' => 'Y'));
Header('Content-Type: application/x-javascript; charset=' . LANG_CHARSET);
echo CUtil::PhpToJsObject($arUsers);
die;
}
示例5: GetList
function GetList($arParams)
{
$sectionId = isset($arParams['sectionId']) && $arParams['sectionId'] !== false ? $arParams['sectionId'] : 0;
$iblockId = $arParams['iblockId'];
$xmlId = isset($arParams['xmlId']) && $arParams['xmlId'] !== false ? $arParams['xmlId'] : 0;
$forExport = $arParams['forExport'] == true;
$checkPermissions = $forExport ? 'N' : 'Y';
$bOwner = $arParams['bOwner'] === true;
$arFilter = array("SECTION_ID" => $sectionId, "IBLOCK_ID" => $iblockId, "ACTIVE" => "Y", "CHECK_PERMISSIONS" => $checkPermissions);
if ($bOwner) {
$ownerType = $arParams['ownerType'];
$ownerId = $arParams['ownerId'];
if ($ownerType == 'USER') {
$arFilter["CREATED_BY"] = $ownerId;
$userId = $arParams['userId'] ? intVal($arParams['userId']) : $GLOBALS['USER']->GetID();
$bCurUserOwner = $ownerId == $userId;
} elseif ($ownerType == 'GROUP') {
$arFilter["SOCNET_GROUP_ID"] = $ownerId;
$bCurUserOwner = true;
}
} else {
$ownerType = false;
$ownerId = false;
$bCurUserOwner = true;
}
/* modified by wladart */
// get superpose calendars
//if (!$bOwner && CModule::IncludeModule('extranet'))
if (CModule::IncludeModule('extranet')) {
if (CExtranet::IsExtranetSite()) {
$arUsersInMyGroupsID = CExtranet::GetMyGroupsUsers(SITE_ID);
$arPublicUsersID = CExtranet::GetPublicUsers();
$arUsersToFilter = array_merge($arUsersInMyGroupsID, $arPublicUsersID);
$arFilter["CREATED_BY"] = $arUsersToFilter;
} else {
$arFilter["CREATED_BY"] = CExtranet::GetIntranetUsers();
}
}
/* --modified by wladart */
if ($xmlId !== 0) {
$arFilter['XML_ID'] = $xmlId;
if ($sectionId === 0) {
unset($arFilter['SECTION_ID']);
}
}
$rsData = CIBlockSection::GetList(array('ID' => 'ASC'), $arFilter);
$arCalendars = array();
if (!$arParams['bSuperposed'] && !$arParams['bOnlyID']) {
$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"), false);
}
while ($arRes = $rsData->Fetch()) {
$privateStatus = CECCalendar::GetPrivateStatus($iblockId, $arRes['ID'], $ownerType);
if ($privateStatus == 'private' && !$bCurUserOwner) {
continue;
}
if ($arParams['bOnlyID']) {
$arCalendars[] = intVal($arRes['ID']);
continue;
}
$calendar = array("ID" => intVal($arRes['ID']), "IBLOCK_ID" => $iblockId, "IBLOCK_SECTION_ID" => intVal($arRes['IBLOCK_SECTION_ID']), "NAME" => htmlspecialcharsex($arRes['NAME']), "DESCRIPTION" => htmlspecialcharsex($arRes['DESCRIPTION']), "COLOR" => CECCalendar::GetColor($iblockId, $arRes['ID'], $ownerType), "PRIVATE_STATUS" => $privateStatus);
if (!$arParams['bSuperposed']) {
$calendar["OUTLOOK_JS"] = CECCalendar::GetOutlookLink(array('ID' => intVal($arRes['ID']), 'XML_ID' => $arRes['XML_ID'], 'IBLOCK_ID' => $iblockId, 'NAME' => htmlspecialcharsex($arRes['NAME']), 'PREFIX' => CEventCalendar::GetOwnerName(array('iblockId' => $iblockId, 'ownerType' => $ownerType, 'ownerId' => $ownerId)), 'LINK_URL' => $outerUrl));
$arExport = CECCalendar::GetExportParams($iblockId, $arRes['ID'], $ownerType, $ownerId);
$calendar["EXPORT"] = $arExport['ALLOW'];
$calendar["EXPORT_SET"] = $arExport['SET'];
$calendar["EXPORT_LINK"] = $arExport['LINK'];
}
$arCalendars[] = $calendar;
}
return $arCalendars;
}
示例6: __deprecated_Add
//.........这里部分代码省略.........
$parser->allow = array("HTML" => 'Y', "ANCHOR" => 'Y', "BIU" => 'Y', "IMG" => "Y", "VIDEO" => "Y", "LIST" => 'N', "QUOTE" => 'Y', "CODE" => 'Y', "FONT" => 'Y', "SMILES" => "N", "UPLOAD" => 'N', "NL2BR" => 'N', "TABLE" => "Y");
$message_notify = $parser->convertText($commentText);
$arRecipientsIDs = CTaskNotifications::GetRecipientsIDs($arTask);
// Instant Messages
if (IsModuleInstalled("im") && CModule::IncludeModule("im") && sizeof($arRecipientsIDs)) {
$pageNumber = CForumMessage::GetMessagePage($MID, $messagesPerPage, $arUserGroupArray);
// There are different links for extranet users
$isExtranetEnabled = false;
if (CModule::IncludeModule("extranet")) {
$isExtranetEnabled = true;
}
if ($isExtranetEnabled) {
$arSites = array();
$dbSite = CSite::GetList($by = "sort", $order = "desc", array("ACTIVE" => "Y"));
while ($arSite = $dbSite->Fetch()) {
if (strlen(trim($arSite["DIR"])) > 0) {
$arSites[$arSite['ID']]['DIR'] = $arSite['DIR'];
} else {
$arSites[$arSite['ID']]['DIR'] = '/';
}
if (strlen(trim($arSite["SERVER_NAME"])) > 0) {
$arSites[$arSite['ID']]['SERVER_NAME'] = $arSite["SERVER_NAME"];
} else {
$arSites[$arSite['ID']]['SERVER_NAME'] = COption::GetOptionString("main", "server_name", $_SERVER["HTTP_HOST"]);
}
$arSites[$arSite['ID']]['urlPrefix'] = $arSites[$arSite['ID']]['SERVER_NAME'] . $arSites[$arSite['ID']]['DIR'];
// remove last '/'
if (strlen($arSites[$arSite['ID']]['urlPrefix']) > 0 && substr($arSites[$arSite['ID']]['urlPrefix'], -1) === '/') {
$arSites[$arSite['ID']]['urlPrefix'] = substr($arSites[$arSite['ID']]['urlPrefix'], 0, -1);
}
}
$extranet_site_id = CExtranet::GetExtranetSiteID();
$intranet_site_id = CSite::GetDefSite();
$arIntranetUsers = CExtranet::GetIntranetUsers();
} else {
if ($arTask["GROUP_ID"]) {
$pathTemplateWoExtranet = str_replace("#group_id#", $arTask["GROUP_ID"], COption::GetOptionString("tasks", "paths_task_group_entry", "/workgroups/group/#group_id#/tasks/task/view/#task_id#/", $arFields["SITE_ID"]));
} else {
$pathTemplateWoExtranet = COption::GetOptionString("tasks", "paths_task_user_entry", "/company/personal/user/#user_id#/tasks/task/view/#task_id#/", $arFields["SITE_ID"]);
}
}
foreach ($arRecipientsIDs as $userID) {
$urlPrefixForUser = tasksServerName();
if ($isExtranetEnabled) {
if (!in_array($userID, $arIntranetUsers) && $extranet_site_id) {
$userSiteId = $extranet_site_id;
} else {
$userSiteId = $intranet_site_id;
}
if (isset($arSites[$userSiteId]['SERVER_NAME'])) {
$urlPrefixForUser = tasksServerName($arSites[$userSiteId]['SERVER_NAME']);
}
if ($arTask["GROUP_ID"]) {
$pathTemplate = str_replace('#group_id#', $arTask['GROUP_ID'], CTasksTools::GetOptionPathTaskGroupEntry($userSiteId, ''));
} else {
$pathTemplate = CTasksTools::GetOptionPathTaskUserEntry($userSiteId, '');
}
} else {
$pathTemplate = $pathTemplateWoExtranet;
}
$NOTIFY_MESSAGE_TITLE_TEMPLATE = '';
$messageUrl = '';
if (strlen($pathTemplate) > 0) {
$groupId = 0;
if (isset($arTask['GROUP_ID'])) {
$groupId = (int) $arTask['GROUP_ID'];
示例7: ProcessPath
function ProcessPath($arUrl, $user_id, $explicit_site_id = false)
{
static $arIntranetUsers, $arSiteData, $extranet_site_id, $intranet_site_id;
if (!is_array($arUrl)) {
$arUrl = array($arUrl);
}
if (CModule::IncludeModule("extranet") && !$arIntranetUsers) {
$extranet_site_id = CExtranet::GetExtranetSiteID();
$intranet_site_id = CSite::GetDefSite();
$arIntranetUsers = CExtranet::GetIntranetUsers();
}
if (!$arSiteData) {
$arSiteData = self::GetSiteData();
}
$user_site_id = IsModuleInstalled("extranet") ? !in_array($user_id, $arIntranetUsers) && $extranet_site_id ? $extranet_site_id : ($explicit_site_id ? $explicit_site_id : $intranet_site_id) : ($explicit_site_id ? $explicit_site_id : SITE_ID);
$server_name = (CMain::IsHTTPS() ? "https" : "http") . "://" . $arSiteData[$user_site_id]["SERVER_NAME"];
$arUrl = str_replace(array("#SERVER_NAME#", "#GROUPS_PATH#", "#USER_PATH#"), array($server_name, $arSiteData[$user_site_id]["GROUPS_PATH"], $arSiteData[$user_site_id]["USER_PATH"]), $arUrl);
return array("SERVER_NAME" => $server_name, "URLS" => $arUrl, "DOMAIN" => count($arSiteData) > 1 ? $arSiteData[$user_site_id]["SERVER_NAME"] : false);
}
示例8: GetSitesByLogDestinations
function GetSitesByLogDestinations($arRights, $authorId = false)
{
static $extranet_site_id = null;
static $default_site_id = null;
static $arIntranetSiteID = null;
static $arIntranetUserID = null;
$arSiteID = array();
if (!is_array($arRights)) {
return $arSiteID;
}
if (!$authorId) {
$authorId = $GLOBALS["USER"]->GetID();
}
if ($extranet_site_id === null) {
$extranet_site_id = CExtranet::GetExtranetSiteID();
$arIntranetSiteID = array();
$rsSite = CSite::GetList($by = "sort", $order = "desc", array("ACTIVE" => "Y"));
while ($arSite = $rsSite->Fetch()) {
if ($arSite["LID"] == $extranet_site_id) {
continue;
}
$arIntranetSiteID[] = $arSite["LID"];
}
$default_site_id = CSite::GetDefSite();
$arIntranetUserID = CExtranet::GetIntranetUsers();
}
$bIblockIncluded = CModule::IncludeModule("iblock");
foreach ($arRights as $right_tmp) {
$ar = array_diff($arIntranetSiteID, $arSiteID);
if (empty($ar) && in_array($extranet_site_id, $arSiteID)) {
break;
}
if (preg_match('/^U(\\d+)$/', $right_tmp, $matches)) {
$arSiteID[] = in_array($matches[1], $arIntranetUserID) ? $default_site_id : $extranet_site_id;
} elseif (preg_match('/^SG(\\d+)$/', $right_tmp, $matches)) {
$rsGroupSite = CSocNetGroup::GetSite($matches[1]);
while ($arGroupSite = $rsGroupSite->Fetch()) {
$arSiteID[] = $arGroupSite["LID"];
}
} elseif (preg_match('/^G2$/', $right_tmp, $matches)) {
$arSiteID = array_merge($arSiteID, $arIntranetSiteID);
}
}
if (in_array(SITE_ID, $arIntranetSiteID) && !in_array(SITE_ID, $arSiteID)) {
$arSiteID[] = SITE_ID;
}
return array_unique($arSiteID);
}