Prueba así: Código PHP:
if ( $userdata['user_level'] == ANONYMOUS )
{
$l_registrarse = '<a class="mainmenu" href="profile.' . $phpEx . '?mode=register&sid=' . $userdata['session_id'] . '"><img src="templates/subSilver/images/registrarse.png" border="0" /></a>';
$l_conectarse = '<a class="mainmenu" href="login.' . $phpEx . '?sid=' . $userdata['session_id'] . '"><img src="templates/subSilver/images/conectarse.png" border="0" /></a>';
}
else if ($userdata['user_level'] != ANONYMOUS)
{
$l_registrarse = "";
$l_conectarse ="";
}