Файл: inc/fish/func_fish.php
Строк: 47
<?php
function time_left_fish($tl){
$d=3600*24;
$day=round($tl/$d);
$tl=$tl-($d*$day);
$hour=round($tl/3600);
$tl=$tl-(3600*$hour);
$minute=floor($tl/60);
$tl=$tl-(60*$minute);
$second=floor($tl);
$dayt="".($day>0?"<span class='timer_day'>$day ?</span> ":null)."";
$hourt="".($hour>0?"<span class='timer_hour'>$hour ?</span> ":null)."";
$minutet="".($minute>0?"<span class='timer_minute'>$minute ?</span> ":null)."";
$secondt="".($second>0?"<span class='timer_second'>$second ?</span> ":null)."";
if($day>0){
$hourt=NULL;
$minutet=NULL;
$secondt=NULL;
}elseif($hour>0 && $day==0){
$dayt=NULL;
$minutet=NULL;
$secondt=NULL;
} elseif($minute>0 && $hourt==0){
$dayt=NULL;
$hourt=NULL;
$secondt=NULL;
}
return "$dayt$hourt$minutet$secondt";
}
function redirect_fish($url, $msg){
if ($msg != '') $_SESSION['msg'] = $msg;
header('Location:'.$url);
echo "<script>document.location.href='".$url."';</script>";
exit;
}
function title_one($str){
return '<div class="event"><h1 class="title">'.$str.'</h1></div>';
}
?>