...
<?php
// if http:// redirecting to https://
if(!isset($_SERVER['HTTPS']) || $_SERVER['HTTPS'] == ""){
$redirect = "https://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
header("HTTP/1.1 301 Moved Permanently");
header("Location: $redirect");
}
?>
$(document).ready(function(){
localStorage.setItem('referal',<?=$ref_id?>);
window.location='/register';
});
public function calculateBetweenForPagination($page = 1, $startDate, $endDate)
{
$count = 15; // Количество записей на странице
$shift = $count * ($page - 1);
$from = clone($startDate->modify('+'.$shift.' day'));
$to = clone($startDate->modify('+'.$count - 1 .' day'));
if ($endDate < $to)
{
$to = $endDate;
}
$between['from'] = $from;
$between['to'] = $to;
return $between;
}