if($onl+300>=time()){
echo "Online: в онлайне
\n";
}
else
{
$tkick = time() - $onl;
if($tkick < 60 && $tkick > 0)
{
$vrem = "cek\n";
}
elseif($tkick < 3600 && $tkick > 60)
{
$new = $tkick;
$tkick = $new/60;
$vrem = "мин\n";
}
elseif($tkick < 86400 && $tkick > 3600)
{
$new = $tkick;
$tkick = $new/3600;
$vrem = "час\n";
}
elseif($tkick > 86400)
{
$new = $tkick;
$tkick = $new/86400;
$vrem = "день\n";
}
$tkick = round($tkick);
echo "Offline: \n";
echo "(Вышел из чата $tkick $vrem назад)
\n";
if($tkick[0]>259200){
mysql_query ("UPDATE `users` SET level = '3', bal = '0', posts = '0', status = 'Chatter' WHERE `id` = '".$nk."'");
}
}