I have built a website (PHP) with more than 60 pages. I have only now realized (unfortunately) that I should have built in an "In Maintenance Mode" feature to allow an admin to temporarily disable the website and point it to a Maintenance Mode page. This would only allow those logged in as an admin to view the website.
The options I see are:
Add a new "include" file to the top of every single PHP page.
I have one include that is used to display the navigation bar on
every page (navigation class). I could write the Maintenance Mode
code in this class.
Do I have any other options? The 1st option doesn't seem like the most efficient, and the 2nd one just seems like bad programming. Is there any other better way to include a new file on every single php file?
Thanks!
ps - the site is not launched yet