<?php
//[[!getParents?&resources=`1,2,3`]]
if(!empty($resources)){
$resources = explode(",",$resources);
$arr = [];
foreach($resources as $id){
$parentIds = $modx->getParentIds($id, 10, array('context' => 'web'));
$arr[] = $parentIds[0];
}
$arr = array_unique($arr);
$arr = implode(",",$arr);
return $arr;
}
<?
if ($arResult['DATA_SAVED'] == 'Y' AND $arResult["USER_PROPERTIES"]["SHOW"] == "Y")// заменяю иф в самом начале
ShowNote(GetMessage('PROFILE_DATA_SAVED'));
?>
<input type="text" name="UF_VK" maxlength="255" value="<?=$arResult["USER_PROPERTIES"]["DATA"]["UF_VK"]["VALUE"]?>" />
<?
//вывожу дату
$IBLOCK_ID = intval($arParams['IBLOCK_ID']);
//print $IBLOCK_ID;
if(!CModule::IncludeModule("iblock"))
die('iblock module is not included!');
$arSort = Array("SORT"=>"ASC", "NAME"=>"ASC");
$arSelect = Array("ID","NAME","PROPERTY_DATA_SOBYTIYA");
$arFilter = Array("IBLOCK_ID"=>$IBLOCK_ID,"ACTIVE" => "Y", ">=DATE_ACTIVE_FROM" => $curdate, "PROPERTY" => array('ADD_TO_EVENTS' => array('VALUE' => 'Y')), "<=DATE_ACTIVE_FROM" => $curdatelast);
$arFilterDate = Array("IBLOCK_ID" => $IBLOCK_ID);
$obIBlockResult = CIBlockElement::GetList($arSort, $arFilter, false, false, $arSelect);
$arFilter = $obIBlockResult->GetNext();
?>
<?require($_SERVER['DOCUMENT_ROOT'].'/bitrix/modules/main/include/prolog_before.php');?>
<head>
<?$APPLICATION->ShowHead()?>
</head>
<body>
<?$APPLICATION->ShowPanel();?>
<?$APPLICATION->IncludeComponent(
.....
);?>
<?require($_SERVER['DOCUMENT_ROOT'].'/bitrix/modules/main/include/epilog_after.php');?>
//Корректировка
if(isset($_POST[`edit`])){
$query="UPDATE blog SET tema=`$_POST[tema]`,text=`$_POST[text]` WHERE id=`$_POST[id]`";
$result = mysql_query($query);
unset($row);
}