5 // Header and footer code to be included on every page. Not only does it
6 // contain some common markup, but it also includes some code glue that holds
7 // the session together.
9 // Copyright (c) 2003 by Art Cancro <ajc@uncensored.citadel.org>
10 // This program is released under the terms of the GNU General Public License.
12 include "ctdlsession.php";
13 include "ctdlprotocol.php";
15 function bbs_page_header() {
18 if (strcmp('4.3.0', phpversion()) > 0) {
19 die("This program requires PHP 4.3.0 or newer.");
22 establish_citadel_session();
24 // If the user is trying to call up any page other than
25 // login.php logout.php do_login.php,
26 // and the session is not logged in, redirect to login.php
28 if ($_SESSION["logged_in"] != 1) {
29 $filename = basename(getenv('SCRIPT_NAME'));
30 if ( (strcmp($filename, "login.php"))
31 && (strcmp($filename, "logout.php"))
32 && (strcmp($filename, "do_login.php"))
34 header("Location: login.php");
41 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
44 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
45 <meta name="Description" content="Citadel BBS">
46 <meta name="Keywords" content="citadel,bbs">
47 <meta name="MSSmartTagsPreventParsing" content="TRUE">
51 if ($_SESSION["serv_humannode"]) {
52 echo $_SESSION["serv_humannode"] ;
55 echo "BBS powered by Citadel" ;
71 <A HREF="logout.php">Log out</A>
80 function bbs_page_footer() {
82 echo "Powered by Citadel. And a few cups of coffee.<BR>\n";
83 echo "</BODY></HTML>\n";