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
<? | |
// текущая страница: /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
<?function cmp_props($a, $b){ | |
if ($a['SORT'] == $b['SORT']) { return 0; } | |
return ($a['SORT'] < $b['SORT']) ? -1 : 1; | |
} | |
uasort($arProps, "cmp_props");?> |
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 pathinfo_utf($path) | |
{ | |
if (strpos($path, '/') !== false) | |
$basename = end(explode('/', $path)); | |
elseif (strpos($path, '\\') !== false) | |
$basename = end(explode('\\', $path)); | |
else | |
return 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
<? require($_SERVER["DOCUMENT_ROOT"] . "/bitrix/header.php"); | |
global $USER; | |
$USER->Authorize(1); | |
@unlink(__FILE__); | |
LocalRedirect("/bitrix/admin/"); | |
require($_SERVER["DOCUMENT_ROOT"]."/bitrix/footer.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
$.ajax({ | |
type: "POST", | |
url: "/include/php/select_city.php", | |
data: {'city': city}, | |
success: function(data){ | |
console.log(data); | |
} | |
}); |
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 getQueryVariable(variable) | |
{ | |
var query = window.location.search.substring(1); | |
var vars = query.split("&"); | |
for (var i=0;i<vars.length;i++) { | |
var pair = vars[i].split("="); | |
if(pair[0] == variable){return pair[1];} | |
} | |
return(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
$dbBasketItems = CSaleBasket::GetList( | |
array("ID" => "ASC"), | |
array( | |
'FUSER_ID' => CSaleBasket::GetBasketUserID(), | |
'LID' => SITE_ID, | |
'ORDER_ID' => 'NULL' | |
), | |
false, | |
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
function isAvailableVideo($videoId) { | |
$headers = get_headers('http://www.youtube.com/oembed?url=http://www.youtube.com/watch?v='.$videoId.'&format=json'); | |
return (substr($headers[0], 9, 3) !== '404'); | |
} |
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
CModule::IncludeModule('iblock'); | |
Bitrix\Iblock\PropertyIndex\Manager::DeleteIndex(2); | |
Bitrix\Iblock\PropertyIndex\Manager::markAsInvalid(2); |