14if (!Loader::includeModule(
'iblock'))
26 array(
"property_features_enabled",
GetMessage(
"IBLOCK_PROPERTY_FEATURES"),
"Y",
array(
"checkbox",
"Y")),
29 GetMessage(
'IBLOCK_OPTION_SECTION_LIST_AND_FORM'),
34 array(
"excel_export_rights",
GetMessage(
"IBLOCK_EXCEL_EXPORT_RIGHTS"),
"N",
array(
"checkbox",
"Y")),
35 array(
"list_full_date_edit",
GetMessage(
"IBLOCK_LIST_FULL_DATE_EDIT"),
"N",
array(
"checkbox",
"Y")),
36 array(
"combined_list_mode",
GetMessage(
"IBLOCK_COMBINED_LIST_MODE"),
"N",
array(
"checkbox",
"Y")),
37 array(
"iblock_menu_max_sections",
GetMessage(
"IBLOCK_MENU_MAX_SECTIONS"),
"50",
array(
"text", 5)),
38 array(
"change_user_by_group_active_modify",
GetMessage(
"IBLOCK_OPTION_CHANGE_USER_BY_GROUP_ACTIVE_MODIFY"),
"N",
array(
"checkbox",
"N")),
39 GetMessage(
'IBLOCK_OPTION_SECTION_CUSTOM_FORM'),
40 array(
"custom_edit_form_use_property_id",
GetMessage(
"IBLOCK_CUSTOM_FORM_USE_PROPERTY_ID"),
"Y",
array(
"checkbox",
"Y")),
41 GetMessage(
'IBLOCK_OPTION_SECTION_IMPORT_EXPORT'),
45 array(
"DIV" =>
"edit1",
"TAB" =>
GetMessage(
"MAIN_TAB_SET"),
"ICON" =>
"ib_settings",
"TITLE" =>
GetMessage(
"MAIN_TAB_TITLE_SET")),
46 array(
"DIV" =>
"iblock_cache",
"TAB" =>
GetMessage(
"IBLOCK_OPTION_TAB_CACHE"),
"TITLE" =>
GetMessage(
"IBLOCK_OPTION_TAB_CACHE_TITLE"))
50$request = Main\Context::getCurrent()->getRequest();
53if (
$request->getPost(
'Update') !==
null)
77 if (!is_array($arOption))
86 if ($arOption[3][0] ===
"checkbox")
94 $period = (int)
$request->getPost(
'iblock_activity_dates_period');
97 $period = (int)
$request->getPost(
'iblock_activity_dates_period_custom');
101 $oldPeriod = (int)
Main\
Config\Option::get(
'iblock',
'iblock_activity_dates_period');
113 if ($oldActivity !==
'')
115 $oldActivity = explode(
',', $oldActivity);
125 if ($oldPeriod != $period)
127 $removeAgents = $oldActivity;
132 $removeAgents = array_diff($oldActivity,
$activity);
133 $addAgents = array_diff(
$activity, $oldActivity);
136 if (!empty($removeAgents))
143 'MODULE_ID' =>
'iblock',
144 'NAME' =>
'\CIBlock::checkActivityDatesAgent(' .
$iblockId .
',%',
149 CAgent::Delete($row[
'ID']);
156 if (!empty($addAgents))
158 $currentTime = time();
162 '\CIBlock::checkActivityDatesAgent('.
$iblockId.
', '.$currentTime.
');',
189 .
'?lang=' . LANGUAGE_ID
190 .
'&mid=' . urlencode(
$mid)
234 -1 =>
GetMessage(
'IBLOCK_OPTION_CHECK_ACTIVITY_PERIOD_CUSTOM'),
235 3600 =>
GetMessage(
'IBLOCK_OPTION_CHECK_ACTIVITY_PERIOD_ONE_HOUR'),
236 10800 =>
GetMessage(
'IBLOCK_OPTION_CHECK_ACTIVITY_PERIOD_THREE_HOUR'),
237 21600 =>
GetMessage(
'IBLOCK_OPTION_CHECK_ACTIVITY_PERIOD_SIX_HOUR'),
238 43200 =>
GetMessage(
'IBLOCK_OPTION_CHECK_ACTIVITY_PERIOD_TWELVE_HOUR'),
239 86400 =>
GetMessage(
'IBLOCK_OPTION_CHECK_ACTIVITY_PERIOD_DAY')
248 'IBLOCK_PROPERTY_FEATURES_HINT',
249 [
'#LINK#' =>
'https://dev.1c-bitrix.ru/learning/course/index.php?COURSE_ID=42&LESSON_ID=1986']
251 'change_user_by_group_active_modify' =>
GetMessage(
'IBLOCK_OPTION_CHANGE_USER_BY_GROUP_ACTIVE_MODIFY_HINT')
255?><form method=
"post" action=
"<?= $APPLICATION->GetCurPage()?>?lang=<?= LANGUAGE_ID; ?>&mid=<?= urlencode($mid); ?>&mid_menu=1"><?php
259 if (!is_array($arOption))
261 ?><tr
class=
"heading"><td colspan=
"2"><?=
htmlspecialcharsbx($arOption); ?></td></tr><?php
267 $type = $arOption[3];
271 <td
style=
"width: 40%; white-space: nowrap;"<?= (
$type[0] ===
'textarea' ?
' class="adm-detail-valign-top"' :
''); ?>>
275 ?><span
id=
"hint_<?= $controlId; ?>"></span>
276 <script>BX.hint_replace(BX(
'hint_<?=$controlId;?>'),
'<?=\CUtil::JSEscape($optionHints[$id]); ?>');</script>&
nbsp;<?php
284 ?><input type=
"hidden" name=
"<?=$controlId; ?>" value=
"N">
285 <input type=
"checkbox" id=
"<?=$controlId; ?>" name=
"<?=$controlId; ?>" value=
"Y"<?=(
$val ==
"Y" ?
" checked" :
""); ?>><?php
288 ?><input type=
"text" id=
"<?=$controlId; ?>" name=
"<?=$controlId; ?>" value=
"<?= htmlspecialcharsbx($val); ?>" size=
"<?=$type[1]; ?>" maxlength=
"255"><?php
291 ?><textarea
id=
"<?=$controlId; ?>" name=
"<?=$controlId; ?>" rows=
"<?=$type[1]; ?>" cols=
"<?=$type[2]; ?>"><?=
htmlspecialcharsbx(
$val); ?></textarea><?php
304 <td
style=
"width: 40%; white-space: nowrap;" class=
"adm-detail-valign-top"><?php
305 echo
GetMessage(
"IBLOCK_OPTION_CHECK_ACTIVITY_CACHE");
307 <td
style=
"width: 60%">
308 <table
id=
"iblockList" class=
"internal">
314 $iblockName = (string)CIBlock::GetArrayByID(
$iblockId,
'NAME');
315 if ($iblockName !==
'')
320 <input type=
"button" value=
"<?= htmlspecialcharsbx(GetMessage("IBLOCK_MESS_DELETE_ENTITY
")) ?>" onclick=
"deleteRow(this)">
321 <input type=
"hidden" name=
"IBLOCK_ACTIVITY_DATES[]" value=
"<?= $iblockId; ?>">
331 function deleteRow(button)
333 var my_row = button.parentNode.parentNode,
334 table = document.getElementById(
'iblockList'),
336 if (BX.type.isElementNode(table))
338 for(i = 0; i < table.rows.length; i++)
340 if (table.rows[i] === my_row)
347 function InS<?= md5(
"input_IBLOCK_LIST")?>(iblockId, iblockName)
349 var table = document.getElementById(
'iblockList'),
353 if (BX.type.isElementNode(table))
355 if(iblockId !==
'' && iblockName !==
'')
357 oRow = table.insertRow(-1);
360 oCell = oRow.insertCell(i++);
361 oCell.innerHTML =
'['+iblockId +
'] ' + BX.util.htmlspecialchars(iblockName);
363 oCell = oRow.insertCell(i++);
365 '<input type="button" value="<?=htmlspecialcharsbx(GetMessage("IBLOCK_MESS_DELETE_ENTITY")); ?>" OnClick="deleteRow(this)">'+
366 '<input type="hidden" name="IBLOCK_ACTIVITY_DATES[]" value="'+iblockId+
'">';
371 <input name=
"input_IBLOCK_LIST" id=
"input_IBLOCK_LIST" type=
"hidden">
372 <input type=
"button" value=
"<?= htmlspecialcharsbx(GetMessage("IBLOCK_MESS_ADD_ENTITY
")); ?>" onClick=
"jsUtils.OpenWindow('/bitrix/admin/iblock_search.php?lang=<?=LANGUAGE_ID?>&n=input_IBLOCK_LIST&m=y', 900, 700);">
376 <td
style=
"width: 40%;"><?=
GetMessage(
"IBLOCK_OPTION_CHECK_ACTIVITY_PERIOD"); ?></td>
377 <td
style=
"width: 60%;">
378 <
select id=
"iblock_activity_dates_period" name=
"iblock_activity_dates_period"><?php
381 ?><option value=
"<?= $index; ?>"<?= ($index ==
$currentValues[
'iblock_activity_dates_period'] ?
' selected' :
'');?>><?=
htmlspecialcharsbx($value); ?></option><?php
386<tr
id=
"iblock_activity_dates_period_custom" style=
"display: <?=($currentValues['iblock_activity_dates_period'] == -1 ? 'table-row' : 'none');?>;">
388 <td
style=
"width: 60%;">
389 <input type=
"text" name=
"iblock_activity_dates_period_custom" value=
"<?= $currentValues['iblock_activity_dates_period_custom']; ?>"><?=
GetMessage(
'IBLOCK_OPTION_CHECK_ACTIVITY_PERIOD_CUSTOM_UNIT'); ?>
394 <input type=
"submit" name=
"Update" value=
"<?= GetMessage("MAIN_SAVE
")?>" title=
"<?= GetMessage("MAIN_OPT_SAVE_TITLE
")?>" class=
"adm-btn-save">
395 <input type=
"submit" name=
"Apply" value=
"<?= GetMessage("MAIN_OPT_APPLY
")?>" title=
"<?= GetMessage("MAIN_OPT_APPLY_TITLE
")?>">
398 <input type=
"button" name=
"Cancel" value=
"<?=GetMessage("MAIN_OPT_CANCEL
")?>" title=
"<?= GetMessage("MAIN_OPT_CANCEL_TITLE
")?>" onclick=
"window.location='<?= htmlspecialcharsbx(CUtil::addslashes($backUrl))?>'">
399 <input type=
"hidden" name=
"back_url_settings" value=
"<?= htmlspecialcharsbx($backUrl)?>">
403 <input type=
"submit" name=
"RestoreDefaults" title=
"<?= GetMessage("MAIN_HINT_RESTORE_DEFAULTS
")?>" OnClick=
"return confirm('<?= AddSlashes(GetMessage("MAIN_HINT_RESTORE_DEFAULTS_WARNING
"))?>')" value=
"<?= GetMessage("MAIN_RESTORE_DEFAULTS
")?>">
410function checkFeatures()
412 var featureControl = BX(
'property_features_enabled');
413 if (BX.type.isElementNode(featureControl))
415 if (featureControl.checked)
417 if (!confirm(
'<?= \CUtil::JSEscape(GetMessage('IBLOCK_OPTION_MESS_CHECK_FEATURES
')); ?>'))
418 featureControl.checked =
false;
422function checkCachePeriod()
424 var control = BX(
'iblock_activity_dates_period'),
425 block = BX(
'iblock_activity_dates_period_custom');
427 if (BX.type.isElementNode(control) && BX.type.isElementNode(block))
429 block.style.display = (control.value ===
'-1' ?
'table-row' :
'none');
433 var featureControl = BX(
'property_features_enabled'),
434 periodControl = BX(
'iblock_activity_dates_period');
439 if (BX.type.isElementNode(featureControl))
441 BX.bind(featureControl,
'click', checkFeatures);
446 if (BX.type.isElementNode(periodControl))
448 BX.bind(periodControl,
'change', checkCachePeriod);
if($_SERVER $arAllOptions['REQUEST_METHOD']=='GET' &&!empty($_REQUEST['RestoreDefaults']) &&! $bReadOnly &&check_bitrix_sessid())
if(!Loader::includeModule('catalog')) if(!AccessController::getCurrent() ->check(ActionDictionary::ACTION_PRICE_EDIT)) if(!check_bitrix_sessid()) $request
static delete($moduleId, array $filter=array())
static getDefaults($moduleId)
static get($moduleId, $name, $default="", $siteId=false)
static set($moduleId, $name, $value="", $siteId="")
static normalizeArrayValuesByInt(&$map, $sorted=true)
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
if($request->isPost() && $currentAction !==null &&check_bitrix_sessid()) $currentValues
if(!isset($periodList[$currentValues['iblock_activity_dates_period']])) $optionHints
if($request->getPost('Update') !==null) elseif( $request->getPost( 'Apply') !==null) elseif($request->getPost('RestoreDefaults') !==null) $backUrl
$_SERVER["DOCUMENT_ROOT"]
bitrix_sessid_post($varname='sessid', $returnInvocations=false)
check_bitrix_sessid($varname='sessid')
htmlspecialcharsbx($string, $flags=ENT_COMPAT, $doubleEncode=true)
IncludeModuleLangFile($filepath, $lang=false, $bReturnArray=false)
GetMessage($name, $aReplace=null)
LocalRedirect($url, $skip_security_check=false, $status="302 Found")
if( $daysToExpire >=0 &&$daysToExpire< 60 elseif)( $daysToExpire< 0)
<? endif;?> window document title