if (file_exists($rootpath . 'files/avatar/1.png'))
echo '<img src="' . $rootpath . 'files/avatar/1.png" width="32" height="32" alt="' . $login . '" /> ';
else
echo '<img src="' . $rootpath . 'images/empty.png" width="32" height="32" alt="' . $login . '" /> ';