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 is(){ | |
foreach(func_get_args() as $v){ | |
if(!is_null($v)){ | |
return $v; | |
} | |
} | |
} | |
$value = is(null,null,false,true,1); |
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
//-------------------- [ ++multiple hack ] -------------------- | |
if (isset($_FILES["PROPERTY_FILE_45_"])) { | |
$_REQUEST["PROPERTY"][45] = []; | |
for ($i = count($_FILES["PROPERTY_FILE_45_"]['tmp_name']) - 1; $i >= 0; $i--) { | |
$_FILES["PROPERTY_FILE_45_" . $i] = []; | |
$_REQUEST["PROPERTY"][45][$i] = ''; | |
foreach ($_FILES["PROPERTY_FILE_45_"] as $key => $arr) { | |
$_FILES["PROPERTY_FILE_45_" . $i][$key] = $arr[$i]; | |
} | |
} |
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
AddEventHandler('main', 'OnEpilog', '_Check404Error', 1); | |
function _Check404Error(){ | |
if(defined('ERROR_404') && ERROR_404=='Y' || CHTTP::GetLastStatus() == "404 Not Found"){ | |
GLOBAL $APPLICATION; | |
$APPLICATION->RestartBuffer(); | |
require $_SERVER['DOCUMENT_ROOT'].SITE_TEMPLATE_PATH.'/header.php'; | |
require $_SERVER['DOCUMENT_ROOT'].'/404.php'; | |
require $_SERVER['DOCUMENT_ROOT'].SITE_TEMPLATE_PATH.'/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
/* | |
http://stackoverflow.com/questions/14973317/understanding-bootstraps-clearfix-function | |
*/ | |
.clearfix { | |
*zoom: 1; | |
&:before, | |
&:after { | |
display: table; | |
content: ""; |
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
$._data(document, "events").click.forEach(function(e,i){ | |
console.log(i, e.selector) | |
}) |
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
<? | |
if(strlen($arItem["ACTIVE_FROM"])>0) | |
$arFields["DISPLAY_ACTIVE_FROM"] = CIBlockFormatProperties::DateFormat( | |
$arParams["ACTIVE_DATE_FORMAT"], // j F Y | |
MakeTimeStamp($arFields["ACTIVE_FROM"], // 16.12.2014 17:00:00 | |
CSite::GetDateFormat()) | |
); | |
else | |
$arFields["DISPLAY_ACTIVE_FROM"] = ""; |
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 y = window.pageYOffset; // read only | |
// var y = window.pageYOffset || document.documentElement.scrollTop; // for IE<9 |
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
.bx-core-waitwindow:before { | |
content: " "; | |
background: url('/bitrix/templates/empty/css/../img/icons.png') -186px -284px; | |
position: absolute; | |
top: -12px; | |
left: -10px; | |
width: 64px; | |
height: 64px; | |
-webkit-animation: infinite-spinning 2s linear infinite; | |
-moz-animation: infinite-spinning 2s linear infinite; |
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 Get() { | |
var these = this; | |
location.search && location.search.substr(1).split('&').forEach(function (str) { | |
var para = str.split("="); | |
these[para[0]] = para[1]; | |
}); | |
Object.defineProperty(this, 'toString', { |
NewerOlder