X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=ctdlphp%2Fctdlheader.php;h=66dca66362cdc390babcde39976c356c9de2d911;hb=fa2dd842abb5feedea3e2253255722fcaecc3c6f;hp=48ca29c559ffb13e92957e616ae364289b2d8a9b;hpb=d2f01e044da76bf55d068f20beb2e12e8939fbe3;p=citadel.git diff --git a/ctdlphp/ctdlheader.php b/ctdlphp/ctdlheader.php index 48ca29c55..66dca6636 100644 --- a/ctdlphp/ctdlheader.php +++ b/ctdlphp/ctdlheader.php @@ -3,45 +3,32 @@ // $Id$ // // Header and footer code to be included on every page. Not only does it -// contain some common markup, but it also includes some code glue that holds +// contain some common markup, but it also calls some code glue that holds // the session together. // // Copyright (c) 2003 by Art Cancro // This program is released under the terms of the GNU General Public License. + +// All of the back-end magic gets included from here. The rest of the +// pages in the system then only have to include ctdlheader.php (since it +// is required) and they get the others automatically. +// include "ctdlsession.php"; include "ctdlprotocol.php"; +include "ctdlelements.php"; function bbs_page_header() { - global $session; - - if (strcmp('4.3.0', phpversion()) > 0) { - die("This program requires PHP 4.3.0 or newer."); - } + // Make sure we're connected to Citadel. Do not remove this!! 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 << + @@ -67,19 +54,65 @@ LITERAL; alink="#DD0000" > + LITERAL; - echo "Your session ID is ", $session, "
\n"; - echo "Log out
"; - // flush(); - // test_for_echo(); + echo ''; + + // Temporary menu + if (isset($_SESSION["logged_in"])) { + echo '' ; + echo '' ; + } + + echo '
' ; + } function bbs_page_footer() { - echo "
"; - echo "Powered by Citadel. And a few cups of coffee.
\n"; - echo "\n"; + //echo "
"; + //echo "Powered by Citadel. And a few cups of coffee.
\n"; + + echo '
' ; + echo ''; } + ?>