本文整理汇总了PHP中CExtranet::IsExtranetSite方法的典型用法代码示例。如果您正苦于以下问题:PHP CExtranet::IsExtranetSite方法的具体用法?PHP CExtranet::IsExtranetSite怎么用?PHP CExtranet::IsExtranetSite使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CExtranet
的用法示例。
在下文中一共展示了CExtranet::IsExtranetSite方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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'));
}
}
}
示例2: 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;
}
示例3: __SLEGetLogRecord
function __SLEGetLogRecord($logID, $arParams, $arCurrentUserSubscribe, $current_page_date)
{
static $isExtranetInstalled, $isExtranetSite, $isExtranetUser, $arUserIdVisible, $arAvailableExtranetUserID, $isExtranetAdmin, $bCurrentUserIsAdmin, $arSocNetFeaturesSettings;
if (!$isExtranetInstalled) {
$isExtranetInstalled = CModule::IncludeModule("extranet") ? "Y" : "N";
$isExtranetSite = $isExtranetInstalled == "Y" && CExtranet::IsExtranetSite() ? "Y" : "N";
$isExtranetUser = $isExtranetInstalled == "Y" && !CExtranet::IsIntranetUser() ? "Y" : "N";
$isExtranetAdmin = $isExtranetInstalled == "Y" && CExtranet::IsExtranetAdmin() ? "Y" : "N";
$bCurrentUserIsAdmin = CSocNetUser::IsCurrentUserModuleAdmin();
$arSocNetFeaturesSettings = CSocNetAllowed::GetAllowedFeatures();
if ($isExtranetUser == "Y") {
$arUserIdVisible = CExtranet::GetMyGroupsUsersSimple(SITE_ID);
} elseif ($isExtranetInstalled == "Y" && $isExtranetUser != "Y") {
if ($isExtranetAdmin == "Y" && $bCurrentUserIsAdmin) {
$arAvailableExtranetUserID = CExtranet::GetMyGroupsUsers(SITE_ID);
} else {
$arAvailableExtranetUserID = CExtranet::GetMyGroupsUsersSimple(CExtranet::GetExtranetSiteID());
}
}
}
$cache_time = 31536000;
$arEvent = array();
$cache = new CPHPCache();
$arCacheID = array();
$arKeys = array("AVATAR_SIZE", "DESTINATION_LIMIT", "CHECK_PERMISSIONS_DEST", "NAME_TEMPLATE", "NAME_TEMPLATE_WO_NOBR", "SHOW_LOGIN", "DATE_TIME_FORMAT", "PATH_TO_USER", "PATH_TO_GROUP", "PATH_TO_CONPANY_DEPARTMENT");
foreach ($arKeys as $param_key) {
if (array_key_exists($param_key, $arParams)) {
$arCacheID[$param_key] = $arParams[$param_key];
} else {
$arCacheID[$param_key] = false;
}
}
$cache_id = "log_post_" . $logID . "_" . md5(serialize($arCacheID)) . "_" . SITE_TEMPLATE_ID . "_" . SITE_ID . "_" . LANGUAGE_ID . "_" . FORMAT_DATETIME . "_" . CTimeZone::GetOffset();
$cache_path = "/sonet/log/" . intval(intval($logID) / 1000) . "/" . $logID . "/entry/";
if (is_object($cache) && $cache->InitCache($cache_time, $cache_id, $cache_path)) {
$arCacheVars = $cache->GetVars();
$arEvent["FIELDS_FORMATTED"] = $arCacheVars["FIELDS_FORMATTED"];
if (array_key_exists("CACHED_CSS_PATH", $arEvent["FIELDS_FORMATTED"])) {
if (!is_array($arEvent["FIELDS_FORMATTED"]["CACHED_CSS_PATH"]) && strlen($arEvent["FIELDS_FORMATTED"]["CACHED_CSS_PATH"]) > 0) {
$GLOBALS['APPLICATION']->SetAdditionalCSS($arEvent["FIELDS_FORMATTED"]["CACHED_CSS_PATH"]);
} elseif (is_array($arEvent["FIELDS_FORMATTED"]["CACHED_CSS_PATH"])) {
foreach ($arEvent["FIELDS_FORMATTED"]["CACHED_CSS_PATH"] as $css_path) {
$GLOBALS['APPLICATION']->SetAdditionalCSS($css_path);
}
}
}
if (array_key_exists("CACHED_JS_PATH", $arEvent["FIELDS_FORMATTED"])) {
if (!is_array($arEvent["FIELDS_FORMATTED"]["CACHED_JS_PATH"]) && $arEvent["FIELDS_FORMATTED"]["CACHED_JS_PATH"] !== '') {
$GLOBALS['APPLICATION']->AddHeadScript($arEvent["FIELDS_FORMATTED"]["CACHED_JS_PATH"]);
} elseif (is_array($arEvent["FIELDS_FORMATTED"]["CACHED_JS_PATH"])) {
foreach ($arEvent["FIELDS_FORMATTED"]["CACHED_JS_PATH"] as $js_path) {
$GLOBALS['APPLICATION']->AddHeadScript($js_path);
}
}
}
} else {
if (is_object($cache)) {
$cache->StartDataCache($cache_time, $cache_id, $cache_path);
}
$arFilter = array("ID" => $logID);
$arListParams = array("CHECK_RIGHTS" => "N", "USE_FOLLOW" => "N", "USE_SUBSCRIBE" => "N");
$arSelect = array("ID", "TMP_ID", "ENTITY_TYPE", "ENTITY_ID", "USER_ID", "EVENT_ID", "LOG_DATE", "LOG_UPDATE", "TITLE_TEMPLATE", "TITLE", "MESSAGE", "TEXT_MESSAGE", "URL", "MODULE_ID", "CALLBACK_FUNC", "EXTERNAL_ID", "SITE_ID", "PARAMS", "COMMENTS_COUNT", "ENABLE_COMMENTS", "SOURCE_ID", "GROUP_NAME", "GROUP_OWNER_ID", "GROUP_INITIATE_PERMS", "GROUP_VISIBLE", "GROUP_OPENED", "GROUP_IMAGE_ID", "USER_NAME", "USER_LAST_NAME", "USER_SECOND_NAME", "USER_LOGIN", "USER_PERSONAL_PHOTO", "USER_PERSONAL_GENDER", "CREATED_BY_NAME", "CREATED_BY_LAST_NAME", "CREATED_BY_SECOND_NAME", "CREATED_BY_LOGIN", "CREATED_BY_PERSONAL_PHOTO", "CREATED_BY_PERSONAL_GENDER", "RATING_TYPE_ID", "RATING_ENTITY_ID", "SOURCE_TYPE");
$dbEvent = CSocNetLog::GetList(array(), $arFilter, false, false, $arSelect, $arListParams);
if ($arEvent = $dbEvent->GetNext()) {
if (defined("BX_COMP_MANAGED_CACHE")) {
$GLOBALS["CACHE_MANAGER"]->StartTagCache($cache_path);
$GLOBALS["CACHE_MANAGER"]->RegisterTag("USER_NAME_" . intval($arEvent["USER_ID"]));
$GLOBALS["CACHE_MANAGER"]->RegisterTag("SONET_LOG_" . intval($arEvent["ID"]));
if ($arEvent["ENTITY_TYPE"] == SONET_ENTITY_GROUP) {
$GLOBALS["CACHE_MANAGER"]->RegisterTag("sonet_group_" . $arEvent["ENTITY_ID"]);
}
}
$arEvent["EVENT_ID_FULLSET"] = CSocNetLogTools::FindFullSetEventIDByEventID($arEvent["EVENT_ID"]);
if ($arEvent["ENTITY_TYPE"] == SONET_ENTITY_GROUP) {
static $arSiteWorkgroupsPage;
if (!$arSiteWorkgroupsPage && (IsModuleInstalled("extranet") || is_set($arEvent["URL"]) && strpos($arEvent["URL"], "#GROUPS_PATH#") !== false)) {
$rsSite = CSite::GetList($by = "sort", $order = "desc", array("ACTIVE" => "Y"));
while ($arSite = $rsSite->Fetch()) {
$arSiteWorkgroupsPage[$arSite["ID"]] = COption::GetOptionString("socialnetwork", "workgroups_page", $arSite["DIR"] . "workgroups/", $arSite["ID"]);
}
}
if (is_set($arEvent["URL"]) && isset($arSiteWorkgroupsPage[SITE_ID])) {
$arEvent["URL"] = str_replace("#GROUPS_PATH#", $arSiteWorkgroupsPage[SITE_ID], $arEvent["URL"]);
}
}
$arEventTmp = CSocNetLogTools::FindLogEventByID($arEvent["EVENT_ID"]);
if ($arEventTmp && isset($arEventTmp["CLASS_FORMAT"]) && isset($arEventTmp["METHOD_FORMAT"])) {
$arEvent["UF"] = $GLOBALS["USER_FIELD_MANAGER"]->GetUserFields("SONET_LOG", $arEvent["ID"], LANGUAGE_ID);
$arEvent["FIELDS_FORMATTED"] = call_user_func(array($arEventTmp["CLASS_FORMAT"], $arEventTmp["METHOD_FORMAT"]), $arEvent, $arParams);
if (is_array($arEvent["FIELDS_FORMATTED"])) {
if (isset($arEvent["FIELDS_FORMATTED"]["EVENT_FORMATTED"]) && is_array($arEvent["FIELDS_FORMATTED"]["EVENT_FORMATTED"]) && isset($arEvent["FIELDS_FORMATTED"]["EVENT_FORMATTED"]["MESSAGE"])) {
if (in_array($arEvent["EVENT_ID"], array('calendar'))) {
$arEvent["FIELDS_FORMATTED"]["EVENT_FORMATTED"]["MESSAGE"] = htmlspecialcharsback($arEvent["FIELDS_FORMATTED"]["EVENT_FORMATTED"]["MESSAGE"]);
} else {
$arEvent["FIELDS_FORMATTED"]["EVENT_FORMATTED"]["MESSAGE"] = CSocNetTextParser::closetags(htmlspecialcharsback($arEvent["FIELDS_FORMATTED"]["EVENT_FORMATTED"]["MESSAGE"]));
}
}
if (isset($arEvent["FIELDS_FORMATTED"]["EVENT_FORMATTED"]) && is_array($arEvent["FIELDS_FORMATTED"]["EVENT_FORMATTED"])) {
$arFields2Cache = array("URL", "STYLE", "DESTINATION", "DESTINATION_MORE", "TITLE_24", "TITLE_24_2", "TITLE_24_2_STYLE", "IS_IMPORTANT", "MESSAGE", "FOOTER_MESSAGE", "MESSAGE_TITLE_24", "DATETIME_FORMATTED", "LOG_DATE_FORMAT", "MENU", "COMMENT_URL");
foreach ($arEvent["FIELDS_FORMATTED"]["EVENT_FORMATTED"] as $field => $value) {
//.........这里部分代码省略.........
示例4:
if ($gadget["OO_ONLY"] == true && !$USER->CanDoOperation('view_other_settings')) {
continue;
}
if ($arParams["MODE"] != "AI" && $gadget["AI_ONLY"] == true) {
continue;
}
if ($arParams["MODE"] == "SU" && $gadget["SU_ONLY"] != true && $gadget["SU"] != true) {
continue;
}
if ($arParams["MODE"] == "SG" && $gadget["SG_ONLY"] != true && $gadget["SG"] != true) {
continue;
}
if ($arParams["MODE"] == "AI" && $gadget["AI_ONLY"] != true && $gadget["AI"] != true) {
continue;
}
if ($gadget["EXTRANET_ONLY"] == true && (!CModule::IncludeModule('extranet') || !CExtranet::IsExtranetSite())) {
continue;
}
if ($gadget["SEARCH_ONLY"] == true && !IsModuleInstalled("search")) {
continue;
}
if ($gadget["FORUM_ONLY"] == true && !IsModuleInstalled("forum")) {
continue;
}
if ($gadget["BLOG_ONLY"] == true && !IsModuleInstalled("blog")) {
continue;
}
if ($gadget["PHOTOGALLERY_ONLY"] == true && !IsModuleInstalled("photogallery")) {
continue;
}
if ($gadget["WEBDAV_ONLY"] == true && !IsModuleInstalled("webdav")) {
示例5: AddToTimeStamp
$stmp = AddToTimeStamp($arrAdd, time() + CTimeZone::GetOffset());
$arFilter[">=LOG_DATE"] = ConvertTimeStamp($stmp, "FULL");
}
if (strlen($arParams["EVENT_ID"]) > 0) {
$arFilter["EVENT_ID"] = $arParams["EVENT_ID"];
if ($arFilter["EVENT_ID"] == "blog") {
$arFilter["EVENT_ID"] = array("blog", "blog_post", "blog_comment", "blog_post_micro");
}
}
if (StrLen($_REQUEST["flt_event_id"]) > 0 && $_REQUEST["flt_event_id"] != "all") {
$arFilter["EVENT_ID"] = $_REQUEST["flt_event_id"];
if ($arFilter["EVENT_ID"] == "blog") {
$arFilter["EVENT_ID"] = array("blog", "blog_post", "blog_comment", "blog_post_micro");
}
}
if (CModule::IncludeModule('extranet') && CExtranet::IsExtranetSite()) {
$arFilter["SITE_ID"] = SITE_ID;
} else {
$arFilter["SITE_ID"] = array(SITE_ID, false);
}
$cnt = 0;
$dbEvents = CSocNetLog::GetList(array("LOG_DATE" => "DESC"), $arFilter, false, false, array("MIN_ID_JOIN" => true));
while ($arEvents = $dbEvents->GetNext()) {
if (intval($arParams["LOG_CNT"]) > 0 && $cnt >= $arParams["LOG_CNT"]) {
break;
}
if ($arResult["Events"] == false) {
$arResult["Events"] = array();
}
if ($arEvents["ENTITY_TYPE"] == SONET_ENTITY_GROUP) {
$arCurrentUserPerms = CSocNetUserToGroup::InitUserPerms($GLOBALS["USER"]->GetID(), array("ID" => $arEvents["ENTITY_ID"], "OWNER_ID" => $arEvents["GROUP_OWNER_ID"], "INITIATE_PERMS" => $arEvents["GROUP_INITIATE_PERMS"], "VISIBLE" => $arEvents["GROUP_VISIBLE"], "OPENED" => $arEvents["GROUP_OPENED"]), $bCurrentUserIsAdmin);
示例6: GetMessageJS
?>
",
"MPL_RECORD_TEMPLATE" : '<?php
echo CUtil::JSEscape($template);
?>
',
"JERROR_NO_MESSAGE" : '<?php
echo GetMessageJS("JERROR_NO_MESSAGE");
?>
',
"BLOG_C_HIDE" : '<?php
echo GetMessageJS("BLOG_C_HIDE");
?>
',
"MPL_IS_EXTRANET_SITE": '<?php
echo CModule::IncludeModule("extranet") && CExtranet::IsExtranetSite() ? 'Y' : 'N';
?>
',
JQOUTE_AUTHOR_WRITES : '<?php
echo GetMessageJS("JQOUTE_AUTHOR_WRITES");
?>
',
FC_ERROR : '<?php
echo GetMessageJS("B_B_PC_COM_ERROR");
?>
',
MPL_SAFE_EDIT : '<?php
echo GetMessageJS('MPL_SAFE_EDIT');
?>
'
<?
示例7: array
$arPost = $obCache->GetVars();
} else {
$obCache->StartDataCache();
$dbPost = CBlogPost::GetList(array(), array("ID" => $arParams["ID"]), false, false, array("ID", "BLOG_ID", "PUBLISH_STATUS", "TITLE", "AUTHOR_ID", "ENABLE_COMMENTS", "NUM_COMMENTS", "VIEWS", "CODE", "MICRO", "DETAIL_TEXT", "DATE_PUBLISH", "CATEGORY_ID", "HAS_SOCNET_ALL", "HAS_TAGS", "HAS_IMAGES", "HAS_PROPS", "HAS_COMMENT_IMAGES"));
$arPost = $dbPost->Fetch();
$obCache->EndDataCache($arPost);
}
if (!empty($arPost) && ($arPost["PUBLISH_STATUS"] != BLOG_PUBLISH_STATUS_PUBLISH && !in_array($arParams["TYPE"], array("DRAFT", "MODERATION")))) {
unset($arPost);
}
$a = new CAccess();
$a->UpdateCodes();
if (!empty($arBlog) && $arBlog["ACTIVE"] == "Y" || $arResult["bFromList"]) {
if (!empty($arPost)) {
if (($arParams["GET_FOLLOW"] == "Y" && (!array_key_exists("FOLLOW", $arParams) || strlen($arParams["FOLLOW"]) <= 0) || intval($arParams["LOG_ID"]) <= 0) && CModule::IncludeModule("socialnetwork")) {
$rsLogSrc = CSocNetLog::GetList(array(), array("EVENT_ID" => array("blog_post", "blog_post_micro", "blog_post_important"), "SOURCE_ID" => $arParams["ID"], "SITE_ID" => CModule::IncludeModule('extranet') && CExtranet::IsExtranetSite() ? SITE_ID : array(SITE_ID, false)), false, false, $arParams["GET_FOLLOW"] == "Y" ? array("ID", "FOLLOW", "FAVORITES_USER_ID") : array("ID", "FAVORITES_USER_ID"), $arParams["GET_FOLLOW"] == "Y" ? array("USE_FOLLOW" => "Y") : array());
if ($arLogSrc = $rsLogSrc->Fetch()) {
$arParams["LOG_ID"] = $arLogSrc["ID"];
$arParams["FAVORITES_USER_ID"] = $arLogSrc["FAVORITES_USER_ID"];
if ($arParams["GET_FOLLOW"] == "Y") {
$arParams["FOLLOW"] = $arLogSrc["FOLLOW"];
}
} elseif (!$arResult["bFromList"]) {
$bNoLogEntry = true;
}
}
if (!$arResult["bFromList"]) {
CBlogPost::CounterInc($arPost["ID"]);
}
$arPost = CBlogTools::htmlspecialcharsExArray($arPost);
if ($arPost["AUTHOR_ID"] == $user_id) {
示例8: InitUserPerms
function InitUserPerms($userID, $arGroup, $bCurrentUserIsAdmin)
{
global $arSocNetAllowedInitiatePerms;
global $arSocNetAllowedSpamPerms;
$arReturn = array();
$userID = IntVal($userID);
$groupID = IntVal($arGroup["ID"]);
$groupOwnerID = IntVal($arGroup["OWNER_ID"]);
$groupInitiatePerms = Trim($arGroup["INITIATE_PERMS"]);
$groupVisible = Trim($arGroup["VISIBLE"]);
$groupOpened = Trim($arGroup["OPENED"]);
$groupSpamPerms = Trim($arGroup["SPAM_PERMS"]);
if ($groupID <= 0 || $groupOwnerID <= 0 || !in_array($groupInitiatePerms, $arSocNetAllowedInitiatePerms)) {
return false;
}
$arReturn["Operations"] = array();
if (!in_array($groupSpamPerms, $arSocNetAllowedSpamPerms)) {
$groupSpamPerms = "K";
}
// UserRole - User role in group. False if user is not group member.
// UserIsMember - True in user is group member.
// UserIsOwner - True if user is group owner.
// UserCanInitiate - True if user can invite friends to group.
// UserCanViewGroup - True if user can view group.
// UserCanAutoJoinGroup - True if user can join group automatically.
// UserCanModifyGroup - True if user can modify group.
// UserCanModerateGroup - True if user can moderate group.
if ($userID <= 0) {
$arReturn["UserRole"] = false;
$arReturn["UserIsMember"] = false;
$arReturn["UserIsOwner"] = false;
$arReturn["UserCanInitiate"] = false;
$arReturn["UserCanViewGroup"] = $groupVisible == "Y";
$arReturn["UserCanAutoJoinGroup"] = false;
$arReturn["UserCanModifyGroup"] = false;
$arReturn["UserCanModerateGroup"] = false;
$arReturn["UserCanSpamGroup"] = false;
$arReturn["InitiatedByType"] = false;
$arReturn["Operations"]["viewsystemevents"] = false;
} else {
$arReturn["UserRole"] = CSocNetUserToGroup::GetUserRole($userID, $groupID);
$arReturn["UserIsMember"] = $arReturn["UserRole"] && in_array($arReturn["UserRole"], array(SONET_ROLES_OWNER, SONET_ROLES_MODERATOR, SONET_ROLES_USER));
$arReturn["InitiatedByType"] = false;
if ($arReturn["UserRole"] == SONET_ROLES_REQUEST) {
$dbRelation = CSocNetUserToGroup::GetList(array(), array("USER_ID" => $userID, "GROUP_ID" => $groupID), false, false, array("INITIATED_BY_TYPE"));
if ($arRelation = $dbRelation->Fetch()) {
$arReturn["InitiatedByType"] = $arRelation["INITIATED_BY_TYPE"];
}
}
$arReturn["UserIsOwner"] = $userID == $groupOwnerID;
if ($bCurrentUserIsAdmin) {
$arReturn["UserCanInitiate"] = true;
$arReturn["UserCanViewGroup"] = true;
$arReturn["UserCanAutoJoinGroup"] = true;
$arReturn["UserCanModifyGroup"] = true;
$arReturn["UserCanModerateGroup"] = true;
$arReturn["UserCanSpamGroup"] = true;
$arReturn["Operations"]["viewsystemevents"] = true;
} else {
if ($arReturn["UserIsMember"]) {
$arReturn["UserCanInitiate"] = $groupInitiatePerms == SONET_ROLES_OWNER && $arReturn["UserIsOwner"] || $groupInitiatePerms == SONET_ROLES_MODERATOR && in_array($arReturn["UserRole"], array(SONET_ROLES_OWNER, SONET_ROLES_MODERATOR)) || $groupInitiatePerms == SONET_ROLES_USER && $arReturn["UserIsMember"];
$arReturn["UserCanViewGroup"] = true;
$arReturn["UserCanAutoJoinGroup"] = false;
$arReturn["UserCanModifyGroup"] = $arReturn["UserIsOwner"];
$arReturn["UserCanModerateGroup"] = in_array($arReturn["UserRole"], array(SONET_ROLES_OWNER, SONET_ROLES_MODERATOR));
$arReturn["UserCanSpamGroup"] = $groupSpamPerms == SONET_ROLES_OWNER && $arReturn["UserIsOwner"] || $groupSpamPerms == SONET_ROLES_MODERATOR && in_array($arReturn["UserRole"], array(SONET_ROLES_OWNER, SONET_ROLES_MODERATOR)) || $groupSpamPerms == SONET_ROLES_USER && $arReturn["UserIsMember"] || $groupSpamPerms == SONET_ROLES_ALL;
$arReturn["Operations"]["viewsystemevents"] = true;
} else {
$arReturn["UserCanInitiate"] = false;
$arReturn["UserCanViewGroup"] = $groupVisible == "Y";
$arReturn["UserCanAutoJoinGroup"] = $arReturn["UserCanViewGroup"] && $groupOpened == "Y";
$arReturn["UserCanModifyGroup"] = false;
$arReturn["UserCanModerateGroup"] = false;
$arReturn["UserCanSpamGroup"] = $groupSpamPerms == SONET_ROLES_ALL;
$arReturn["Operations"]["viewsystemevents"] = false;
}
}
}
if (CModule::IncludeModule('extranet') && CExtranet::IsExtranetSite()) {
$arReturn["UserCanSpamGroup"] = true;
}
if (!CBXFeatures::IsFeatureEnabled("WebMessenger")) {
$arReturn["UserCanSpamGroup"] = false;
}
return $arReturn;
}
示例9: bitrix_sessid_post
?>
<br />
<input type="hidden" name="max_count" value="<?php
echo $ind;
?>
">
<?php
echo bitrix_sessid_post();
if ($arResult["CurrentUserPerms"]["UserCanModifyGroup"]) {
?>
<input type="submit" name="save" value="<?php
echo GetMessage("SONET_C25_T_SAVE");
?>
"><?php
?>
<input type="submit" name="exclude" value="<?php
echo GetMessage("SONET_C25_T_EXCLUDE");
?>
"><?php
}
if ($arParams["GROUP_USE_BAN"] != "N" && (!CModule::IncludeModule('extranet') || !CExtranet::IsExtranetSite())) {
?>
<input type="submit" name="ban" value="<?php
echo GetMessage("SONET_C25_T_BAN");
?>
"><?php
}
?>
</form><?php
}
}
示例10: GetMessage
$arParams["SEARCH_TAGS_COLOR_NEW"] = "3E74E6";
}
if (strlen(trim($arParams["SEARCH_TAGS_COLOR_OLD"])) <= 0) {
$arParams["SEARCH_TAGS_COLOR_OLD"] = "C0C0C0";
}
if (IsModuleInstalled("intranet")) {
$arParams['CAN_OWNER_EDIT_DESKTOP'] = $arParams['CAN_OWNER_EDIT_DESKTOP'] != "Y" ? "N" : "Y";
} else {
$arParams['CAN_OWNER_EDIT_DESKTOP'] = $arParams['CAN_OWNER_EDIT_DESKTOP'] != "N" ? "Y" : "N";
}
$arParams["GROUP_USE_BAN"] = $arParams["GROUP_USE_BAN"] != "N" ? "Y" : "N";
$arGroup = CSocNetGroup::GetByID($arParams["GROUP_ID"]);
if (!$arGroup || !is_array($arGroup) || $arGroup["ACTIVE"] != "Y") {
$arResult["FatalError"] = GetMessage("SONET_P_USER_NO_GROUP");
} else {
$arResult["bExtranet"] = CModule::IncludeModule("extranet") && CExtranet::IsExtranetSite();
$arGroupSites = array();
$rsGroupSite = CSocNetGroup::GetSite($arGroup["ID"]);
while ($arGroupSite = $rsGroupSite->Fetch()) {
$arGroupSites[] = $arGroupSite["LID"];
}
if (!in_array(SITE_ID, $arGroupSites)) {
$arResult["FatalError"] = GetMessage("SONET_P_USER_NO_GROUP");
} else {
$arResult["Subjects"] = array();
$dbSubjects = CSocNetGroupSubject::GetList(array("SORT" => "ASC", "NAME" => "ASC"), array("SITE_ID" => SITE_ID), false, false, array("ID", "NAME"));
while ($arSubject = $dbSubjects->GetNext()) {
$arResult["Subjects"][$arSubject["ID"]] = $arSubject["NAME"];
}
if (CModule::IncludeModule("extranet")) {
$arExtranetUserID = array();
示例11: GetMessage
?>
</a></li><?php
if ($GLOBALS["USER"]->IsAuthorized()) {
if ($arGadgetParams["CAN_INITIATE"] && !$arGadgetParams["HIDE_ARCHIVE_LINKS"]) {
?>
<li class="bx-icon-invite"><a href="<?php
echo $arGadgetParams["URL_GROUP_REQUEST_SEARCH"];
?>
" onclick="if (BX.SGCP) { BX.SGCP.ShowForm('invite', '<?php
echo $popupName;
?>
', event); } else { return false;}"><?php
echo GetMessage("GD_SONET_GROUP_LINKS_ACT_REQU");
?>
</a></li><?php
if (!CModule::IncludeModule('extranet') || $arGadgetParams["OPENED"] != "Y" && !CExtranet::IsExtranetSite()) {
?>
<li class="bx-icon-requests"><a href="<?php
echo $arGadgetParams["URL_GROUP_REQUESTS"];
?>
"><?php
echo GetMessage("GD_SONET_GROUP_LINKS_ACT_VREQU");
?>
</a></li><?php
} else {
?>
<li class="bx-icon-requests"><a href="<?php
echo $arGadgetParams["URL_GROUP_REQUESTS"];
?>
"><?php
echo GetMessage("GD_SONET_GROUP_LINKS_ACT_VREQU_OUT");
示例12: GetMessage
?>
><?php
echo $value;
?>
</option><?php
}
?>
</select></div><?php
} else {
?>
<input type="hidden" value="<?php
echo $arResult["POST"]["INITIATE_PERMS"];
?>
" name="GROUP_INITIATE_PERMS"><?php
}
if ($arResult["POST"]["CLOSED"] != "Y" && (!CModule::IncludeModule('extranet') || !CExtranet::IsExtranetSite()) && !IsModuleInstalled("im")) {
?>
<div class="sonet-group-create-popup-form-add-title"><?php
echo GetMessage("SONET_GCE_T_SPAM_PERMS");
?>
</div>
<div class="sonet-group-create-popup-form-add-select"><select name="GROUP_SPAM_PERMS" class="sonet-group-create-popup-select-perms<?php
echo in_array("GROUP_SPAM_PERMS", $arResult["ErrorFields"]) ? " sonet-group-create-tabs-select-error" : "";
?>
">
<option value=""><?php
echo GetMessage("SONET_GCE_T_TO_SELECT");
?>
-</option><?php
foreach ($arResult["SpamPerms"] as $key => $value) {
?>
示例13: GetList
//.........这里部分代码省略.........
while ($ar = $dbUsersInGroup->GetNext(true, false)) {
if ($ar["USER_ID"] == $USER->GetID()) {
continue;
}
$arExtranetUsers[$ar["USER_ID"]] = $ar["USER_ID"];
if (isset($arUserInGroup["SG" . $ar["GROUP_ID"]])) {
$arUserInGroup["SG" . $ar["GROUP_ID"]]['users'][] = $ar["USER_ID"];
} else {
$arUserInGroup["SG" . $ar["GROUP_ID"]] = array('id' => "SG" . $ar["GROUP_ID"], 'users' => array($ar["USER_ID"]));
}
if (isset($arWoUserInGroup["extranet"])) {
$arWoUserInGroup["extranet"]['users'][] = $ar["USER_ID"];
} else {
$arWoUserInGroup["extranet"] = array('id' => "extranet", 'users' => array($ar["USER_ID"]));
}
}
if (isset($arWoUserInGroup['extranet']) && isset($arWoUserInGroup['extranet']['users'])) {
$arWoUserInGroup['extranet']['users'] = array_values(array_unique($arWoUserInGroup['extranet']['users']));
}
}
if (defined("BX_COMP_MANAGED_CACHE")) {
$CACHE_MANAGER->EndTagCache();
}
if ($obSGCache->StartDataCache()) {
$obSGCache->EndDataCache(array('USER_SG' => $arUserSG, 'EXTRANET_USERS' => $arExtranetUsers, 'USER_IN_GROUP' => $arUserInGroup, 'WO_USER_IN_GROUP' => $arWoUserInGroup));
}
}
unset($obSGCache);
if (is_array($arUserSG)) {
$arGroups = $arGroups + $arUserSG;
}
}
$bFriendEnable = false;
if ((!CModule::IncludeModule('extranet') || !CExtranet::IsExtranetSite()) && CModule::IncludeModule('socialnetwork') && CSocNetUser::IsFriendsAllowed()) {
$bFriendEnable = true;
$dbFriends = CSocNetUserRelations::GetList(array(), array("USER_ID" => $USER->GetID(), "RELATION" => SONET_RELATIONS_FRIEND), false, false, array("ID", "FIRST_USER_ID", "SECOND_USER_ID", "DATE_CREATE", "DATE_UPDATE", "INITIATED_BY"));
if ($dbFriends) {
while ($arFriends = $dbFriends->GetNext(true, false)) {
$friendId = $pref = IntVal($USER->GetID()) == $arFriends["FIRST_USER_ID"] ? $arFriends["SECOND_USER_ID"] : $arFriends["FIRST_USER_ID"];
$arFriendUsers[$friendId] = $friendId;
if (isset($arUserInGroup["friends"])) {
$arUserInGroup["friends"]['users'][] = $friendId;
} else {
$arUserInGroup["friends"] = array('id' => "friends", 'users' => array($friendId));
}
if (isset($arWoUserInGroup["all"])) {
$arWoUserInGroup["all"]['users'][] = $friendId;
} else {
$arWoUserInGroup["all"] = array('id' => "all", 'users' => array($friendId));
}
}
}
$arGroups['friends'] = array('id' => 'friends', 'status' => isset($arGroupStatus['friends']) && $arGroupStatus['friends'] == 'close' ? 'close' : 'open', 'name' => GetMessage('IM_CL_GROUP_FRIENDS'));
}
$arFilter = array('=ACTIVE' => 'Y', '=CONFIRM_CODE' => false);
if (CModule::IncludeModule('extranet')) {
if (!CExtranet::IsIntranetUser()) {
$arFilter['=ID'] = array_merge(array($USER->GetId()), $arExtranetUsers);
}
$arWoGroups['extranet'] = array('id' => 'extranet', 'status' => isset($arGroupStatus['extranet']) && $arGroupStatus['extranet'] == 'open' ? 'open' : 'close', 'name' => GetMessage('IM_CL_GROUP_EXTRANET'));
}
if ($bLoadUsers) {
if ($bFriendEnable) {
if (!$bIntranetEnable && !$bBusShowAll) {
$arFilter['=ID'][] = $USER->GetId();
if (!empty($arFriendUsers)) {
示例14: htmlspecialcharsbx
$arParams["PATH_TO_GROUP_CONTENT_SEARCH"] = htmlspecialcharsbx($APPLICATION->GetCurPage() . "?" . $arParams["PAGE_VAR"] . "=group_content_search&" . $arParams["GROUP_VAR"] . "=#group_id#");
}
$arParams["USE_MAIN_MENU"] = isset($arParams["USE_MAIN_MENU"]) ? $arParams["USE_MAIN_MENU"] : false;
if ($arParams["USE_MAIN_MENU"] == "Y" && !array_key_exists("MAIN_MENU_TYPE", $arParams)) {
$arParams["MAIN_MENU_TYPE"] = "left";
}
$arGroup = CSocNetGroup::GetByID($arParams["GROUP_ID"]);
if ($arGroup && is_array($arGroup) && $arGroup["ACTIVE"] == "Y") {
$arGroupSites = array();
$rsGroupSite = CSocNetGroup::GetSite($arGroup["ID"]);
while ($arGroupSite = $rsGroupSite->Fetch()) {
$arGroupSites[] = $arGroupSite["LID"];
}
if (in_array(SITE_ID, $arGroupSites)) {
$arResult["Group"] = $arGroup;
if (CModule::IncludeModule("extranet") && !CExtranet::IsExtranetSite() && in_array(CExtranet::GetExtranetSiteID(), $arGroupSites)) {
$arResult["Group"]["IS_EXTRANET"] = "Y";
}
if ($arResult["Group"]["CLOSED"] == "Y" && COption::GetOptionString("socialnetwork", "work_with_closed_groups", "N") != "Y") {
$arResult["HideArchiveLinks"] = true;
}
$arResult["CurrentUserPerms"] = CSocNetUserToGroup::InitUserPerms($GLOBALS["USER"]->GetID(), $arResult["Group"], CSocNetUser::IsCurrentUserModuleAdmin());
if ($arResult["CurrentUserPerms"] != false && $arResult["CurrentUserPerms"]["UserCanViewGroup"]) {
if (in_array($arResult["CurrentUserPerms"]["UserRole"], array(SONET_ROLES_OWNER, SONET_ROLES_MODERATOR, SONET_ROLES_USER))) {
$arResult["bSubscribed"] = CSocNetSubscription::IsUserSubscribed($GLOBALS["USER"]->GetID(), "SG" . $arParams["GROUP_ID"]);
} else {
$arResult["bSubscribed"] = false;
}
$arResult["Urls"]["Edit"] = CComponentEngine::MakePathFromTemplate($arParams["PATH_TO_GROUP_EDIT"], array("group_id" => $arResult["Group"]["ID"]));
$arResult["Urls"]["View"] = CComponentEngine::MakePathFromTemplate($arParams["PATH_TO_GROUP"], array("group_id" => $arResult["Group"]["ID"]));
$arResult["Urls"]["UserRequestGroup"] = CComponentEngine::MakePathFromTemplate($arParams["PATH_TO_USER_REQUEST_GROUP"], array("group_id" => $arResult["Group"]["ID"], "user_id" => $GLOBALS["USER"]->GetID()));
示例15: array
<?php
if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
die;
}
$arResult['USER_PROP'] = array();
$arRes = $GLOBALS["USER_FIELD_MANAGER"]->GetUserFields("USER", 0, LANGUAGE_ID);
if (!empty($arRes)) {
foreach ($arRes as $key => $val) {
$arResult['USER_PROP'][$val["FIELD_NAME"]] = strLen($val["EDIT_FORM_LABEL"]) > 0 ? $val["EDIT_FORM_LABEL"] : $val["FIELD_NAME"];
}
}
if (!CModule::IncludeModule('extranet') || !CExtranet::IsExtranetSite()) {
if ($arResult['bAdmin']) {
global $INTRANET_TOOLBAR;
__IncludeLang(dirname(__FILE__) . '/lang/' . LANGUAGE_ID . '/' . basename(__FILE__));
$current_dep = intval($_REQUEST['structure_UF_DEPARTMENT']) > 0 ? '&def_UF_DEPARTMENT=' . intval($_REQUEST['structure_UF_DEPARTMENT']) : '';
$INTRANET_TOOLBAR->AddButton(array('ONCLICK' => $APPLICATION->GetPopupLink(array('URL' => "/bitrix/admin/user_edit.php?lang=" . LANGUAGE_ID . "&bxpublic=Y&from_module=main" . $current_dep, 'PARAMS' => array('height' => 500, 'width' => 900, 'resize' => false))), "TEXT" => GetMessage('INTR_ABSC_TPL_ADD_ENTRY'), "ICON" => 'add', "SORT" => 1000));
if ($USER->CanDoOperation('edit_all_users')) {
$INTRANET_TOOLBAR->AddButton(array('HREF' => "/bitrix/admin/user_import.php?lang=" . LANGUAGE_ID, "TEXT" => GetMessage('INTR_ABSC_TPL_IMPORT'), 'ICON' => 'import-users', "SORT" => 1100));
}
$INTRANET_TOOLBAR->AddButton(array('HREF' => "/bitrix/admin/user_admin.php?lang=" . LANGUAGE_ID, "TEXT" => GetMessage('INTR_ABSC_TPL_EDIT_ENTRIES'), 'ICON' => 'settings', "SORT" => 1100));
}
}