The header and footer are ordinary PHP includes.
Change either shared file, and every page using it changes too.