Global dynamics of the periodic SEIR epidemic model