// This program is released under the terms of the GNU General Public License. include "ctdlsession.php"; include "ctdlprotocol.php"; function bbs_page_header() { global $session; if (strcmp('4.3.0', phpversion()) > 0) { die("This program requires PHP 4.3.0 or newer."); } establish_citadel_session(); // If the user is trying to call up any page other than // login.php logout.php do_login.php, // and the session is not logged in, redirect to login.php // if ($_SESSION["logged_in"] != 1) { $filename = basename(getenv('SCRIPT_NAME')); if ( (strcmp($filename, "login.php")) && (strcmp($filename, "logout.php")) && (strcmp($filename, "do_login.php")) ) { header("Location: login.php"); exit(0); } } echo << LITERAL; if ($_SESSION["serv_humannode"]) { echo $_SESSION["serv_humannode"] ; } else { echo "BBS powered by Citadel" ; } echo <<<LITERAL LITERAL; echo "Your session ID is ", $session, "
\n"; echo "Log out
"; // flush(); // test_for_echo(); } function bbs_page_footer() { echo "
"; echo "Powered by Citadel. And a few cups of coffee.
\n"; echo "\n"; } ?>