]> code.citadel.org Git - citadel.git/blobdiff - ctdlphp/ctdlheader.php
* Added a basic read loop ... currently only fetches message numbers
[citadel.git] / ctdlphp / ctdlheader.php
index e8073362cd96c45bc878c2f454e941bcac41f672..c5b8f5e6421fce1a0db4770f753c35d5c4c04002 100644 (file)
@@ -1,16 +1,28 @@
 <?PHP
 
+// $Id$
+//
+// Header and footer code to be included on every page.  Not only does it
+// contain some common markup, but it also calls some code glue that holds
+// the session together.
+//
+// Copyright (c) 2003 by Art Cancro <ajc@uncensored.citadel.org>
+// 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";
 
 function bbs_page_header() {
 
-       global $session;
-
+       // Make sure we're connected to Citadel.  Do not remove this!!
        establish_citadel_session();
 
        echo <<<LITERAL
-
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html>
 <head>
@@ -18,7 +30,18 @@ function bbs_page_header() {
        <meta name="Description" content="Citadel BBS">
        <meta name="Keywords" content="citadel,bbs">
        <meta name="MSSmartTagsPreventParsing" content="TRUE">
-       <title>FIXME NAME BBS</title>
+       <title>
+LITERAL;
+
+       if ($_SESSION["serv_humannode"]) {
+               echo $_SESSION["serv_humannode"] ;
+       }
+       else {
+               echo "BBS powered by Citadel" ;
+       }
+
+       echo <<<LITERAL
+</title>
 </head>
 
 <body
@@ -29,12 +52,12 @@ function bbs_page_header() {
        alink="#DD0000"
 >
 
-LITERAL;
+<div align=right>
+<A HREF="logout.php">Log out</A>
+</div>
+<HR>
 
-       echo "Your session ID is ", $session, "<BR>\n";
-       echo "<A HREF=\"logout.php\">Log out</A><HR>";
-       // flush();
-       // test_for_echo();
+LITERAL;
 }
 
 
@@ -44,4 +67,5 @@ function bbs_page_footer() {
        echo "</BODY></HTML>\n";
 }
 
+
 ?>