public static function BuildDialogContent($site) { global $APPLICATION; $actUri = $APPLICATION->GetCurPage() . "?search=Y&ssess=" . CFilemanSearch::GetSearchSess(); $s = DeleteParam(array('search', 'ssess')); if ($s != '') { $actUri .= '&' . $s; } $defMask = COption::GetOptionString("fileman", "search_mask", "*.php"); // Search dialog $aTabs[] = array("DIV" => "bx_fm_tab_search", "TAB" => GetMessage("FM_UTIL_FIND"), "ICON" => "", "TITLE" => GetMessage("FM_UTIL_FIND_TITLE"), "ONSELECT" => "window.oFMSearch.SetTab('search');"); $aTabs[] = array("DIV" => "bx_fm_tab_replace", "TAB" => GetMessage("FM_UTIL_REPLACE"), "ICON" => "", "TITLE" => GetMessage("FM_UTIL_REPLACE_TITLE"), "ONSELECT" => "window.oFMSearch.SetTab('replace');"); $searchTabControl = new CAdmintabControl("searchTabControl", $aTabs, false, true); $searchTabControl->SetPublicMode('oSearchDialog'); $searchTabControl->Begin(); ?> <?php $searchTabControl->BeginNextTab(); ?> <tr><td> <div id="bx_search_cont" class="bxfm-search-cont"><form name="bx_search_form" action="<?php echo $actUri; ?> " method="POST"> <table id="bx_fms_tbl" class="bxfm-d-params bxfm-d-params-add-hide"> <tr id="bx_search_in_res_tr"> <td class="bxfm-d-label"><input id="bx_search_in_res" type="checkbox" value="Y" checked="checked" /></td> <td class="bxfm-d-value"><label for="bx_search_in_res" style="font-weight: bold;"><?php echo GetMessage("FM_UTIL_IN_SEARCH_RESULT"); ?> </label></td> </tr> <tr title='<?php echo GetMessage("FM_UTIL_FILE_NAME_TITLE"); ?> '> <td class="bxfm-d-label"><label for="bx_search_file"><?php echo GetMessage("FM_UTIL_FILE_NAME"); ?> :</label></td> <td class="bxfm-d-value"><input id="bx_search_file" name="bx_search_file" value="<?php echo $defMask; ?> " style="width: 220px;" type="text"/></td> </tr> <tr title="<?php echo GetMessage("FM_UTIL_PHRASE_TITLE"); ?> "> <td class="bxfm-d-label"><label for="bx_search_phrase"><?php echo GetMessage("FM_UTIL_PHRASE"); ?> :</label></td> <td class="bxfm-d-value"><input id="bx_search_phrase" name="bx_search_phrase" value="" style="width: 220px;" type="text"/></td> </tr> <tr class="bxfm-d-only-replace" title="<?php echo GetMessage("FM_UTIL_REPLACE_INP_TITLE"); ?> "> <td class="bxfm-d-label"><label for="bx_replace_phrase"><?php echo GetMessage("FM_UTIL_REPLACE_INP"); ?> :</label></td> <td class="bxfm-d-value"><input id="bx_replace_phrase" name="bx_replace_phrase" value="" style="width: 220px;" type="text"/></td> </tr> <tr title="<?php echo GetMessage("FM_UTIL_DIR_TITLE"); ?> "> <td class="bxfm-d-label"><label for="bx_search_dir"><?php echo GetMessage("FM_UTIL_DIR"); ?> :</label></td> <td class="bxfm-d-value"><input id="bx_search_dir" name="bx_search_dir" value="" style="width: 220px;" type="text"/> <input id="bx_search_fd_but" type="button" value="..." title="<?php echo GetMessage('FD_OPEN_DIR'); ?> " onclick="FMFD_SearchDirOpen(true, {site: window.oFMSearch.oSiteSel.value, path: window.oFMSearch.pSearchDir.value});" /><span class="bxfm-site-sel" id="bx_search_site_sel"></span></td> </tr> <tr> <td class="bxfm-d-label"><label for="bx_search_subdir"><?php echo GetMessage("FM_UTIL_INCLUDE_SUBFOLDER"); ?> </label></td> <td class="bxfm-d-value"><input id="bx_search_subdir" name="bx_search_subdir" type="checkbox" value="Y" checked="checked" /></td> </tr> <tr class="bxfm-d-title"> <td colSpan="2"> <a class="bxfm-add-link" id="bx_fms_add_lnk" href="javascript: void(0);"><?php echo GetMessage("FM_UTIL_ADDITIONAL"); ?> <span class="bxfm-d-span-hide">(<?php echo GetMessage("FM_UTIL_HIDE"); ?> )</span></a> </td> </tr> <tr class="bxfm-add-hide" title="<?php echo GetMessage("FM_UTIL_DATE_TITLE"); ?> "> <td class="bxfm-d-label"><label for="bx_search_date_sel"><?php echo GetMessage("FM_UTIL_DATE"); ?> :</label></td> <td class="bxfm-d-value"> <select id="bx_search_date_sel" name="bx_search_date_sel"> <option value=""> - <?php echo GetMessage("FM_UTIL_NO_VAL"); ?> - </option> <option value="day"><?php echo GetMessage("FM_UTIL_DAY"); ?> </option> <option value="week"><?php echo GetMessage("FM_UTIL_WEEK"); ?> </option> <option value="month"><?php echo GetMessage("FM_UTIL_MONTH"); ?> </option> <option value="year"><?php echo GetMessage("FM_UTIL_YEAR"); ?> </option> <option value="set"><?php echo GetMessage("FM_UTIL_SET_EXACTLY"); ?> </option> </select> <div id="bx_search_date_div" class="bxfm-d-adjust-div"> <?php echo GetMessage("FM_UTIL_FROM"); ?> : <input name="bx_search_date_from" id="bx_search_date_from" value="" style="width: 90px;" type="text"/><?php echo CAdminCalendar::Calendar("bx_search_date_from", "bx_search_form"); ?> <?php echo GetMessage("FM_UTIL_TO"); ?> : <input name="bx_search_date_to" id="bx_search_date_to" value="" style="width: 90px;" type="text"/><?php echo CAdminCalendar::Calendar("bx_search_date_to", "bx_search_form"); ?> </div> </td> </tr> <tr class="bxfm-add-hide" title="<?php echo GetMessage("FM_UTIL_SIZE_TITLE"); ?> "> <td class="bxfm-d-label"><label for="bx_search_size_sel"><?php echo GetMessage("FM_UTIL_SIZE"); ?> :</label></td> <td class="bxfm-d-value"> <select id="bx_search_size_sel" name="bx_search_size_sel"> <option value=""> - <?php echo GetMessage("FM_UTIL_NO_VAL"); ?> - </option> <option value="100"><?php echo GetMessage("FM_UTIL_SIZE_100"); ?> </option> <option value="100_500"><?php echo GetMessage("FM_UTIL_SIZE_100_500"); ?> </option> <option value="500"><?php echo GetMessage("FM_UTIL_SIZE_500"); ?> </option> <option value="set"><?php echo GetMessage("FM_UTIL_SET_EXACTLY"); ?> </option> </select> <div id="bx_search_size_div" class="bxfm-d-adjust-div"> <?php echo GetMessage("FM_UTIL_SIZE_FROM"); ?> : <input id="bx_search_size_from" name="bx_search_size_from" value="" style="width: 70px;" type="text"/><?php echo GetMessage("FM_UTIL_KB"); ?> <?php echo GetMessage("FM_UTIL_SIZE_TO"); ?> : <input id="bx_search_size_to" name="bx_search_size_to" value="" style="width: 70px;" type="text"/><?php echo GetMessage("FM_UTIL_KB"); ?> </div> </td> </tr> <tr class="bxfm-add-hide bxfm-d-only-search"> <td class="bxfm-d-label"><label for="bx_search_dirs_too"><?php echo GetMessage("FM_UTIL_SEARCH_DIRS"); ?> </label></td> <td class="bxfm-d-value"><input id="bx_search_dirs_too" name="bx_search_dirs_too" type="checkbox" value="Y" checked="checked" /></td> </tr> <tr class="bxfm-add-hide-TEMP" style="display: none;"> <td class="bxfm-d-label"><label for="bx_search_entire"><?php echo GetMessage("FM_UTIL_ENTIRE"); ?> </label></td> <td class="bxfm-d-value"><input id="bx_search_entire" type="checkbox" value="Y" /></td> </tr> <tr class="bxfm-add-hide"> <td class="bxfm-d-label"><label for="bx_search_case"><?php echo GetMessage("FM_UTIL_CASE_SENS"); ?> </td> <td class="bxfm-d-value"><input id="bx_search_case" name="bx_search_case" type="checkbox" value="Y" /></label></td> </tr> </table> <input type="hidden" name="search" value="Y" /> <div id="bx_search_res_cont"></div> <?php CAdminFileDialog::ShowScript(array("event" => "FMFD_SearchDirOpen", "arResultDest" => array("ELEMENT_ID" => "bx_search_dir"), "arPath" => array("SITE" => $site, "PATH" => "/"), "select" => 'D', "operation" => 'O', "showUploadTab" => false, "showAddToMenuTab" => false, "allowAllFiles" => false, "SaveConfig" => true)); ?> </form></div> </td></tr> <?php $searchTabControl->BeginNextTab(); ?> <tr><td> <div id="bx_replace_cont" class="bxfm-replace-cont"></div> </td></tr> <?php $searchTabControl->End(); // *** Copy / move dialog *** ?> <div id="bx_copy_dialog" class="bx-copy-cont"> <table class="bx-copy-cont-tbl bx-copy-cont-tbl-add-hide" id="bx_copy_table" style="width: 470px;"> <tr> <td class="bxfm-d-label"><label for="bx_copy_file_list"><?php echo GetMessage("FM_UTIL_FILE"); ?> :</label></td> <td class="bxfm-d-value"><div id="bx_copy_file_list" style="margin-top: 2px;"><div></td> </tr> <tr> <td class="bxfm-d-label"><label for="bx_copy_to"><?php echo GetMessage("FM_COPY_TO"); ?> :</label></td> <td class="bxfm-d-value"> <div style="width: 340px;"> <input id="bx_copy_to" style="width: 255px;" value="/" type="text" /><input type="button" value="..." title="<?php echo GetMessage('FD_OPEN_DIR'); ?> " onclick="FMFD_CopyMoveOpen(true, {site: window.oBXFMCopy.oSiteSel.value, path: window.oBXFMCopy.oCopyTo.pInput.value});" /> <span class="bxfm-site-sel" id="bx_copy_site_sel"></span> </div> </td> </tr> <tr class="bx-copy-d-title"> <td colSpan="2"> <a class="bx-copy-add-link" id="bx_copy_add_lnk" href="javascript: void(0);"><?php echo GetMessage("FM_UTIL_ADDITIONAL"); ?> <span class="bx-copy-d-span-hide">(<?php echo GetMessage("FM_UTIL_HIDE"); ?> )</span></a> </td> </tr> <tr class="bxfm-add-hide"> <td colSpan="2" style="padding: 5px 0 5px 120px !important;"><?php echo GetMessage("FM_COPY_COINCID"); ?> :</td> </tr> <tr class="bxfm-add-hide"> <td class="bxfm-d-label"> <input id="bx_copy_ask_user" type="radio" name="bx_copy_coincidence" value="ask" checked="checked"/> </td> <td class="bxfm-d-value"> <label for="bx_copy_ask_user"><?php echo GetMessage("FM_COPY_ASK_USER"); ?> </label> </td> </tr> <tr class="bxfm-add-hide"> <td class="bxfm-d-label"> <input id="bx_copy_replace" type="radio" name="bx_copy_coincidence" value="replace" /> </td> <td class="bxfm-d-value"> <label for="bx_copy_replace"><?php echo GetMessage("FM_COPY_REPLACE"); ?> </label> </td> </tr> <tr class="bxfm-add-hide"> <td class="bxfm-d-label"> <input id="bx_copy_auto_rename" type="radio" name="bx_copy_coincidence" value="auto_rename" /> </td> <td class="bxfm-d-value"> <label for="bx_copy_auto_rename"><?php echo GetMessage("FM_COPY_AUTO_RENAME"); ?> </label> </td> </tr> <tr class="bxfm-add-hide"> <td class="bxfm-d-label"> <input id="bx_copy_skip" type="radio" name="bx_copy_coincidence" value="skip" /> </td> <td class="bxfm-d-value"> <label for="bx_copy_skip"><?php echo GetMessage("FM_COPY_SKIP"); ?> </label> </td> </tr> </table> <?php CAdminFileDialog::ShowScript(array("event" => "FMFD_CopyMoveOpen", "arResultDest" => array("ELEMENT_ID" => "bx_copy_to"), "arPath" => array("SITE" => $GLOBALS['site'], "PATH" => "/"), "select" => 'D', "operation" => 'O', "showUploadTab" => false, "showAddToMenuTab" => false, "allowAllFiles" => false, "SaveConfig" => true)); ?> </div> <div id="bx_copy_ask_dialog" class="bx-copy-cont"> <div style="margin: 0 70px 0 70px; width: 460px; padding: 10px 0 5px;"> <?php echo GetMessage("FM_UTIL_FILE_EXIST", array("#NAME#" => "<span id='bx_copy_ask_file_name'>#NAME#</span>", "#FOLDER#" => "<span id='bx_copy_ask_folder'>#FOLDER#</span>")); ?> : </div> <div style="margin: 0 50px;"> <table class="bx-copy-compare-tbl"> <tr class="bx-copy-title"> <td><?php echo GetMessage("FM_UTIL_NEW_FILE"); ?> :</td> <td rowSpan="4" class="bx-copy-sep-td"></td> <td><?php echo GetMessage("FM_UTIL_ORIGINAL_FILE"); ?> :</td> </tr> <tr> <td> <div class="bx-copy-name-cnt"> <a id="bx_copy_ask_file1" href="javascript:void();">file1</a> <div id="bxc_ask_nn_cont1" class="bx-copy-new-name bxcnn-0"></div> </div> </td> <td> <div class="bx-copy-name-cnt"><a id="bx_copy_ask_file2" href="javascript:void();">file2</a></div> </td> </tr> <tr id="bx_copy_ask_size_row"> <td><?php echo GetMessage("FM_UTIL_SIZE"); ?> : <span id="bx_copy_ask_size1"></span></td> <td><?php echo GetMessage("FM_UTIL_SIZE"); ?> : <span id="bx_copy_ask_size2"></span></td> </tr> <tr class="bx-copy-bottom"> <td><?php echo GetMessage("FM_UTIL_DATE"); ?> : <span id="bx_copy_ask_date1"></span></td> <td><?php echo GetMessage("FM_UTIL_DATE"); ?> : <span id="bx_copy_ask_date2"></span></td> </tr> </table> </div> </div> <?php $searchTabControl->BeginNextTab(); // *** Pack / unpack dialog *** ?> <div id="bx_pack_dialog" class="bx-pack-cont"> <table class="bx-pack-cont-tbl bx-pack-cont-tbl-add-hide" id="bx_pack_table" style="width: 470px;"> <tr> <td class="bxfm-d-label"><label for="bx_pack_file_list"><?php echo GetMessage("FM_PACK_FILE"); ?> :</label></td> <td class="bxfm-d-value"><div id="bx_pack_file_list" style="margin-top: 2px;"><div></td> </tr> <tr id="bxfm-arctype-line"> <td class="bxfm-d-label"><label for="bx_pack_arc_type"><?php echo GetMessage("FM_PACK_ARC_TYPE"); ?> :</label></td> <td class="bxfm-d-value"><div id="bx_pack_arc_type" class="bxfm-arctype-sel" style="margin-top: 4px;"><div></td> </tr> <tr> <!-- if pack "to archive", if not - "to folder" --> <td class="bxfm-d-label"><label for="bx_pack_to"><?php echo GetMessage("FM_PACK_TO"); ?> :</label></td> <td class="bxfm-d-value"> <div style="width: 340px;"> <input id="bx_pack_to" style="width: 260px;" value="/" type="text"/> <input type="button" value="..." title="<?php echo GetMessage('FD_OPEN_DIR'); ?> " onclick="FMFD_PackUnpackOpen(true, {site: window.oBXFMPack.oSiteSel.value, path: window.oBXFMPack.GetFolderPath(window.oBXFMPack.oPackTo.pInput.value)});" /> <span class="bxfm-site-sel" id="bx_pack_site_sel"></span> </div> </td> </tr> <tr class="bx-pack-d-title" id="bx-pack-d-title-label"> <td></td> <td><?php echo GetMessage("FM_PACK_ADDITIONAL"); ?> </td> </tr> <!--<tr class="bxfm-add-hide" id="bxfm-pack-option-ask"> <td class="bxfm-d-label"> <input id="bx_pack_ask_user" type="radio" name="bx_pack_coincidence" value="ask" checked="checked"/> </td> <td class="bxfm-d-value"> <label for="bx_pack_ask_user"><?php echo GetMessage("FM_PACK_ASK_USER"); ?> </label> </td> </tr>--> <tr class="bxfm-add-hide" id="bxfm-pack-option-replace"> <td class="bxfm-d-label"> <input id="bx_pack_replace" type="radio" name="bx_pack_coincidence" value="replace" /> </td> <td class="bxfm-d-value"> <label for="bx_pack_replace"><?php echo GetMessage("FM_PACK_REPLACE"); ?> </label> </td> </tr> <!--<tr class="bxfm-add-hide" id="bxfm-pack-option-rename"> <td class="bxfm-d-label"> <input id="bx_pack_auto_rename" type="radio" name="bx_pack_coincidence" value="auto_rename" /> </td> <td class="bxfm-d-value"> <label for="bx_pack_auto_rename"><?php echo GetMessage("FM_PACK_AUTO_RENAME"); ?> </label> </td> </tr>--> <tr class="bxfm-add-hide" id="bxfm-pack-option-skip"> <td class="bxfm-d-label"> <input id="bx_pack_skip" type="radio" name="bx_pack_coincidence" value="skip" /> </td> <td class="bxfm-d-value"> <label for="bx_pack_skip"><?php echo GetMessage("FM_PACK_SKIP"); ?> </label> </td> </tr> </table> <?php CAdminFileDialog::ShowScript(array("event" => "FMFD_PackUnpackOpen", "arResultDest" => array("FUNCTION_NAME" => "MakeArchivePathFromFolderPath"), "arPath" => array("SITE" => $GLOBALS['site'], "PATH" => "/"), "select" => 'D', "operation" => 'O', "showUploadTab" => false, "showAddToMenuTab" => false, "allowAllFiles" => false, "SaveConfig" => true)); ?> </div> <script type="text/javascript"> function MakeArchivePathFromFolderPath(filename, path, site) { var oldArchivePath = BX('bx_pack_to').value, newArchivePath, archiveName; archiveName = oldArchivePath.substr(oldArchivePath.lastIndexOf('/') + 1); newArchivePath = "/" + path + "/" + filename + "/" + archiveName; newArchivePath = newArchivePath.replace(/[\/]+$/g, ""); newArchivePath = newArchivePath.replace(/[\/]+/g, '/'); newArchivePath = newArchivePath.replace(/[\\]+/g, '/'); if (newArchivePath == '') newArchivePath = '/'; BX('bx_pack_to').value = newArchivePath; } </script> <div id="bx_pack_ask_dialog" class="bx-pack-cont"> <div style="margin: 0 20px 0 20px; width: 450px; padding: 10px 0 5px;"> <?php echo GetMessage("FM_UTIL_FILE_EXIST", array("#NAME#" => "<span id='bx_pack_ask_file_name'>#NAME#</span>", "#FOLDER#" => "<span id='bx_pack_ask_folder'>#FOLDER#</span>")); ?> : </div> <table style="margin: 0 20px 0 20px"> <tr> <td> <div class="bx-pack-name-cnt"> <a id="bx_pack_ask_file2" href="javascript:void('');">file1</a> <div id="bxc_ask_nn_cont2" class="bx-pack-new-name bxcnn-0"></div> </div> </td> </tr> <tr id="bx_pack_ask_size_row"> <td><?php echo GetMessage("FM_UTIL_SIZE"); ?> : <span id="bx_pack_ask_size2"></span></td> </tr> <tr class="bx-pack-bottom"> <td><?php echo GetMessage("FM_UTIL_DATE"); ?> : <span id="bx_pack_ask_date2"></span></td> </tr> </table> <br/> </div><?php }
$siteList = array(); $rsSites = CSite::GetList($by = "sort", $order = "asc", array()); $i = 0; while ($arRes = $rsSites->Fetch()) { $siteList[$i]["ID"] = $arRes["ID"]; $siteList[$i]["NAME"] = $arRes["NAME"]; $i++; } $siteCount = $i; $useEditor3 = COption::GetOptionString($module_id, "use_editor_3", "Y") == "Y"; unset($rsSites); unset($arRes); if ($addError) { CAdminMessage::ShowMessage(array("DETAILS" => $addError, "TYPE" => "ERROR")); } $tabControl = new CAdmintabControl("tabControl", $aTabs); $tabControl->Begin(); ?> <script> function SelectSite(id) { <?php for ($i = 0; $i < $siteCount; $i++) { ?> BX('<?php echo htmlspecialcharsbx($siteList[$i]["ID"]); ?> _Propery').style.display='none'; <?php
$siteList = array(); $rsSites = CSite::GetList($by="sort", $order="asc", Array()); $i = 0; while($arRes = $rsSites->Fetch()) { $siteList[$i]["ID"] = $arRes["ID"]; $siteList[$i]["NAME"] = $arRes["NAME"]; $i++; } $siteCount = $i; $useEditor3 = COption::GetOptionString($module_id, "use_editor_3", "N") == "Y"; unset($rsSites); unset($arRes); $tabControl = new CAdmintabControl("tabControl", $aTabs); $tabControl->Begin(); ?> <script> function SelectSite(id) { <?for($i = 0; $i < $siteCount; $i++):?> BX('<?php echo htmlspecialcharsbx($siteList[$i]["ID"]); ?> _Propery').style.display='none'; <?endfor;?> BX(id+'_Propery').style.display='';
BX.ajax.post(manage_snippets_path + '&target=edit', post, function() { setTimeout(function() { elNode.onclick(); }, 500); } ); } </script> <?php CAdminFileDialog::ShowScript(array("event" => "OpenFileDialog_thumb", "arResultDest" => array("FUNCTION_NAME" => "SetUrl"), "arPath" => array(), "select" => 'F', "operation" => 'O', "showUploadTab" => true, "showAddToMenuTab" => false, "fileFilter" => 'image', "allowAllFiles" => true, "SaveConfig" => true)); $tabControlDialog = new CAdmintabControl("tabControlDialog_sn", array(array("DIV" => "__bx_sn_base_params", "TAB" => GetMessage("FILEMAN_ED_BASE_PARAMS"), "ICON" => "", "ONSELECT" => "window.oBXEditorDialog.adjustSizeEx();"), array("DIV" => "__bx_sn_location", "TAB" => GetMessage("FILEMAN_ED_LOCATION"), "ICON" => "", "ONSELECT" => "window.oBXEditorDialog.adjustSizeEx();"), array("DIV" => "__bx_sn_additional_params", "TAB" => GetMessage("FILEMAN_ED_ADD_PARAMS"), "ICON" => "", "ONSELECT" => "window.oBXEditorDialog.adjustSizeEx();")), false, true); $tabControlDialog->Begin(); $tabControlDialog->BeginNextTab(); ?> <tr><td></td></tr> <?php $tabControlDialog->BeginNextTab(); ?> <tr><td></td></tr> <?php $tabControlDialog->BeginNextTab(); ?> <tr><td></td></tr> <?php $tabControlDialog->End(); ?>
$siteList = array(); $rsSites = CSite::GetList($by="sort", $order="asc", Array()); $i = 0; while($arRes = $rsSites->Fetch()) { $siteList[$i]["ID"] = $arRes["ID"]; $siteList[$i]["NAME"] = $arRes["NAME"]; $i++; } $siteCount = $i; unset($rsSites); unset($arRes); $tabControl = new CAdmintabControl("tabControl", $aTabs); if($REQUEST_METHOD == "POST" && strlen($Update)>0 && $USER->CanDoOperation('lol_metrika_edit_all_settings') && check_bitrix_sessid()) { $arTokens = array(); if (isset($_POST['tokens'])) { $arTokens = $_POST['tokens']; foreach ($arTokens as $k => $token) { $token = trim($token); if (strlen($token) <= 0) unset($arTokens[$k]); else $arTokens[$k] = $token;
IncludeModuleLangFile(__FILE__); $arAllOptions = array(); // Получаем список сайтов $arSites = array(); $rsSites = CSite::GetList($by = 'sort', $order = 'asc', array()); while ($arRes = $rsSites->GetNext()) { $arSites[] = array('ID' => $arRes['ID'], 'NAME' => $arRes['NAME']); } // Получаем свойства контрагентов $arSaleProps = CDadataSuggestionsSettings::GetSettingsArray(); $tabControl = new CAdmintabControl('tabControl', array( array('DIV' => 'edit1', 'TAB' => GetMessage('MAIN_TAB_SET'), 'ICON' => ''), )); if (ToUpper($REQUEST_METHOD) == 'POST' && strlen($Update . $Apply . $RestoreDefaults) > 0 && ($POST_RIGHT == 'W' || $POST_RIGHT == 'X') && check_bitrix_sessid() ) { if (strlen($RestoreDefaults) > 0) { COption::RemoveOption($module_id); } else { foreach ($arSites as $arSite) { COption::SetOptionString($module_id, 'apikey', $_POST['apikey_' . $arSite['ID']], GetMessage('OPT_APIKEY'), $arSite['ID']); COption::SetOptionString($module_id, 'enabled', $_POST['enabled_on_' . $arSite['ID']], GetMessage('OPT_SERVICE_ON'), $arSite['ID']); COption::SetOptionString($module_id, 'mapping', serialize(CDadataSuggestionsSettings::GetMappingFromPost($arSite['ID'])), GetMessage('OPT_MAPPING'), $arSite['ID']);