<?php function online($id){ global $dbc; $sql_u = $dbc->query("SELECT `time`,`where` FROM `users` WHERE `id`='".$id."'")->fetch_assoc(); if(time() < $sql_u['time']+1800){ $online = '<img src="img/stat/on.gif" width="20" height="10"><span style="color: #9C9;"> '.$sql_u['where'].'</span>'; } else{ $online = '<img src="img/stat/off.gif" width="20" height="10">'; } return $online; } ?>