The footer is used to display the footer. The links are to run the different scripts.
<?php // Start of Footer echo <<<EOF </font> <br /> <div align=center> <a href="index.php">Home</a> | EOF; // This page completes the HTML template // display links based on the login status if (isset($_SESSION['user_id'])) { echo '<a href="logout.php" title="Logout">Logout</a> | <a href="change_password.php" title="Change Password">Change Pasword</a> |'; // add links if the user is an administrator if ($_SESSION['user_level'] == 1) { echo '<a href="view_users.php" title="View Users">View Users</a> | <a href="#">Admin Page</a> '; } } else { // not logged in echo '<a href="register.php" title="Register">Register</a> | <a href="login.php" title="Login">Login</a> | <a href="forgot_password.php" title="Password Retrieval">Forgot Password</a> '; } echo <<<EOF <hr> <font class="f2grey"> © 2008: Hann So <br>email: <a href="mailto:hso@voyager.deanza.edu">hso@voyager.deanza.edu</a> </font> </div> </body> </html> EOF; // flush the buffered output ob_end_flush(); ?> |