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
<? | |
// текущая страница: /ru/?id=3&s=5&d=34 | |
$page = $APPLICATION->GetCurPageParam("id=45", array("id", "d")); | |
// результат - /ru/index.php?id=45&s=5 | |
?> |
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
<? // этот код в файл result_modifier.php | |
if($arParams['ADD_SECTIONS_CHAIN'] && !empty($arResult['NAME'])) | |
{ | |
$arResult['SECTION']['PATH'][] = array( | |
'NAME' => $arResult['NAME'], | |
'PATH' => '' | |
); | |
} |
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
setTimeout( function(){ $.fancybox.close(); }, 2000); |
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
string number_format ( float $number , int $decimals = 0 , string $dec_point = '.' , string $thousands_sep = ',' ) |
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
var pos = $('.p-selection-result').offset(); | |
$('html,body').animate({scrollTop:pos.top-10},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
<?$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 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
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 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
$arResult['DISPLAY_PROPERTIES'] = array_merge(array_slice($arResult["DISPLAY_PROPERTIES"],0,2), $arTemp, array_slice($arResult["DISPLAY_PROPERTIES"],2)); |
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
<? // $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 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
CFile::FormatSize( $size, $precision ); |