This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
include $_SERVER['DOCUMENT_ROOT'].'/bitrix/modules/main/include/prolog_before.php'; | |
use | |
\Bitrix\Highloadblock\HighloadBlockTable as HighloadBlockTable; | |
array_map('\Bitrix\Main\Loader::includeModule', | |
Array( | |
'iblock', | |
'highloadblock' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
use | |
\Bitrix\Highloadblock\HighloadBlockTable as HighloadBlockTable; | |
/** Кэширование Highload блоков */ | |
class CacheHB | |
{ | |
const DEF_CACHE_FOLDER = 'cache'; | |
const DEF_CACHE_TIME = 36000; | |
const DEF_CACHE_TIME_HBT = 36000; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
define("NO_AGENT_CHECK", true); | |
require_once $_SERVER['DOCUMENT_ROOT'].'/bitrix/modules/main/include/prolog_before.php'; | |
/** | |
* API | |
* | |
* https://docs.phalconphp.com/ru/latest/api/index.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** Возвращает разделы и вложенные подразделы в иерархическом виде */ | |
function getSectionList($filter, $select) | |
{ | |
$dbSection = CIBlockSection::GetList( | |
Array( | |
'DEPTH_LEVEL' => 'ASC', | |
'SORT' => 'ASC' | |
), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
/** | |
* Загрузка изображение к товаров из папки | |
* | |
* PROPS: | |
* Фотографии [PHOTO] | |
* Alt-тег для фото [ALT_TAG_PHOTO] | |
* Не нужен водяной знак [NO_WATER_MARK] | |
* Индекс SORT [SORT_PHOTO] | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function parseParams($str) | |
{ | |
if( !empty($str) ){ | |
preg_match_all('/([^>=]+)=([^>=]+)?/', $str, $arOptions); | |
return array_combine($arOptions[1], $arOptions[2]); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function array_values_recursive($ar, $field) | |
{ | |
if( !empty($field) && array_key_exists($field, $ar) ){ | |
$arTemp = &$ar[$field]; | |
if( is_array($arTemp) ){ | |
$arTemp = array_values($arTemp); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Exchanges; | |
/** | |
* Связка ФИАС (kladr-api.ru) с 1С-Битрикс местоположениями версии 2.0 (города/села) по ZIP коду | |
* | |
* https://kladr-api.ru/ | |
* https://dev.1c-bitrix.ru/learning/course/?COURSE_ID=43&LESSON_ID=3570 | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** Выводит / возвращает Dump SQL запроса Bitrix D7 и старого ядра */ | |
if( !function_exists('_dumpSQL') ){ | |
function _dumpSQL(callable $callback, array $params = []) | |
{ | |
$result = []; | |
if($params['user'] == 'all' || $GLOBALS['USER']-> isAdmin() ){ |
OlderNewer