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
<? | |
$str = "Создание символьного кода через API"; | |
$arParams = array( | |
"max_len" => 255, //Максимальная длина строки | |
"change_case" => false, //Привести к регистру: false - оставить как есть, U - к верхнему, L - к нижнему | |
"replace_space" => '-', //Символ замены пробела | |
"replace_other" => '-', //Символ замены остальных символов | |
"delete_repeat_replace" => true //Удалить лишние символы замены | |
); |
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
<?=mb_strtolower(FormatDateFromDB($date, 'DD MMMM YYYY'), 'windows-1251')?> |
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
CFile::FormatSize( $size, $precision ); |
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
<? // $int - число, $expressions - массив н.р. $expressions = Array("0"=>"программа", "1"=>"программы", "2"=>"программ"); | |
function sklon($int, $expressions) | |
{ | |
if (count($expressions) < 3) $expressions[2] = $expressions[1]; | |
settype($int, "integer"); | |
$count = $int % 100; | |
if ($count >= 5 && $count <= 20) { | |
$result = $expressions['2']; | |
} else { | |
$count = $count % 10; |
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
$arResult['DISPLAY_PROPERTIES'] = array_merge(array_slice($arResult["DISPLAY_PROPERTIES"],0,2), $arTemp, array_slice($arResult["DISPLAY_PROPERTIES"],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
require_once ($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/classes/general/csv_data.php"); | |
$csvFile = new CCSVData('R', true); | |
$csvFile->LoadFile($_FILES['csv']['tmp_name']); | |
$csvFile->SetDelimiter(','); | |
while ($arRes = $csvFile->Fetch()) { | |
ec($arRes); | |
} | |
Собственно: | |
- подключаем файл класса работы с CSV |
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
<?$APPLICATION->IncludeComponent("bitrix:main.include","",Array( | |
"AREA_FILE_SHOW" => "file", | |
"PATH" => "/include_areas/filename.php", | |
"AREA_FILE_SUFFIX" => "inc", | |
"AREA_FILE_RECURSIVE" => "N", | |
"EDIT_TEMPLATE" => "standard.php" | |
) | |
);?> |
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
var pos = $('.p-selection-result').offset(); | |
$('html,body').animate({scrollTop:pos.top-10},500); |
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
string number_format ( float $number , int $decimals = 0 , string $dec_point = '.' , string $thousands_sep = ',' ) |
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
setTimeout( function(){ $.fancybox.close(); }, 2000); |
OlderNewer