4use \Bitrix\Landing\Manager;
5use \Bitrix\Main\Localization\Loc;
6use \Bitrix\Main\SiteTemplateTable;
8if (!\
Bitrix\Main\Loader::includeModule(
'landing'))
25Loc::loadMessages(__FILE__);
30 static $iblocks =
null;
32 if ($iblocks !==
null)
38 if (\
Bitrix\Main\Loader::includeModule(
'iblock'))
42 $res = \CIBlockType::getList();
43 while($row =
$res->fetch())
45 if ($typeLang = \CIBlockType::getByIDLang($row[
'ID'], LANG))
47 $iblockTypes[$typeLang[
'IBLOCK_TYPE_ID']] = [
48 'NAME' => $typeLang[
'NAME'],
49 'SORT' => $typeLang[
'SORT']
55 $res = \CIBlock::getList([
'sort' =>
'asc']);
56 while ($row =
$res->GetNext(
true,
false))
58 if (!isset($iblocks[$row[
'IBLOCK_TYPE_ID']]))
60 $iblocks[$row[
'IBLOCK_TYPE_ID']] = [
61 'ID' => $row[
'IBLOCK_TYPE_ID'],
62 'NAME' => $iblockTypes[$row[
'IBLOCK_TYPE_ID']][
'NAME'],
63 'SORT' => $iblockTypes[$row[
'IBLOCK_TYPE_ID']][
'SORT'],
67 $iblocks[$row[
'IBLOCK_TYPE_ID']][
'ITEMS'][] = [
69 'NAME' => $row[
'NAME']
77 if (
$a[
'SORT'] == $b[
'SORT'])
81 return (
$a[
'SORT'] < $b[
'SORT']) ? -1 : 1;
104 while ($row =
$res->fetch())
113 Loc::getMessage(
'LANDING_OPT_SITE_TEMPLATE_ID') .
':',
118 Loc::getMessage(
'LANDING_OPT_SITE_TEMPLATE_ID_SITES')
123 'site_template_id_' . $row[
'LID'],
124 $row[
'NAME'] .
' [' . $row[
'LID'] .
']:',
132 Loc::getMessage(
'LANDING_OPT_PUB_PATH_HEADER'),
133 Loc::getMessage(
'LANDING_OPT_PUB_PATH_HELP')
138 'pub_path_' . $row[
'LID'],
139 $row[
'NAME'] .
' [' . $row[
'LID'] .
']:',
141 \
Bitrix\Landing\Manager::getPublicationPathConst()
148 Loc::getMessage(
'LANDING_OPT_OTHER')
150 if (Manager::isB24())
154 Loc::getMessage(
'LANDING_OPT_GOOGLE_IMAGES_KEY') .
':',
159 Loc::getMessage(
'LANDING_OPT_PORTAL_URL') .
' (host[:port]):',
164 'deleted_lifetime_days',
165 Loc::getMessage(
'LANDING_OPT_DELETED_LIFETIME_DAYS') .
':',
169 'history_lifetime_days',
170 Loc::getMessage(
'LANDING_OPT_HISTORY_LIFETIME') .
':',
173 if (Manager::isB24())
176 'rights_extended_mode',
177 Loc::getMessage(
'LANDING_OPT_RIGHTS_EXTENDED_MODE') .
':',
182 'public_hook_on_save',
183 Loc::getMessage(
'LANDING_OPT_PUBLIC_HOOK_ON_SAVE') .
':',
188 Loc::getMessage(
'LANDING_OPT_ALLOW_SVG_CONTENT') .
':',
198 Loc::getMessage(
'LANDING_OPT_SOURCE_IBLOCKS') .
':',
202 'multiple="multiple" size="10"'
208 array(
'DIV' =>
'edit1',
'TAB' => Loc::getMessage(
'MAIN_TAB_SET'),
'ICON' =>
''),
209 array(
'DIV' =>
'edit2',
'TAB' => Loc::getMessage(
'MAIN_TAB_RIGHTS'),
'ICON' =>
'')
224 if ($arOption[0] ==
'header')
228 $name = $arOption[0];
229 if ($arOption[2][0] ==
'text-list')
232 for ($j = 0; $j <
count($$name); $j++)
234 if (trim(${
$name}[$j]) <>
'')
240 elseif ($arOption[2][0] ==
'doubletext')
245 $arOption[2][0] ==
'selectbox' ||
246 $arOption[2][0] ==
'selectboxtree'
252 for ($j=0; $j<
count($$name); $j++)
254 if (trim(${
$name}[$j]) <>
'')
266 if ($arOption[2][0] ==
'checkbox' &&
$val<>'Y')
274 $prefix =
'site_template_id_';
275 if ($arOption[0] ==
'site_template_id')
277 $valOld = trim(\COption::getOptionString(
289 '=TEMPLATE' => $valOld
292 while ($row =
$res->fetch())
294 SiteTemplateTable::update($row[
'ID'], [
301 elseif (strpos($arOption[0], $prefix) === 0)
303 $valDefault = trim(\COption::getOptionString(
307 $valOld = \COption::getOptionString(
313 $siteId = substr($arOption[0], strlen($prefix));
317 '=TEMPLATE' => $valOld ? $valOld : $valDefault
320 while ($row =
$res->fetch())
322 SiteTemplateTable::update($row[
'ID'], [
323 'TEMPLATE' =>
$val ?
$val : $valDefault
341 require_once(
$docRoot .
'/bitrix/modules/main/admin/group_rights.php');
352 '?mid=' . urlencode(
$mid) .
353 '&lang=' . urlencode(LANGUAGE_ID) .
354 '&back_url_settings=' . urlencode(
$backUrl) .
359 ?><form method=
"post" action=
"<?= $APPLICATION->GetCurPage()?>?mid=<?= urlencode($mid)?>&lang=<?= LANGUAGE_ID?>"><?php
371 <?php
if (isset(
$Option[2])):?>
387 $val = \COption::getOptionString(
394 <td valign=
"top" width=
"40%"><?php
395 if (
$type[0]==
'checkbox')
404 <td valign=
"middle" width=
"60%"><?php
405 if (
$type[0] ==
'checkbox'):
406 ?><input type=
"checkbox" name=
"<?= \htmlspecialcharsbx($Option[0])?>" id=
"<?= \htmlspecialcharsbx($Option[0])?>" value=
"Y"<?php
if(
$val ==
'Y') echo
' checked="checked"';?> /><?php
408 ?><input type=
"text" size=
"<?= $type[1]?>" maxlength=
"255" value=
"<?= \htmlspecialcharsbx($val)?>" name=
"<?= \htmlspecialcharsbx($Option[0])?>" /><?php
410 list($val1, $val2) = explode(
'x',
$val);
411 ?><input type=
"text" size=
"<?= $type[1]?>" maxlength=
"255" value=
"<?= \htmlspecialcharsbx($val1)?>" name=
"<?= \htmlspecialcharsbx($Option[0].'_1')?>" /><?php
412 ?><input type=
"text" size=
"<?= $type[1]?>" maxlength=
"255" value=
"<?= \htmlspecialcharsbx($val2)?>" name=
"<?= \htmlspecialcharsbx($Option[0].'_2')?>" /><?php
414 ?><textarea rows=
"<?= $type[1]?>" cols=
"<?= $type[2]?>" name=
"<?= \htmlspecialcharsbx($Option[0])?>"><?= \
htmlspecialcharsbx(
$val)?></textarea><?php
416 $aVal = explode(
",",
$val);
417 for($j=0; $j<
count($aVal); $j++):
418 ?><input type=
"text" size=
"<?= $type[2]?>" value=
"<?= \htmlspecialcharsbx($aVal[$j])?>" name=
"<?= \htmlspecialcharsbx($Option[0]).'[]'?>" /><br /><?php
420 for($j=0; $j<
$type[1]; $j++):
421 ?><input type=
"text" size=
"<?= $type[2]?>" value=
"" name=
"<?= \htmlspecialcharsbx($Option[0]).'[]'?>" /><br /><?php
427 ?><
select name=
"<?= \htmlspecialcharsbx($Option[0])?>[]"<?=
$type[2]?>><?php
437 $output .=
'<option></option>';
440 $strIBlocksCpGr =
'';
441 foreach ($rowType[
'ITEMS'] as $rowIb)
445 $sel =
' selected="selected"';
451 $strIBlocksCpGr .=
'<option value="' . $rowIb[
'ID'] .
'"' . $sel .
'>' .
455 if ($strIBlocksCpGr !=
'')
457 $output .=
'<optgroup label="'.$rowType[
'NAME'].
'">';
472 require_once(
$docRoot .
'/bitrix/modules/main/admin/group_rights.php');
476 <input <?php
if (
$postRight <
'W') echo
'disabled="disabled"' ?> type=
"submit" name=
"Update" value=
"<?= Loc::getMessage('MAIN_SAVE')?>" title=
"<?= Loc::getMessage('MAIN_OPT_SAVE_TITLE')?>" />
477 <input <?php
if (
$postRight <
'W') echo
'disabled="disabled"' ?> type=
"submit" name=
"Apply" value=
"<?= Loc::getMessage('MAIN_OPT_APPLY')?>" title=
"<?= Loc::getMessage('MAIN_OPT_APPLY_TITLE')?>" />
479 <input <?php
if (
$postRight <
'W') echo
'disabled="disabled"' ?> type=
"button" name=
"Cancel" value=
"<?= Loc::getMessage('MAIN_OPT_CANCEL')?>" title=
"<?= Loc::getMessage('MAIN_OPT_CANCEL_TITLE')?>" onclick=
"window.location='<?= \htmlspecialcharsbx(CUtil::addslashes($backUrl))?>'" />
480 <input type=
"hidden" name=
"back_url_settings" value=
"<?=\htmlspecialcharsbx($backUrl)?>" />
if(!Loader::includeModule('catalog')) if(!AccessController::getCurrent() ->check(ActionDictionary::ACTION_PRICE_EDIT)) if(!check_bitrix_sessid()) $request
static getList(array $parameters=array())
bx popup label bx width30 PAGE_NEW_MENU_NAME text width
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
if($request->getPost('Update') !==null) elseif( $request->getPost( 'Apply') !==null) elseif($request->getPost('RestoreDefaults') !==null) $backUrl
for($j=0; $j< count($aVal); $j++) for( $j=0;$j< $type[1];$j++) elseif($type[0]=='selectbox') $arr_keys
while($row=$res->fetch()) $allOptions[]
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)
LocalRedirect($url, $skip_security_check=false, $status="302 Found")
global_menu_<?echo $menu["menu_id"]?> adm main menu item icon adm main menu item text text adm main menu hover adm submenu menucontainer menu_id menu_id items_id items_id desktop menu_id block none adm global submenu<?=($subMenuDisplay=="block" ? " adm-global-submenu-active" :"")?> global_submenu_<?echo $menu["menu_id"]?> text MAIN_PR_ADMIN_FAV items adm submenu items wrap adm submenu items stretch wrap BX adminMenu itemsStretchScroll()"> <table class if (!empty( $menu["items"])) elseif ( $menu[ 'menu_id']=='desktop') if ( $menu[ 'menu_id']=='desktop') endforeach
if( $daysToExpire >=0 &&$daysToExpire< 60 elseif)( $daysToExpire< 0)
<? endif;?> window document title
</p ></td >< td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;padding:0cm 2.0pt 0cm 2.0pt;height:9.0pt'>< p class=Normal align=center style='margin:0cm;margin-bottom:.0001pt;text-align:center;line-height:normal'>< a name=ТекстовоеПоле54 ></a ><?=($taxRate > count( $arTaxList) > 0) ? $taxRate."%"