* Replaced the two-second sleep (and associated race condition) for the
[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 calls 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
13 // All of the back-end magic gets included from here.  The rest of the
14 // pages in the system then only have to include ctdlheader.php (since it
15 // is required) and they get the others automatically.
16 //
17 include "ctdlsession.php";
18 include "ctdlprotocol.php";
19 include "ctdlelements.php";
20
21 function bbs_page_header() {
22
23         // Make sure we're connected to Citadel.  Do not remove this!!
24         establish_citadel_session();
25
26         echo <<<LITERAL
27 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
28 <html>
29 <head>
30         <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
31         <meta name="Description" content="Citadel BBS">
32         <meta name="Keywords" content="citadel,bbs">
33         <meta name="MSSmartTagsPreventParsing" content="TRUE">
34         <title>
35 LITERAL;
36
37         if ($_SESSION["serv_humannode"]) {
38                 echo $_SESSION["serv_humannode"] ;
39         }
40         else {
41                 echo "BBS powered by Citadel" ;
42         }
43
44         echo <<<LITERAL
45 </title>
46 </head>
47
48 <body
49         text="#000000"
50         bgcolor="#FFFFFF"
51         link="#0000FF"
52         vlink="#990066"
53         alink="#DD0000"
54 >
55
56 <div align=right>
57 <A HREF="logout.php">Log out</A>
58 </div>
59 <HR>
60
61 LITERAL;
62 }
63
64
65 function bbs_page_footer() {
66         echo "<HR>";
67         echo "Powered by Citadel.  And a few cups of coffee.<BR>\n";
68         echo "</BODY></HTML>\n";
69 }
70
71
72 ?>