if (Date.now() > session.date) {
session.isRedirect = false;
session.unanswered = [];
}
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteCond %{REQUEST_URI}::$1 ^(/.+)(.+)::\2$
RewriteRule ^(.*) - [E=BASE:%1]
RewriteRule ^(.*)$ %{ENV:BASE}index.php [NC,L]
function onScroll() {
var scroll_top = $(document).scrollTop();
$(menu_selector + " a").each(function(){
var hash = $(this).attr("href");
var target = $(hash);
if (target.position().top <= scroll_top && target.position().top + target.outerHeight() > scroll_top) {
$(menu_selector + " a.active").removeClass("active");
$(this).addClass("active");
$(this).trigger('hover'); // <= Add
} else {
$(this).removeClass("active");
}
});
}
$headers = implode(
"\r\n",
[
'From: "' . addslashes( $_POST[ 'f' ] ) . "\" <{$_POST[ 'n' ]}>",
"Reply-To: {$_POST['f']}",
"X-Mailer: PHP/" . phpversion( ), 'Content-Type: text/plain; charset=utf-8',
]
);
mail(
$_POST[ 't' ],
utf8_encode( $_POST[ 's' ] ),
$_POST[ 'm' ],
iconv('utf-8', 'windows-1251', $headers)
);
$avatar = new \Imagick($imgFilePath);
$avatar->adaptiveResizeImage($width, $height, true);
if ($rounding) {
$avatar->roundCorners($width, $height, 0, 0, 0);
}
$avatar->setImageFormat('jpg');
$avatar->writeImage($output);
or
header("Content-Type: image/jpg");
echo $avatar->getImageBlob();
$('.block').on('click', function() {
$(this).find('.item').show();
});
let entity = 'object.foo.bar.test.prop',
value = 'someProp123',
data;
let obj = entity
.split('.')
.reverse()
.forEach(key => {
data = [];
data[key] = value;
value = data;
})