Rheology of lyotropic and thermotropic lamellar phases