$f="count.log";
$max_log=10000;
$ip = getIP();
$date = date("H:i:s d.m.Y");
$url = $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
$rows = file($f);
while(count($rows) > $max_log) array_shift($rows);
$rows[] = $date."|".$ip."|".$url."|\r\n";
file_put_contents($f, $rows);
function getIP() {
if (!empty($_SERVER['HTTP_CLIENT_IP']))
{ $ip=$_SERVER['HTTP_CLIENT_IP']; }
elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR']))
{ $ip=$_SERVER['HTTP_X_FORWARDED_FOR']; }
else { $ip=$_SERVER['REMOTE_ADDR']; }
return $ip;
}
$(document).ready(function(){
$('.product_list').slick({
infinite: true,
slidesToShow: 3,
slidesToScroll: 3
});
$('.product_img').fancybox();
});
.slick-slide {
transform: scale(1);
//opacity: .5;
transition: .3s ease-in-out all;
}
.slick-slide.slick-center {
opacity: 1;
transform: scale(1.08);
}
$('.slider').slick({
//dots: true,
infinite: true,
centerMode: true,
centerPadding: '12%',
slidesToShow: 3,
speed: 500,
responsive: [{
breakpoint: 992,
settings: {
slidesToShow: 1
}
}]
});
$(function () {
$('input[type="text"]').val('');
$('input[type="text"]').on('change', function () {
scaleGo();
});
function scaleGo() {
$scale = 0;
$('input[type="text"]').each(function( index ) {
if ($(this).val() != '') $scale++;
});
$scale = $scale *10;
$('.scale_info').text($scale+'%');
$('.scale_inner').css('width', $scale+'%');
}
});
$pdf = new PDF();
$pdf->SetLeftMargin(25);
// Add a Unicode font (uses UTF-8)
$pdf->AddFont('DejaVu','','DejaVuSansCondensed.ttf',true);
$pdf->SetFont('DejaVu','',10);
$pdf->AddPage();
.....
$('.to-mob').each(function() {
$('.param .param_title').click(function() {
var parent = $(this).parent();
parent.find('.param_list').slideToggle();
$(".filter-wrap .param").not(parent).find('.param_list').slideUp();
});
$(this).clone().appendTo('#side-panel');
});
$('.param .param_title').click(function() {
var parent = $(this).parent();
parent.find('.param_list').slideToggle();
$(".filter-wrap .param").not(parent).find('.param_list').slideUp();
});