This file contains hidden or 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
#!/usr/bin/php | |
<?php | |
$_SERVER['DOCUMENT_ROOT'] = '/home/site/www'; | |
$DOCUMENT_ROOT = $_SERVER['DOCUMENT_ROOT']; | |
// Запрешяем сбор статистики | |
define('NO_KEEP_STATISTIC', true); | |
// Запрет на проверку прав | |
define('NOT_CHECK_PERMISSIONS', true); | |
// Отключам лимит | |
set_time_limit(0); |
This file contains hidden or 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
<?=number_format($value,0, '', ' ')?> |
This file contains hidden or 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
# Ide # | |
.classpath | |
.project | |
.settings | |
.idea | |
.metadata | |
*.iml | |
*.ipr | |
# Compiled source # |
This file contains hidden or 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
// Функция сортировки товаров | |
function sortCatalog(products, section, reverse = false) { | |
// Переменные | |
var arProductsList = []; | |
var strHtml = ''; | |
// Переделываем в массив | |
products.each(function (e) { | |
arProductsList.push(products[e]); | |
}); |
This file contains hidden or 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
<?$APPLICATION->IncludeComponent('bitrix:main.include', '', ['AREA_FILE_SHOW' => 'file', 'PATH' => ''], false);?> |
This file contains hidden or 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
CJSCore::Init(array('window')); | |
/** | |
* Формирует ссылку на попап | |
* @param array $arInput | |
* | |
* @return string; | |
* */ | |
function createLinkPopup($arInput){ | |
$arDefault = [ | |
'width' => 500, |
This file contains hidden or 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
grep -rnwl '/var/www/' -e "IR1435IF" |
This file contains hidden or 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
// Для папки | |
[PATH=/home/bitrix/www/] | |
mbstring.func_overload = 0 | |
// Для сайта | |
[HOST=test.ru] | |
mbstring.func_overload = 0 |
This file contains hidden or 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
RESTORE='\033[0m' | |
RED='\033[00;31m' | |
GREEN='\033[00;32m' | |
YELLOW='\033[00;33m' | |
BLUE='\033[00;34m' | |
PURPLE='\033[00;35m' | |
CYAN='\033[00;36m' | |
LIGHTGRAY='\033[00;37m' |
This file contains hidden or 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\Main\Data\Cache; | |
$cache = Cache::createInstance(); // получаем экземпляр класса | |
if ($cache->initCache(7200, 'cache_key' . BX_CACHE_SID)) { // проверяем кеш и задаём настройки | |
$vars = $cache->getVars(); // достаем переменные из кеша | |
} | |
elseif ($cache->startDataCache()) { | |
// некоторые действия... | |
$cache->endDataCache(array('key' => 'value')); // записываем в кеш | |
} |
NewerOlder