<?
function avatar2($ID){
$avatar = mysql_fetch_array(mysql_query("SELECT id,id_gallery,ras FROM `gallery_foto` WHERE `id_user` = '$ID' AND `avatar` = '1' LIMIT 1"));
if (is_file(H."sys/gallery/48/$avatar[id].$avatar[ras]")){
echo '<img src="/foto/foto48/' . $avatar['id'] . '.' . $avatar['ras'] . '" alt="Avatar" width="50" />';
} else {
$ava=get_user($ID);
echo '<img src="/style/user/ava'.$ava['pol'].'.png" width="50" alt="No Avatar" />';
}
}
?>