Beispiel #1
0
<?php

if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
    die;
}
if (!CModule::IncludeModule("socialnetwork")) {
    return false;
}
$arRes = $GLOBALS["USER_FIELD_MANAGER"]->GetUserFields("USER");
$userProp = array();
if (!empty($arRes)) {
    foreach ($arRes as $key => $val) {
        $userProp[$val["FIELD_NAME"]] = strLen($val["EDIT_FORM_LABEL"]) > 0 ? $val["EDIT_FORM_LABEL"] : $val["FIELD_NAME"];
    }
}
$userProp1 = CSocNetUser::GetFields();
unset($userProp1["PASSWORD"]);
$arComponentParameters = array("GROUPS" => array("VARIABLE_ALIASES" => array("NAME" => GetMessage("SONET_VARIABLE_ALIASES"))), "PARAMETERS" => array("SET_NAV_CHAIN" => array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("SONET_SET_NAVCHAIN"), "TYPE" => "CHECKBOX", "DEFAULT" => "Y"), "PAGE_VAR" => array("NAME" => GetMessage("SONET_PAGE_VAR"), "TYPE" => "STRING", "MULTIPLE" => "N", "DEFAULT" => "", "COLS" => 25, "PARENT" => "VARIABLE_ALIASES"), "USER_VAR" => array("NAME" => GetMessage("SONET_USER_VAR"), "TYPE" => "STRING", "MULTIPLE" => "N", "DEFAULT" => "", "COLS" => 25, "PARENT" => "VARIABLE_ALIASES"), "PATH_TO_USER" => array("NAME" => GetMessage("SONET_PATH_TO_USER"), "TYPE" => "STRING", "MULTIPLE" => "N", "DEFAULT" => "", "COLS" => 25, "PARENT" => "URL_TEMPLATES"), "PATH_TO_SEARCH" => array("NAME" => GetMessage("SONET_PATH_TO_SEARCH"), "TYPE" => "STRING", "MULTIPLE" => "N", "DEFAULT" => "", "COLS" => 25, "PARENT" => "URL_TEMPLATES"), "PATH_TO_SEARCH_INNER" => array("NAME" => GetMessage("SONET_PATH_TO_SEARCH_INNER"), "TYPE" => "STRING", "MULTIPLE" => "N", "DEFAULT" => "", "COLS" => 25, "PARENT" => "URL_TEMPLATES"), "PATH_TO_USER_FRIENDS_ADD" => array("NAME" => GetMessage("SONET_PATH_TO_USER_FRIENDS_ADD"), "TYPE" => "STRING", "MULTIPLE" => "N", "DEFAULT" => "", "COLS" => 25, "PARENT" => "URL_TEMPLATES"), "PATH_TO_MESSAGE_FORM" => array("NAME" => GetMessage("SONET_PATH_TO_MESSAGE_FORM"), "TYPE" => "STRING", "MULTIPLE" => "N", "DEFAULT" => "", "COLS" => 25, "PARENT" => "URL_TEMPLATES"), "PATH_TO_MESSAGES_CHAT" => array("NAME" => GetMessage("SONET_PATH_TO_MESSAGES_CHAT"), "TYPE" => "STRING", "MULTIPLE" => "N", "DEFAULT" => "", "COLS" => 25, "PARENT" => "URL_TEMPLATES"), "ITEMS_COUNT" => array("NAME" => GetMessage("SONET_ITEMS_COUNT"), "TYPE" => "STRING", "MULTIPLE" => "N", "DEFAULT" => "", "COLS" => 25, "PARENT" => "VISUAL"), "DATE_TIME_FORMAT" => CComponentUtil::GetDateTimeFormatField(GetMessage("SONET_DATE_TIME_FORMAT"), "VISUAL"), "SET_TITLE" => array(), "SHOW_USERS_WITHOUT_FILTER_SET" => array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("SONET_SHOW_USERS_WITHOUT_FILTER_SET"), "TYPE" => "CHECKBOX", "DEFAULT" => "N"), "USER_FIELDS_SEARCH_SIMPLE" => array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("SONET_USER_FIELDS_SIMPLE"), "TYPE" => "LIST", "VALUES" => $userProp1, "MULTIPLE" => "Y", "DEFAULT" => array()), "USER_PROPERTIES_SEARCH_SIMPLE" => array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("SONET_USER_PROPERTY_SIMPLE"), "TYPE" => "LIST", "VALUES" => $userProp, "MULTIPLE" => "Y", "DEFAULT" => array()), "USER_FIELDS_SEARCH_ADV" => array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("SONET_USER_FIELDS_ADV"), "TYPE" => "LIST", "VALUES" => $userProp1, "MULTIPLE" => "Y", "DEFAULT" => array()), "USER_PROPERTIES_SEARCH_ADV" => array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("SONET_USER_PROPERTY_ADV"), "TYPE" => "LIST", "VALUES" => $userProp, "MULTIPLE" => "Y", "DEFAULT" => array()), "USER_FIELDS_LIST" => array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("SONET_USER_FIELDS_LIST"), "TYPE" => "LIST", "VALUES" => $userProp1, "MULTIPLE" => "Y", "DEFAULT" => array()), "USER_PROPERTIES_LIST" => array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("SONET_USER_PROPERTY_LIST"), "TYPE" => "LIST", "VALUES" => $userProp, "MULTIPLE" => "Y", "DEFAULT" => array()), "USER_FIELDS_SEARCHABLE" => array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("SONET_SONET_USER_FIELDS_SEARCHABLE"), "TYPE" => "LIST", "VALUES" => $userProp1, "MULTIPLE" => "Y", "DEFAULT" => array("NAME", "SECOND_NAME", "LAST_NAME", "LOGIN", "PERSONAL_BIRTHDAY", "PERSONAL_PROFESSION", "PERSONAL_GENDER", "PERSONAL_COUNTRY", "PERSONAL_STATE", "PERSONAL_CITY", "PERSONAL_ZIP", "PERSONAL_STREET", "PERSONAL_MAILBOX", "WORK_COMPANY", "WORK_DEPARTMENT", "WORK_POSITION", "WORK_COUNTRY", "WORK_STATE", "WORK_CITY", "WORK_ZIP", "WORK_STREET", "WORK_MAILBOX")), "USER_PROPERTY_SEARCHABLE" => array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("SONET_SONET_USER_PROPERTY_SEARCHABLE"), "TYPE" => "LIST", "VALUES" => $userProp, "MULTIPLE" => "Y", "DEFAULT" => array()), 'SHOW_YEAR' => array('TYPE' => 'LIST', 'MULTIPLE' => 'N', 'DEFAULT' => 'Y', 'VALUES' => array('Y' => GetMessage('INTR_ISBN_PARAM_SHOW_YEAR_VALUE_Y'), 'M' => GetMessage('INTR_ISBN_PARAM_SHOW_YEAR_VALUE_M'), 'N' => GetMessage('INTR_ISBN_PARAM_SHOW_YEAR_VALUE_N')), 'NAME' => GetMessage('INTR_ISBN_PARAM_SHOW_YEAR'), "PARENT" => "ADDITIONAL_SETTINGS"), "CACHE_TIME" => array('DEFAULT' => 3600), "NAME_TEMPLATE" => array("TYPE" => "LIST", "NAME" => GetMessage("SONET_NAME_TEMPLATE"), "VALUES" => CComponentUtil::GetDefaultNameTemplates(), "MULTIPLE" => "N", "ADDITIONAL_VALUES" => "Y", "DEFAULT" => "", "PARENT" => "VISUAL")));
$arComponentParameters["PARAMETERS"]["ALLOW_RATING_SORT"] = array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("SONET_ALLOW_RATING_SORT"), "TYPE" => "CHECKBOX", "DEFAULT" => "N", "REFRESH" => "Y");
$arComponentParameters["PARAMETERS"]["SHOW_RATING"] = array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("SHOW_RATING"), "TYPE" => "LIST", "VALUES" => array("" => GetMessage("SHOW_RATING_CONFIG"), "Y" => GetMessage("MAIN_YES"), "N" => GetMessage("MAIN_NO")), "MULTIPLE" => "N", "DEFAULT" => "");
if ($arCurrentValues["SHOW_RATING"] != "N" || $arCurrentValues["ALLOW_RATING_SORT"] == "Y") {
    $arRatingsList = array();
    $db_res = CRatings::GetList($aSort = array("ID" => "ASC"), array("ACTIVE" => "Y", "ENTITY_ID" => "USER"));
    while ($res = $db_res->Fetch()) {
        $arRatingsList[$res["ID"]] = "[ " . $res["ID"] . " ] " . $res["NAME"];
    }
    $arComponentParameters["PARAMETERS"]["RATING_ID"] = array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("SONET_RATING_ID"), "TYPE" => "LIST", "VALUES" => $arRatingsList, "DEFAULT" => "", "REFRESH" => "Y");
    $arComponentParameters["PARAMETERS"]["RATING_TYPE"] = array("NAME" => GetMessage("RATING_TYPE"), "TYPE" => "LIST", "VALUES" => array("" => GetMessage("RATING_TYPE_CONFIG"), "like" => GetMessage("RATING_TYPE_LIKE_TEXT"), "like_graphic" => GetMessage("RATING_TYPE_LIKE_GRAPHIC"), "standart_text" => GetMessage("RATING_TYPE_STANDART_TEXT"), "standart" => GetMessage("RATING_TYPE_STANDART_GRAPHIC")), "MULTIPLE" => "N", "DEFAULT" => "", "PARENT" => "ADDITIONAL_SETTINGS");
}
Beispiel #2
0
 public static function GetFieldsMap($bAdditional = false)
 {
     $arUserFields = CSocNetUser::GetFields($bAdditional);
     return array_keys($arUserFields);
 }
Beispiel #3
0
    $dbSiteTemplate = CSite::GetTemplateList($tmp_site_id);
    while ($arSiteTemplate = $dbSiteTemplate->Fetch()) {
        if (empty($arSiteTemplate["CONDITION"])) {
            $site_template = $arSiteTemplate["TEMPLATE"];
            break;
        }
    }
}
$arRes = $GLOBALS["USER_FIELD_MANAGER"]->GetUserFields("USER", 0, LANGUAGE_ID);
$userProp = array();
if (!empty($arRes)) {
    foreach ($arRes as $key => $val) {
        $userProp[$val["FIELD_NAME"]] = strLen($val["EDIT_FORM_LABEL"]) > 0 ? $val["EDIT_FORM_LABEL"] : $val["FIELD_NAME"];
    }
}
$userPropEdit = $userProp1 = CSocNetUser::GetFields(true);
unset($userProp1["PASSWORD"]);
$arComponentParameters = array("PARAMETERS" => array("VARIABLE_ALIASES" => array("user_id" => array("NAME" => GetMessage("SONET_USER_VAR"), "DEFAULT" => "user_id"), "page" => array("NAME" => GetMessage("SONET_PAGE_VAR"), "DEFAULT" => "page"), "group_id" => array("NAME" => GetMessage("SONET_GROUP_VAR"), "DEFAULT" => "group_id"), "message_id" => array("NAME" => GetMessage("SONET_MESSAGE_VAR"), "DEFAULT" => "message_id"), "task_id" => array("NAME" => GetMessage("SONET_TASK_VAR"), "DEFAULT" => "task_id")), "SEF_MODE" => array("index" => array("NAME" => GetMessage("SONET_SEF_PATH_INDEX"), "DEFAULT" => "index.php", "VARIABLES" => array()), "user_reindex" => array("NAME" => GetMessage("SONET_SEF_PATH_REINDEX"), "DEFAULT" => "user_reindex.php", "VARIABLES" => array()), "user_content_search" => array("NAME" => GetMessage("SONET_SEF_USER_CONTENT_SEARCH"), "DEFAULT" => "user/#user_id#/search/", "VARIABLES" => array()), "user" => array("NAME" => GetMessage("SONET_SEF_PATH_USER"), "DEFAULT" => "user/#user_id#/", "VARIABLES" => array("user_id")), "user_friends" => array("NAME" => GetMessage("SONET_SEF_PATH_USER_FRIENDS"), "DEFAULT" => "user/#user_id#/friends/", "VARIABLES" => array("user_id")), "user_friends_add" => array("NAME" => GetMessage("SONET_SEF_PATH_USER_FRIENDS_ADD"), "DEFAULT" => "user/#user_id#/friends/add/", "VARIABLES" => array("user_id")), "user_friends_delete" => array("NAME" => GetMessage("SONET_SEF_PATH_USER_FRIENDS_DELETE"), "DEFAULT" => "user/#user_id#/friends/delete/", "VARIABLES" => array("user_id")), "user_groups" => array("NAME" => GetMessage("SONET_SEF_PATH_USER_GROUPS"), "DEFAULT" => "user/#user_id#/groups/", "VARIABLES" => array("user_id")), "user_groups_add" => array("NAME" => GetMessage("SONET_SEF_PATH_USER_GROUPS_ADD"), "DEFAULT" => "user/#user_id#/groups/add/", "VARIABLES" => array("user_id")), "group_create" => array("NAME" => GetMessage("SONET_SEF_PATH_GROUP_CREATE"), "DEFAULT" => "user/#user_id#/groups/create/", "VARIABLES" => array("user_id")), "user_profile_edit" => array("NAME" => GetMessage("SONET_SEF_PATH_USER_PROFILE_EDIT"), "DEFAULT" => "user/#user_id#/edit/", "VARIABLES" => array("user_id")), "user_settings_edit" => array("NAME" => GetMessage("SONET_SEF_PATH_USER_SETTINGS_EDIT"), "DEFAULT" => "user/#user_id#/settings/", "VARIABLES" => array("user_id")), "user_features" => array("NAME" => GetMessage("SONET_SEF_USER_FEATURES"), "DEFAULT" => "user/#user_id#/features/", "VARIABLES" => array("user_id")), "group_request_group_search" => array("NAME" => GetMessage("SONET_GROUP_REQUEST_GROUP_SEARCH"), "DEFAULT" => "group/#user_id#/group_search/", "VARIABLES" => array("user_id")), "group_request_user" => array("NAME" => GetMessage("SONET_GROUP_REQUEST_USER"), "DEFAULT" => "group/#group_id#/user/#user_id#/request/", "VARIABLES" => array("user_id", "group_id")), "search" => array("NAME" => GetMessage("SONET_SEF_PATH_SEARCH"), "DEFAULT" => "search.php", "VARIABLES" => array()), "mail" => array("NAME" => GetMessage("SONET_SEF_PATH_MAIL"), "DEFAULT" => "mail/", "VARIABLES" => array()), "message_form" => array("NAME" => GetMessage("SONET_SEF_PATH_MESSAGE_FORM"), "DEFAULT" => "messages/form/#user_id#/", "VARIABLES" => array("user_id")), "message_form_mess" => array("NAME" => GetMessage("SONET_SEF_PATH_MESSAGE_FORM_MESS"), "DEFAULT" => "messages/chat/#user_id#/#message_id#/", "VARIABLES" => array("user_id", "message_id")), "user_ban" => array("NAME" => GetMessage("SONET_SEF_PATH_USER_BAN"), "DEFAULT" => "messages/ban/", "VARIABLES" => array()), "messages_chat" => array("NAME" => GetMessage("SONET_MESSAGES_CHAT"), "DEFAULT" => "messages/chat/#user_id#/", "VARIABLES" => array("user_id")), "messages_input" => array("NAME" => GetMessage("SONET_MESSAGES_INPUT"), "DEFAULT" => "messages/input/", "VARIABLES" => array()), "messages_input_user" => array("NAME" => GetMessage("SONET_MESSAGES_INPUT_USER"), "DEFAULT" => "messages/input/#user_id#/", "VARIABLES" => array("user_id")), "messages_output" => array("NAME" => GetMessage("SONET_MESSAGES_OUTPUT"), "DEFAULT" => "messages/output/", "VARIABLES" => array()), "messages_output_user" => array("NAME" => GetMessage("SONET_MESSAGES_OUTPUT_USER"), "DEFAULT" => "messages/output/#user_id#/", "VARIABLES" => array("user_id")), "messages_users" => array("NAME" => GetMessage("SONET_SEF_MESSAGES_USERS"), "DEFAULT" => "messages/", "VARIABLES" => array()), "messages_users_messages" => array("NAME" => GetMessage("SONET_SEF_MESSAGES_USERS_MESSAGES"), "DEFAULT" => "messages/#user_id#/", "VARIABLES" => array()), "log" => array("NAME" => GetMessage("SONET_SEF_LOG"), "DEFAULT" => "log/", "VARIABLES" => array()), "activity" => array("NAME" => GetMessage("SONET_SEF_ACTIVITY"), "DEFAULT" => "user/#user_id#/activity/", "VARIABLES" => array()), "subscribe" => array("NAME" => GetMessage("SONET_SEF_SUBSCRIBE"), "DEFAULT" => "subscribe/", "VARIABLES" => array()), "user_subscribe" => array("NAME" => GetMessage("SONET_SEF_USER_SUBSCRIBE"), "DEFAULT" => "user/#user_id#/subscribe/", "VARIABLES" => array()), "user_photo" => array("NAME" => GetMessage("SONET_SEF_USER_PHOTO"), "DEFAULT" => "user/#user_id#/photo/", "VARIABLES" => array("user_id", "user_alias")), "user_calendar" => array("NAME" => GetMessage("SONET_SEF_USER_CALENDAR"), "DEFAULT" => "user/#user_id#/calendar/", "VARIABLES" => array("user_id")), "user_files" => array("NAME" => GetMessage("SONET_SEF_USER_FILES"), "DEFAULT" => "user/#user_id#/files/lib/#path#", "VARIABLES" => array("user_id")), "user_blog" => array("NAME" => GetMessage("SONET_SEF_USER_BLOG"), "DEFAULT" => "user/#user_id#/blog/", "VARIABLES" => array("user_id")), "user_blog_post_edit" => array("NAME" => GetMessage("SONET_SEF_USER_BLOG_POST_EDIT"), "DEFAULT" => "user/#user_id#/blog/edit/#post_id#/", "VARIABLES" => array("user_id", "post_id")), "user_blog_rss" => array("NAME" => GetMessage("SONET_SEF_USER_BLOG_RSS"), "DEFAULT" => "user/#user_id#/blog/rss/#type#/", "VARIABLES" => array("user_id", "type")), "user_blog_draft" => array("NAME" => GetMessage("SONET_SEF_USER_BLOG_DRAFT"), "DEFAULT" => "user/#user_id#/blog/draft/", "VARIABLES" => array("user_id")), "user_blog_post" => array("NAME" => GetMessage("SONET_SEF_USER_BLOG_POST"), "DEFAULT" => "user/#user_id#/blog/#post_id#/", "VARIABLES" => array("user_id", "post_id")), "user_blog_moderation" => array("NAME" => GetMessage("SONET_SEF_USER_BLOG_MODERATION"), "DEFAULT" => "user/#user_id#/blog/moderation/", "VARIABLES" => array("user_id")), "user_forum" => array("NAME" => GetMessage("SONET_SEF_USER_FORUM"), "DEFAULT" => "user/#user_id#/forum/", "VARIABLES" => array("user_id")), "user_forum_topic_edit" => array("NAME" => GetMessage("SONET_SEF_USER_FORUM_TOPIC_EDIT"), "DEFAULT" => "user/#user_id#/forum/edit/#topic_id#/", "VARIABLES" => array("user_id", "topic_id")), "user_forum_topic" => array("NAME" => GetMessage("SONET_SEF_USER_FORUM_TOPIC"), "DEFAULT" => "user/#user_id#/forum/#topic_id#/", "VARIABLES" => array("user_id", "topic_id")), "bizproc" => array("NAME" => GetMessage("SONET_SEF_PATH_BIZPROC"), "DEFAULT" => "bizproc/", "VARIABLES" => array()), "bizproc_edit" => array("NAME" => GetMessage("SONET_SEF_PATH_BIZPROC_EDIT"), "DEFAULT" => "bizproc/#task_id#/", "VARIABLES" => array("task_id")), "video_call" => array("NAME" => GetMessage("SONET_SEF_VIDEO_CALL"), "DEFAULT" => "video/#user_id#/", "VARIABLES" => array("user_id")), "processes" => array("NAME" => GetMessage("SONET_SEF_PATH_PROCESSES"), "DEFAULT" => "processes/", "VARIABLES" => array())), "PATH_TO_SMILE" => array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("SONET_PATH_TO_SMILE"), "TYPE" => "STRING", "MULTIPLE" => "N", "DEFAULT" => "/bitrix/images/socialnetwork/smile/"), "PATH_TO_BLOG_SMILE" => array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("SONET_PATH_TO_BLOG_SMILE"), "TYPE" => "STRING", "MULTIPLE" => "N", "DEFAULT" => "/bitrix/images/blog/smile/"), "PATH_TO_FORUM_SMILE" => array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("SONET_PATH_TO_FORUM_SMILE"), "TYPE" => "STRING", "MULTIPLE" => "N", "DEFAULT" => "/bitrix/images/forum/smile/"), "SONET_PATH_TO_FORUM_ICON" => array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("SONET_PATH_TO_FORUM_ICON"), "TYPE" => "STRING", "MULTIPLE" => "N", "DEFAULT" => "/bitrix/images/forum/icon/"), "CACHE_TIME" => array("DEFAULT" => 3600), "SET_TITLE" => array(), "CACHE_TIME_LONG" => array("NAME" => GetMessage("SONET_CACHE_TIME_LONG"), "TYPE" => "STRING", "MULTIPLE" => "N", "DEFAULT" => "604800", "COLS" => 25, "PARENT" => "CACHE_SETTINGS"), "SET_NAV_CHAIN" => array("NAME" => GetMessage("SONET_SET_NAV_CHAIN"), "TYPE" => "CHECKBOX", "MULTIPLE" => "N", "VALUE" => "Y", "DEFAULT" => "Y", "PARENT" => "ADDITIONAL_SETTINGS"), "ITEM_DETAIL_COUNT" => array("NAME" => GetMessage("SONET_ITEM_DETAIL_COUNT"), "TYPE" => "STRING", "DEFAULT" => 32, "PARENT" => "VISUAL"), "ITEM_MAIN_COUNT" => array("NAME" => GetMessage("SONET_ITEM_MAIN_COUNT"), "TYPE" => "STRING", "DEFAULT" => "6", "PARENT" => "VISUAL"), "DATE_TIME_FORMAT" => CComponentUtil::GetDateTimeFormatField(GetMessage("SONET_DATE_TIME_FORMAT"), "VISUAL"), "NAME_TEMPLATE" => array("TYPE" => "LIST", "NAME" => GetMessage("SONET_NAME_TEMPLATE"), "VALUES" => CComponentUtil::GetDefaultNameTemplates(), "MULTIPLE" => "N", "ADDITIONAL_VALUES" => "Y", "DEFAULT" => "", "PARENT" => "VISUAL"), "SHOW_LOGIN" => array("NAME" => GetMessage("SONET_SHOW_LOGIN"), "TYPE" => "CHECKBOX", "MULTIPLE" => "N", "VALUE" => "Y", "DEFAULT" => "Y", "PARENT" => "VISUAL"), "CAN_OWNER_EDIT_DESKTOP" => array("NAME" => GetMessage("SONET_CAN_OWNER_EDIT_DESKTOP"), "TYPE" => "CHECKBOX", "MULTIPLE" => "N", "VALUE" => "Y", "DEFAULT" => IsModuleInstalled("intranet") ? "N" : "Y", "PARENT" => "VISUAL"), "USER_FIELDS_MAIN" => array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("SONET_USER_FIELDS_MAIN"), "TYPE" => "LIST", "VALUES" => $userProp1, "MULTIPLE" => "Y", "DEFAULT" => array()), "USER_PROPERTY_MAIN" => array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("SONET_USER_PROPERTY_MAIN"), "TYPE" => "LIST", "VALUES" => $userProp, "MULTIPLE" => "Y", "DEFAULT" => array()), "USER_FIELDS_CONTACT" => array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("SONET_USER_FIELDS_CONTACT"), "TYPE" => "LIST", "VALUES" => $userProp1, "MULTIPLE" => "Y", "DEFAULT" => array()), "USER_PROPERTY_CONTACT" => array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("SONET_USER_PROPERTY_CONTACT"), "TYPE" => "LIST", "VALUES" => $userProp, "MULTIPLE" => "Y", "DEFAULT" => array()), "USER_FIELDS_PERSONAL" => array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("SONET_USER_FIELDS_PERSONAL"), "TYPE" => "LIST", "VALUES" => $userProp1, "MULTIPLE" => "Y", "DEFAULT" => array()), "USER_PROPERTY_PERSONAL" => array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("SONET_USER_PROPERTY_PERSONAL"), "TYPE" => "LIST", "VALUES" => $userProp, "MULTIPLE" => "Y", "DEFAULT" => array()), "SET_NAV_CHAIN" => array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("SONET_SET_NAVCHAIN"), "TYPE" => "CHECKBOX", "DEFAULT" => "Y"), "PATH_TO_GROUP" => array("NAME" => GetMessage("SONET_PATH_TO_GROUP"), "TYPE" => "STRING", "MULTIPLE" => "N", "DEFAULT" => "", "COLS" => 25, "PARENT" => "URL_TEMPLATES"), "PATH_TO_GROUP_SUBSCRIBE" => array("NAME" => GetMessage("SONET_PATH_TO_GROUP_SUBSCRIBE"), "TYPE" => "STRING", "MULTIPLE" => "N", "DEFAULT" => "", "COLS" => 25, "PARENT" => "URL_TEMPLATES"), "PATH_TO_GROUP_SEARCH" => array("NAME" => GetMessage("SONET_PATH_TO_GROUP_SEARCH"), "TYPE" => "STRING", "MULTIPLE" => "N", "DEFAULT" => "", "COLS" => 25, "PARENT" => "URL_TEMPLATES"), "PATH_TO_SEARCH_EXTERNAL" => array("NAME" => GetMessage("SONET_PATH_TO_SEARCH_EXTERNAL"), "TYPE" => "STRING", "MULTIPLE" => "N", "DEFAULT" => "", "COLS" => 25, "PARENT" => "URL_TEMPLATES"), "EDITABLE_FIELDS" => array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("SONET_EDITABLE_FIELDS"), "TYPE" => "LIST", "VALUES" => array_merge($userPropEdit, $userProp), "MULTIPLE" => "Y", "DEFAULT" => array('LOGIN', 'NAME', 'SECOND_NAME', 'LAST_NAME', 'EMAIL', 'PERSONAL_BIRTHDAY', 'PERSONAL_CITY', 'PERSONAL_COUNTRY', 'PERSONAL_FAX', 'PERSONAL_GENDER', 'PERSONAL_ICQ', 'PERSONAL_MAILBOX', 'PERSONAL_MOBILE', 'PERSONAL_PAGER', 'PERSONAL_PHONE', 'PERSONAL_PHOTO', 'PERSONAL_STATE', 'PERSONAL_STREET', 'PERSONAL_WWW', 'PERSONAL_ZIP')), "SHOW_YEAR" => array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("SONET_SHOW_YEAR"), "TYPE" => "LIST", "VALUES" => array("Y" => GetMessage("SONET_SHOW_YEAR_VALUE_Y"), "M" => GetMessage("SONET_SHOW_YEAR_VALUE_M"), "N" => GetMessage("SONET_SHOW_YEAR_VALUE_N")), "MULTIPLE" => "N", "DEFAULT" => "Y"), "USER_FIELDS_SEARCH_SIMPLE" => array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("SONET_USER_FIELDS_SEARCH_SIMPLE"), "TYPE" => "LIST", "VALUES" => $userProp1, "MULTIPLE" => "Y", "DEFAULT" => array("PERSONAL_GENDER", "PERSONAL_CITY")), "USER_PROPERTIES_SEARCH_SIMPLE" => array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("SONET_USER_PROPERTIES_SEARCH_SIMPLE"), "TYPE" => "LIST", "VALUES" => $userProp, "MULTIPLE" => "Y", "DEFAULT" => array()), "USER_FIELDS_SEARCH_ADV" => array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("SONET_USER_FIELDS_SEARCH_ADV"), "TYPE" => "LIST", "VALUES" => $userProp1, "MULTIPLE" => "Y", "DEFAULT" => array("PERSONAL_GENDER", "PERSONAL_CITY", "PERSONAL_COUNTRY")), "USER_PROPERTIES_SEARCH_ADV" => array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("SONET_USER_PROPERTIES_SEARCH_ADV"), "TYPE" => "LIST", "VALUES" => $userProp, "MULTIPLE" => "Y", "DEFAULT" => array()), "SONET_USER_FIELDS_LIST" => array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("SONET_SONET_USER_FIELDS_LIST"), "TYPE" => "LIST", "VALUES" => $userProp1, "MULTIPLE" => "Y", "DEFAULT" => array("PERSONAL_GENDER", "PERSONAL_BIRTHDAY", "PERSONAL_CITY")), "SONET_USER_PROPERTY_LIST" => array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("SONET_SONET_USER_PROPERTY_LIST"), "TYPE" => "LIST", "VALUES" => $userProp, "MULTIPLE" => "Y", "DEFAULT" => array()), "SONET_USER_FIELDS_SEARCHABLE" => array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("SONET_SONET_USER_FIELDS_SEARCHABLE"), "TYPE" => "LIST", "VALUES" => $userProp1, "MULTIPLE" => "Y", "DEFAULT" => array("NAME", "SECOND_NAME", "LAST_NAME", "LOGIN", "PERSONAL_BIRTHDAY", "PERSONAL_BIRTHDAY_YEAR", "PERSONAL_BIRTHDAY_DAY", "PERSONAL_PROFESSION", "PERSONAL_GENDER", "PERSONAL_COUNTRY", "PERSONAL_STATE", "PERSONAL_CITY", "PERSONAL_ZIP", "PERSONAL_STREET", "PERSONAL_MAILBOX", "WORK_COMPANY", "WORK_DEPARTMENT", "WORK_POSITION", "WORK_COUNTRY", "WORK_STATE", "WORK_CITY", "WORK_ZIP", "WORK_STREET", "WORK_MAILBOX")), "SONET_USER_PROPERTY_SEARCHABLE" => array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("SONET_SONET_USER_PROPERTY_SEARCHABLE"), "TYPE" => "LIST", "VALUES" => $userProp, "MULTIPLE" => "Y", "DEFAULT" => array())));
if (CModule::IncludeModule("intranet")) {
    $arComponentParameters["PARAMETERS"]["PATH_TO_CONPANY_DEPARTMENT"] = array("NAME" => GetMessage("SONET_PATH_TO_CONPANY_DEPARTMENT"), "DEFAULT" => "/company/structure.php?set_filter_structure=Y&structure_UF_DEPARTMENT=#ID#", "PARENT" => "URL_TEMPLATES");
    /* *** EVENT CALENDAR *** */
    $arComponentParameters["GROUPS"]["EVENT_CALENDAR_SETTINGS"] = array("NAME" => GetMessage("SONET_EVENT_CALENDAR_SETTINGS"));
    $calendar2 = (!IsModuleInstalled("intranet") || COption::GetOptionString("intranet", "calendar_2", "N") == "Y") && CModule::IncludeModule("calendar");
    if ($calendar2) {
        $arComponentParameters["PARAMETERS"]["CALENDAR_ALLOW_SUPERPOSE"] = array("PARENT" => "EVENT_CALENDAR_SETTINGS", "NAME" => GetMessage("SONET_CALENDAR_ALLOW_SUPERPOSE"), "TYPE" => "CHECKBOX", "DEFAULT" => "N");
        $arComponentParameters["PARAMETERS"]["CALENDAR_ALLOW_RES_MEETING"] = array("PARENT" => "EVENT_CALENDAR_SETTINGS", "NAME" => GetMessage("SONET_CALENDAR_ALLOW_RES_MEETING"), "TYPE" => "CHECKBOX", "DEFAULT" => "Y");
    } else {
        $arIBlockType = array();
        $rsIBlockType = CIBlockType::GetList(array("sort" => "asc"), array("ACTIVE" => "Y"));
        while ($arr = $rsIBlockType->Fetch()) {
            if ($ar = CIBlockType::GetByIDLang($arr["ID"], LANGUAGE_ID)) {
Beispiel #4
0
                 if ($arResult["User"]["AUTO_TIME_ZONE"] != "N") {
                     continue 2;
                 }
                 break;
             case 'LAST_LOGIN':
                 if (StrLen($val) > 0) {
                     $val = FormatDateFromDB($val, $arParams["DATE_TIME_FORMAT"], true);
                 }
                 break;
             default:
                 if (in_array($userFieldName, $arParams["SONET_USER_FIELDS_SEARCHABLE"])) {
                     $strSearch = $arParams["PATH_TO_SEARCH_INNER"] . (StrPos($arParams["PATH_TO_SEARCH_INNER"], "?") !== false ? "&" : "?") . "flt_" . StrToLower($userFieldName) . "=" . UrlEncode($val);
                 }
                 break;
         }
         $userFields = CSocNetUser::GetFields();
         if (in_array($userFieldName, $arParams["USER_FIELDS_MAIN"])) {
             $arResult["UserFieldsMain"]["DATA"][$userFieldName] = array("NAME" => $userFields[$userFieldName], "VALUE" => $val, "SEARCH" => $strSearch);
         }
         if (in_array($userFieldName, $arParams["USER_FIELDS_CONTACT"])) {
             $arResult["UserFieldsContact"]["DATA"][$userFieldName] = array("NAME" => $userFields[$userFieldName], "VALUE" => $val, "SEARCH" => $strSearch);
         }
         if (in_array($userFieldName, $arParams["USER_FIELDS_PERSONAL"])) {
             $arResult["UserFieldsPersonal"]["DATA"][$userFieldName] = array("NAME" => $userFields[$userFieldName], "VALUE" => $val, "SEARCH" => $strSearch);
         }
     }
 }
 if (count($arResult["UserFieldsMain"]["DATA"]) > 0) {
     $arResult["UserFieldsMain"]["SHOW"] = "Y";
 }
 if (count($arResult["UserFieldsContact"]["DATA"]) > 0) {