<?

function vremja2($time=NULL) 
{
global $user;
if ($time==NULL)$time=time();
if (isset($user))$time=$time+$user['set_timesdvig']*60*60;
$timep=date("j M Y </font>г.", $time);
$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;
}
$nt=mysql_fetch_array(mysql_query("SELECT `time` FROM `news` ORDER BY `id` DESC LIMIT 1",$db)); 
echo "";
echo vremja2($nt[time]); 
echo "";


?>
