$CurrentPage = file_get_contents("/tpl/auth.tpl");
$result = "Название переменной = ".$favIds.$CurrentPage;
file_put_contents("/tpl/auth.tpl", $result);
while($element = $elementList->Fetch()){
if($Schyt >= 10){
break;
}
if($Schyt == 0){
if($type == 'previousProduct'){
$IdLastProduct = $element['ID'];
} else {
$IdFirstProduct = $element['ID'];
}
}
$inlineButton = [
["text" => $this->SMILE["BOOK_YELLOW"].$element['NAME'], "callback_data" => $param . "~" . $element['ID']],
];
if($type != 'previousProduct'){
$IdLastProduct = $element['ID'];
} else {
$IdFirstProduct = $element['ID'];
}
$SECTION_ID = $element['IBLOCK_SECTION_ID'];
if($type == 'previousProduct'){
array_unshift($ListButton, $inlineButton);
} else {
array_push($ListButton, $inlineButton);
}
$Schyt++;
}