<?
function on_status($user = NULL){
	
global $set, $time;
$on=NULL;
if (mysql_result(mysql_query("SELECT COUNT(id) FROM `user` WHERE `id` = '$user' AND `date_last` > '" . (time()-$set['time_online']) . "' LIMIT 1"),0) == 1){

$ank=mysql_fetch_array(mysql_query("SELECT * FROM `user` WHERE `id` = $user LIMIT 1"));

if ($ank['status']==1) $on='<img src="/style/status/gotov_boltat.png" alt="" class="icon"/>';
else if ($ank['status']==2) $on='<img src="/style/status/zaniat.png" alt="" class="icon"/>';
else if ($ank['status']==3) $on='<img src="/style/status/boleu.png" alt="" class="icon"/>';
else if ($ank['status']==4) $on='<img src="/style/status/depressia.png" alt="" class="icon"/>';
else if ($ank['status']==5) $on='<img src="/style/status/dumau.png" alt="" class="icon"/>';
else if ($ank['status']==6) $on='<img src="/style/status/kuru.png" alt="" class="icon"/>';
else if ($ank['status']==7) $on='<img src="/style/status/kushau.png" alt="" class="icon"/>';
else if ($ank['status']==8) $on='<img src="/style/status/love.png" alt="" class="icon"/>';
else if ($ank['status']==9) $on='<img src="/style/status/tv.png" alt="" class="icon"/>';
else if ($ank['status']==10) $on='<img src="/style/status/music.png" alt="" class="icon"/>';
else if ($ank['status']==11) $on='<img src="/style/status/vanna.png" alt="" class="icon"/>';
else if ($ank['status']==12) $on='<img src="/style/status/tualet.png" alt="" class="icon"/>';
else if ($ank['status']==13) $on='<img src="/style/status/sex.png" alt="" class="icon"/>';
else if ($ank['status']==14) $on='<img src="/style/status/igrau.png" alt="" class="icon"/>';
else if ($ank['status']==15) $on='<img src="/style/status/pivo.png" alt="" class="icon"/>';
else if ($ank['status']==16) $on='<img src="/style/status/sonni.png" alt="" class="icon"/>';
else if ($ank['status']==17) $on='<img src="/style/status/1.png" alt="" class="icon"/>';
else if ($ank['status']==18) $on='<img src="/style/status/12.png" alt="" class="icon"/>';
else if ($ank['status']==19) $on='<img src="/style/status/13.png" alt="" class="icon"/>';
else if ($ank['status']==20) $on='<img src="/style/status/14.png" alt="" class="icon"/>';
else if ($ank['status']==21) $on='<img src="/style/status/18.png" alt="" class="icon"/>';
else if ($ank['status']==22) $on='<img src="/style/status/19.png" alt="" class="icon"/>';
else if ($ank['status']==23) $on='<img src="/style/status/31.png" alt="" class="icon"/>';
else if ($ank['status']==24) $on='<img src="/style/status/7.png" alt="" class="icon"/>';
return $on ;
}
}
?>