added footer.php
modified code structure and externalized footer
created php page
moved to php error page
removed duplicate footer