2bf55be696a76b0ecc30a164290c40aa80a932ea
[citadel.git] / ctdlphp / ctdlheader.php
1 <?PHP
2
3 // $Id$
4 //
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.
8 //
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.
11
12 include "ctdlsession.php";
13 include "ctdlprotocol.php";
14
15 function bbs_page_header() {
16         global $session;
17
18         if(strcmp('4.3.0', phpversion()) > 0) {
19                 die("This program requires PHP 4.3.0 or newer.");
20         }
21
22         establish_citadel_session();
23
24         echo <<<LITERAL
25
26 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
27 <html>
28 <head>
29         <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
30         <meta name="Description" content="Citadel BBS">
31         <meta name="Keywords" content="citadel,bbs">
32         <meta name="MSSmartTagsPreventParsing" content="TRUE">
33         <title>
34 LITERAL;
35
36         if ($_SESSION["serv_humannode"]) {
37                 echo $_SESSION["serv_humannode"] ;
38         }
39         else {
40                 echo "BBS powered by Citadel" ;
41         }
42
43         echo <<<LITERAL
44 </title>
45 </head>
46
47 <body
48         text="#000000"
49         bgcolor="#FFFFFF"
50         link="#0000FF"
51         vlink="#990066"
52         alink="#DD0000"
53 >
54
55 LITERAL;
56
57         echo "Your session ID is ", $session, "<BR>\n";
58         echo "<A HREF=\"logout.php\">Log out</A><HR>";
59         // flush();
60         // test_for_echo();
61 }
62
63
64 function bbs_page_footer() {
65         echo "<HR>";
66         echo "Powered by Citadel.  And a few cups of coffee.<BR>\n";
67         echo "</BODY></HTML>\n";
68 }
69
70 ?>