yuan26,
if($user_id){
if(!file_exists($rootpath.'files/users/avatar/'.$user_id.'.png')){
echo '<div class="rmenu">Your avatar is empty, please <a href="'.rootpath.'users/profile.php?act=images&mod=avatar&user='.$user_id.'"><b>upload</b></a> or <a href="'.rootpath.'pages/faq.php?act=avatars"><b>select</b></a>an avatar.</div>';
}
}