We studied influence of magnetic field on the spectrum of 5-min solar oscillations. The calculations were made within a two-layer shell model. The lower non-magnetized layer is characterized by a linear decrease in temperature with height while in the upper layer (with an inhomogeneous horizontal magnetic field) the temperature increases and reaches the coronal value at a height of about 2500 km. The fine structure of the spectrum of 5-min oscillations was calculated for f-, p1- and p2- modes for large k.