14require(
$_SERVER[
"DOCUMENT_ROOT"].
"/bitrix/modules/main/include/prolog_admin_before.php");
15require(
$_SERVER[
"DOCUMENT_ROOT"].
"/bitrix/modules/main/include/prolog_admin_js.php");
30 'ARGS' =>
'component_name='.urlencode($_GET[
"component_name"]).
31 '&component_template='.urlencode($_GET[
"component_template"]).
32 '&template_id='.urlencode($_GET[
"template_id"]).
33 '&lang='.urlencode(LANGUAGE_ID).
35 '&src_path='.urlencode($_GET[
"src_path"]).
36 '&src_line='.intval($_GET[
"src_line"]).
37 '&src_site='.intval($_GET[
"src_site"]).
38 '&edit_file='.urlencode($_GET[
"edit_file"]).
39 '&back_path='.urlencode($_GET[
"back_path"]).
74 for (
$i = 0, $cnt =
count($arComponents);
$i < $cnt;
$i++)
76 $nLineFrom = substr_count(mb_substr(
$filesrc, 0, $arComponents[
$i][
"START"]),
"\n") + 1;
77 $nLineTo = substr_count(mb_substr(
$filesrc, 0, $arComponents[
$i][
"END"]),
"\n") + 1;
79 if ($nLineFrom <= $src_line && $nLineTo >=
$src_line)
81 if ($arComponents[
$i][
"DATA"][
"COMPONENT_NAME"] == $_GET[
"component_name"])
118 $sTemplateName = trim($_POST[
"TEMPLATE_NAME"]);
119 if($sTemplateName ==
'' || !CBitrixComponentTemplate::CheckName($sTemplateName))
120 $sTemplateName =
'.default';
122 if ($_POST[
"SITE_TEMPLATE"] != $_GET[
"template_id"] && $_POST[
"SITE_TEMPLATE"] !=
".default")
123 $_POST[
"USE_TEMPLATE"] =
"N";
127 if (isset($_POST[
"USE_TEMPLATE"]) && $_POST[
"USE_TEMPLATE"] ==
"Y")
139 $strJSText =
'window.location = window.location.href;';
141 if (isset($_POST[
"EDIT_TEMPLATE"]) && $_POST[
"EDIT_TEMPLATE"] ==
"Y")
143 $component =
new CBitrixComponent();
144 if ($component->InitComponent(
$arComponent[
"DATA"][
"COMPONENT_NAME"], $_POST[
"TEMPLATE_NAME"]))
146 if ($component->InitComponentTemplate(
$_REQUEST[
"edit_file"], $_POST[
"SITE_TEMPLATE"]))
153 'URL' =>
'/bitrix/admin/public_file_edit_src.php?lang='.LANGUAGE_ID.
'&site='.
SITE_ID.
'&back_url='.urlencode(
$_REQUEST[
"back_path"]).
'&path='.urlencode(
$template->GetFile()),
154 "PARAMS" => Array(
"width" => 770,
"height" => 570,
"resize" =>
true,
"dialog_type" =>
'EDITOR',
"min_width" => 700,
"min_height" => 400),
188 $sIcon =
"/bitrix/images/fileman/htmledit2/component.gif";
201<p
class=
"note" title=
"<?echo GetMessage("comp_prop_path
")?>"><a href=
"/bitrix/admin/fileman_admin.php?lang=<?echo LANGUAGE_ID?>&path=<?echo urlencode($localPath)?>"><?echo
htmlspecialcharsbx($_GET[
"component_name"])?></a></p>
203if (isset($_GET[
'system_template']) && $_GET[
'system_template'] ==
'Y')
210 echo
'<script>jsPopup.AdjustShadow()</script>';
217<input type=
"hidden" name=
"action" value=
"save" />
219window.CheckSiteTemplate =
function(el)
221 var bList = (el.id ==
'SITE_TEMPLATE_sel');
222 if(el.form.USE_TEMPLATE)
224 el.form.USE_TEMPLATE.disabled = bList;
225 el.form.USE_TEMPLATE.checked = !bList;
227 el.form.SITE_TEMPLATE[el.form.SITE_TEMPLATE.length-1].disabled = !bList;
230<table cellspacing=
"0" class=
"bx-width100">
232 <td
class=
"bx-popup-label bx-width50"><?=
GetMessage(
"comp_templ_cur_template") ?>:</td>
236$arSiteTemplates =
array(
".default"=>
GetMessage(
"comp_templ_def_templ"));
239 $arSiteTemplates[$ar_site_templates[
'ID']] = $ar_site_templates[
'NAME'];
245 <td
class=
"bx-popup-label bx-width50"><?=
GetMessage(
"comp_templ_cur_site_template")?>:</td>
252 <td
class=
"bx-popup-label bx-width50"><?=
GetMessage(
"comp_templ_new_tpl") ?>:</td>
264 if(mb_strpos($templ[
"NAME"],
$def) === 0 && ($v = intval(mb_substr($templ[
"NAME"], mb_strlen(
$def))))>
$max)
267 <input type=
"text" name=
"TEMPLATE_NAME" value=
"<?echo (!empty($_REQUEST["TEMPLATE_NAME
"]) ? htmlspecialcharsbx($_REQUEST["TEMPLATE_NAME
"]) : htmlspecialcharsbx($def).($max+1)); ?>">
270 <input type=
"hidden" name=
"TEMPLATE_NAME" value=
"<?echo $sCurrentTemplateName?>">
275 <td
class=
"bx-popup-label bx-width50" valign=
"top"><?=
GetMessage(
"comp_templ_new_template") ?>:</td>
277<input type=
"radio" name=
"SITE_TEMPLATE" value=
".default" id=
"SITE_TEMPLATE_def"<?
if(empty(
$_REQUEST[
"SITE_TEMPLATE"]) ||
$_REQUEST[
"SITE_TEMPLATE"] ==
".default") echo
" checked"?> onclick=
"CheckSiteTemplate(this)"><label
for=
"SITE_TEMPLATE_def"><?echo
GetMessage(
"template_copy_def")?> / .default (<?echo
GetMessage(
"comp_templ_def_templ")?>)</label><br>
278<?
if($_GET[
"template_id"] <>
"" && $_GET[
"template_id"] <>
".default"):?>
279<input type=
"radio" name=
"SITE_TEMPLATE" value=
"<?echo htmlspecialcharsbx($_GET["template_id
"])?>" id=
"SITE_TEMPLATE_cur"<?
if(isset(
$_REQUEST[
"SITE_TEMPLATE"]) &&
$_REQUEST[
"SITE_TEMPLATE"] == $_GET[
"template_id"]) echo
" checked"?> onclick=
"CheckSiteTemplate(this)"><label
for=
"SITE_TEMPLATE_cur"><?echo
GetMessage(
"template_copy_cur")?> / <?echo
htmlspecialcharsbx($_GET[
"template_id"])?><?
if($arSiteTemplates[$_GET[
"template_id"]] <>
'') echo
" (".$arSiteTemplates[$_GET[
"template_id"]].
")"?></label><br>
282$bList = (!empty(
$_REQUEST[
"SITE_TEMPLATE"]) &&
$_REQUEST[
"SITE_TEMPLATE"] <> $_GET[
"template_id"] &&
$_REQUEST[
"SITE_TEMPLATE"] <>
".default")
284<input type=
"radio" name=
"SITE_TEMPLATE" value=
"" id=
"SITE_TEMPLATE_sel"<?
if($bList) echo
" checked"?> onclick=
"CheckSiteTemplate(this)"><label
for=
"SITE_TEMPLATE_sel"><?echo
GetMessage(
"template_copy_sel")?></label>
285 <
select name=
"SITE_TEMPLATE"<?
if(!$bList) echo
" disabled"?>>
287 foreach($arSiteTemplates as $templ_id=>$templ_name):
288 if($templ_id ==
".default" || $templ_id == $_GET[
"template_id"])
298 <td
class=
"bx-popup-label bx-width50"><?=
GetMessage(
"comp_templ_use") ?>:</td>
300 <input type=
"checkbox" name=
"USE_TEMPLATE" value=
"Y"<?
if (!(isset(
$_REQUEST[
"action"]) &&
$_REQUEST[
"action"] ==
"save" &&
$_REQUEST[
"USE_TEMPLATE"] <>
"Y")) echo
" checked";?><?
if($bList) echo
" disabled"?>>
304<?
if(
$USER->CanDoOperation(
'edit_php')):?>
306 <td
class=
"bx-popup-label bx-width50"><?=
GetMessage(
"comp_templ_edit") ?>:</td>
308 <input type=
"checkbox" name=
"EDIT_TEMPLATE" value=
"Y"<?
if (!(isset(
$_REQUEST[
"action"]) &&
$_REQUEST[
"action"] ==
"save" &&
$_REQUEST[
"EDIT_TEMPLATE"] <>
"Y")) echo
" checked";?>>
317require(
$_SERVER[
"DOCUMENT_ROOT"].
"/bitrix/modules/main/include/epilog_admin_js.php");
if($canUseYandexMarket) $strWarning
static GetComponentDescr($componentName)
static GetTemplatesList($componentName, $currentTemplate=false)
static CopyTemplate($componentName, $templateName, $siteTemplate, $newSiteTemplate, $newName=false, $bRewrite=false)
static GetList($arOrder=array(), $arFilter=array(), $arSelect=false)
static ParseScript($scriptContent)
if( $strWarning=="") if($strWarning=="") $componentPath
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
$_SERVER["DOCUMENT_ROOT"]
if(!is_null($config))($config as $configItem)(! $configItem->isVisible()) $code
check_bitrix_sessid($varname='sessid')
htmlspecialcharsbx($string, $flags=ENT_COMPAT, $doubleEncode=true)
IncludeModuleLangFile($filepath, $lang=false, $bReturnArray=false)
GetMessage($name, $aReplace=null)
getLocalPath($path, $baseFolder="/bitrix")
ShowNote($strNote, $cls="notetext")
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
<? 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."%"
foreach($arTemplatesList as $templ) if(mb_strpos($templ["NAME"] $def