The cool thing about this code here is the use of a debug
mode cookie. If the cookie is set with the secret key, then that
person can still view the website. You have a form in the back end
that sets up the cookie with the same key. So when you are ready
for maintenance, you can shut down the website, enable the machine
you are using to have debug mode enabled and debug any changes
without them being visible to the public.
This even works when you are not in maintenance.
Say you are working on a new section of code, you can put it
into a separate file (in case of syntax errors) and then only
include the file if the debug mode is enabled.
Great if you are changing an entire section such as your
header, or main template even, but you still want everyone else to
see the old one until you are finished.