<?if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();?>
<?$this->__component->SetResultCacheKeys(array("CACHED_TPL"));?>
<?
$this->__component->arResult["CACHED_TPL"] = @ob_get_contents();
ob_get_clean();
?>
<?if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();?>
<?
$content = $arResult["CACHED_TPL"];
$content = preg_replace_callback(
"/#VOTE_ID_([\d]+)#/is".BX_UTF_PCRE_MODIFIER,
function ($matches) {
ob_start();
/*component 1 here*/
$returnStr = @ob_get_contents();
ob_get_clean();
return $returnStr;
},
$content);
$content = preg_replace_callback2(
"/#VOTE_ID_TWO_([\d]+)#/is".BX_UTF_PCRE_MODIFIER,
function ($matches2) {
ob_start();
/*component 2 here*/
$returnStr = @ob_get_contents();
ob_get_clean();
return $returnStr;
},
$content);
echo $content;
const text = `Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque faucibus justo id metus fringilla, nec bibendum sem vulputate. Vivamus nec ex ut risus luctus tincidunt ac et lacus. Mauris molestie laoreet tortor non fermentum. Vestibulum tincidunt nulla quis feugiat pharetra. Donec non posuere purus. Donec mattis convallis augue, ut semper justo varius vel. Proin tristique dui ac elit tempor molestie. Nulla nec ultricies nunc.`;
const parts = text.split(/(?<=[.?!]\s)/);
parts.shift();parts.shift();
console.log( parts.join("") );
AddMessage2Log("SetTitle called with {$title}", "main", 20);
$APPLICATION->SetPageProperty("my_custom_h1", "Здесь мой заголовок" );
function myHeaderSetter() {
global $APPLICATION;
$h1 = trim( $APPLICATION->GetPageProperty('my_custom_h1', '') );
if ( $h1 !== '' ) {
$APPLICATION->SetTitle($h1);
}
}
AddEventHandler("main", "OnEpilog", "myHeaderSetter", 10000 );
$componentPage = $engine->guessComponentPath(
$date = new Bitrix\Main\Type\DateTime;
$date->setTime(0, 0);
// если дата мероприятия хранится в поле "начало активности"
$GLOBALS['eventFilter'] = [
'><ACTIVE_FROM' => [ strval($date), strval( $date->add("+1 week") ) ]
];
// для свойства предлагают другой формат:
$GLOBALS['eventFilter'] = [
'>=PROPERTY_DATE' => [ strval($date) ],
'<=PROPERTY_DATE' => [ strval( $date->add("+1 week") ) ],
];
$searchFilter = array(
'*SEARCHABLE_CONTENT' => $searchQuery
);
"FILTER_NAME" => $searchFilter
"FILTER_NAME" => 'searchFilter'
$GLOBALS['searchFilter'] = array( '%SEARCHABLE_CONTENT' => $searchQuery, );
UPDATE `b_user` SET `BLOCKED`='N' WHERE `BLOCKED`='Y'
Получается, что в этом случае не нужно создавать сессию в PHP с помощью session_start()?
$APPLICATION->IncludeComponent(
"ns:component",
"templateName",
array(
"BLOCK_NUMBER_LIST" => array(
0 => "200+",
1 => "80+",
2 => "1150+",
3 => "",
),
"BLOCK_TEXT_LIST" => array(
0 => "работ по монтажу",
1 => "наименований в наличии",
2 => "установлено камер",
3 => "",
),
),
false
);
$GLOBALS['blocks'] = [
["200+", "работ по монтажу", ],
["80+", "наименований в наличии", ],
["1150+", "установлено камер", ],
];
$APPLICATION->IncludeComponent(
"ns:component",
"templateName",
array(
"BLOCK_DATA_KEY" => "blocks",
),
false
);
$APPLICATION->IncludeComponent(
"ns:component",
"templateName",
array(
"BLOCK_DATA" => [
["200+", "работ по монтажу", ],
["80+", "наименований в наличии", ],
["1150+", "установлено камер", ],
],
),
false
);
'filter' => [
'>DATE_CREATE' => "2021.11.26 00:00:00",
]