if ($userdata['user_avatar'] != ""){
echo "<img src='".IMAGES."avatars/".$userdata['user_avatar']."' class='img' width='47' height='47' alt=''>";
} else {
echo "<img src='".IMAGES."no-avatar.gif' class='img' width='47' height='47' alt=''>";
}