{% else-1 %}
stels * 0.39
(19 дек 2012, 11:24) (0/0) [0]
Rakovskiy, черпает запрос из базы и выводит воемяв минутахи часах когда событие было*
stels * 0.39
(19 дек 2012, 11:23) (0/0) [0]
„`M®AK`„, выкини свою функцию vtime( и используй данную ниже))) проблем с ней нету таких *



function vtime(($time=NULL)
{
global $user;
if ($time==NULL)$time=time();
if (isset($user))$time=$time+$user[\'set_timesdvig\']*60*60;
$timep=\"\".date(\"j M Y в H:i\", $time).\"\";
$time_p[0]=date(\"j n Y\", $time);
$time_p[1]=date(\"H:i\", $time);
if ($time_p[0]==date(\"j n Y\"*)$timep=date(\"H:i:s\", $time);
if (isset($user)){
if ($time_p[0]==date(\"j n Y\", time()+$user[\'set_timesdvig\']*60*60))$timep=date(\"H:i:s\", $time);
if ($time_p[0]==date(\"j n Y\", time()-60*60*(24-$user[\'set_timesdvig\'])))$timep=\"Вчера в $time_p[1]\";}
else{
if ($time_p[0]==date(\"j n Y\"*)$timep=date(\"H:i:s\", $time);
if ($time_p[0]==date(\"j n Y\", time()-60*60*24))$timep=\"Вчера в $time_p[1]\";}
$timep=str_replace(\"Jan\",\"Янв\",$timep);
$timep=str_replace(\"Feb\",\"Фев\",$timep);
$timep=str_replace(\"Mar\",\"Марта\",$timep);
$timep=str_replace(\"May\",\"Мая\",$timep);
$timep=str_replace(\"Apr\",\"Апр\",$timep);
$timep=str_replace(\"Jun\",\"Июня\",$timep);
$timep=str_replace(\"Jul\",\"Июля\",$timep);
$timep=str_replace(\"Aug\",\"Авг\",$timep);
$timep=str_replace(\"Sep\",\"Сент\",$timep);
$timep=str_replace(\"Oct\",\"Окт\",$timep);
$timep=str_replace(\"Nov\",\"Ноября\",$timep);
$timep=str_replace(\"Dec\",\"Дек\",$timep);
return $timep;
}
  • 1 из 1