Once the user is successfully logged in, "menu.php" takes over and generates a menu of functions available to the user. The first thing "menu.php" (and every other script) does is to verify the existence of a valid session - this is necessary to prevent unauthorized users from viewing the pages. If a session doesn't exist, the browser is immediately redirected to the error page. Assuming the session check does not fail, a basic HTML page is built. Before we get into the nitty-gritty of how "menu.php" works, I want to draw your attention to the manner in which each page within this application is built. Each page generated through this application has a particular layout - a logo in the top left corner and a blue bar below it containing a page title. The bottom of every page has a copyright notice and a disclaimer. Since these elements will remain constant, through the application, I've placed the corresponding HTML code in separate header and footer files, and simply include()d them on each page. Again, by separating common interface elements into separate files, I've made it easier to customize the look of the application; simply alter these files, and the changes will be reflected on all the pages. The variable $title stores the title for each page, and is used by "header.inc.php" - as you can see.
blog comments powered by Disqus |