Файл: vsime.com/system/functions/last_vremja.php
Строк: 36
<?
function last_vremja($time_diff, $show_hours=0, $show_minutes=0, $show_seconds=0)
{
$one_minute = 60;
$one_hour = 60 * 60;
$hours = floor(($time_diff)/$one_hour);
$minutes = floor(($time_diff - $hours * $one_hour)/$one_minute);
$seconds = floor(($time_diff - $hours * $one_hour - $minutes * $one_minute));
$hours_text = array('час', 'часа', 'часов');
$minutes_text = array('минута', 'минуты', 'минут');
$seconds_text = array('секунда', 'секунды', 'секунд');
$time_string = ($hours!=0?($show_hours == 1?sklon_text($hours, $hours_text):NULL):NULL).($minutes!=0?($show_minutes == 1?($show_hours == 1 && $hours!=0?", ":NULL).sklon_text($minutes, $minutes_text):NULL):NULL).($show_seconds == 1?($show_hours == 1 && $hours!=0 || $show_minutes == 1 && $minutes!=0?", ":NULL).sklon_text($seconds, $seconds_text):NULL);
if ($time_diff < 0)$time_string ='[Hacked by SKiNDOW]';
return $time_string;
}
?>