GetGroupRight($module_id); if($MOD_RIGHT>='R'): // set up form $arAllOptions = Array( Array('allow_html', Loc::getMessage('WIKI_OPTIONS_ALLOW_HTML'), 'Y', Array('checkbox')), Array('image_max_width', Loc::getMessage('WIKI_OPTIONS_IMAGE_MAX_WIDTH'), '600', Array('text')), Array('image_max_height', Loc::getMessage('WIKI_OPTIONS_IMAGE_MAX_HEIGHT'), '600', Array('text')), Array('note' => Loc::getMessage('WIKI_OPTIONS_IMAGE_DESCR')) ); if(IsModuleInstalled('forum')) { if(!CModule::IncludeModule('forum')) return false; $rsForum = CForumNew::GetList(); $arForumList = Array(); $arForumList[] = ''; while($arForum=$rsForum->Fetch()) $arForumList[$arForum['ID']]=$arForum['NAME']; $socnet_message_per_page = isset($_POST['socnet_message_per_page']) ? $_POST['socnet_message_per_page'] : COption::GetOptionString('wiki', 'socnet_message_per_page','20'); $arForumOptions = Array( array('socnet_use_review', Loc::getMessage('WIKI_OPTIONS_SOCNET_USE_REVIEW'), 'Y', Array('checkbox')), array('socnet_forum_id', Loc::getMessage('WIKI_OPTIONS_SOCNET_FORUM_ID'), '', Array('selectbox', $arForumList)), array('socnet_message_per_page', Loc::getMessage('WIKI_OPTIONS_SOCNET_MESSAGE_PER_PAGE'), $socnet_message_per_page, Array('text')), array('socnet_use_captcha', Loc::getMessage('WIKI_OPTIONS_SOCNET_USE_CAPTCHA'), 'Y', Array('checkbox')) ); } if($MOD_RIGHT>='Y' || $USER->IsAdmin()): if ($REQUEST_METHOD=='GET' && $RestoreDefaults <> '' && check_bitrix_sessid()) { COption::RemoveOption($module_id); $z = CGroup::GetList('id', 'asc', array('ACTIVE' => 'Y', 'ADMIN' => 'N')); while($zr = $z->Fetch()) $APPLICATION->DelGroupRight($module_id, array($zr['ID'])); } if($REQUEST_METHOD=='POST' && $Update <> '' && check_bitrix_sessid()) { $arOptions = $arAllOptions; if(IsModuleInstalled('forum')) $arOptions = array_merge($arAllOptions, $arForumOptions); //fix: http://jabber.bx/view.php?id=20941 (for compatibility) COption::RemoveOption($module_id,'socnet_message_per_page'); foreach($arOptions as $option) { if(!is_array($option) || isset($option['note'])) continue; $name = $option[0]; $val = ${$name}; if($option[3][0] == 'checkbox' && $val != 'Y') $val = 'N'; if($option[3][0] == 'multiselectbox') $val = @implode(',', $val); if ($name == 'image_max_width' || $name == 'image_max_height') $val = (int) $val; COption::SetOptionString($module_id, $name, $val, $option[1]); } if(IsModuleInstalled('socialnetwork')) { COption::SetOptionString($module_id, 'socnet_iblock_id', $_POST['socnet_iblock_id']); COption::SetOptionString($module_id, 'socnet_iblock_type_id', $_POST['socnet_iblock_type_id']); COption::SetOptionString($module_id, 'socnet_enable', $_POST['socnet_enable']); CWikiSocnet::EnableSocnet($_POST['socnet_enable'] === 'Y'); } } endif; //if($MOD_RIGHT>="W"): $aTabs = array(); $aTabs[] = array('DIV' => 'set', 'TAB' => Loc::getMessage('MAIN_TAB_SET'), 'ICON' => 'wiki_settings', 'TITLE' => Loc::getMessage('MAIN_TAB_TITLE_SET')); if(IsModuleInstalled('socialnetwork')) { $aTabs[] = array( 'DIV' => 'socnet', 'TAB' => Loc::getMessage('WIKI_TAB_SOCNET'), 'TITLE' => Loc::getMessage('WIKI_TAB_TITLE_SOCNET'), 'ICON' => 'wiki_settings' ); } $aTabs[] = array('DIV' => 'rights', 'TAB' => Loc::getMessage('MAIN_TAB_RIGHTS'), 'ICON' => 'wiki_settings', 'TITLE' => Loc::getMessage('MAIN_TAB_TITLE_RIGHTS')); $tabControl = new CAdminTabControl('tabControl', $aTabs); ?> Begin(); ?>