*** empty log message ***
[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
57 LITERAL;
58
59         echo '<TABLE BORDER=0 WIDTH=100%>';
60         echo '<TR>';
61         echo '<TD>' . $_SESSION["serv_humannode"] . '</TD>' ;
62         echo '<TD>' . $_SESSION["username"] . '</TD>' ;
63         echo '<TD>' . $_SESSION["room"] . '</TD>' ;
64         echo '<TD ALIGN=RIGHT><A HREF="logout.php">Log out</A></TD>' ;
65         echo '</TR></TABLE><BR>';
66
67         // Temporary menu
68         if ($_SESSION["logged_in"]) {
69                 echo    '<a href="listrooms.php">' .
70                         'room list</A> ' .
71                         '<a href="readmsgs.php?mode=all&count=0">' .
72                         'Read all messages</a> ' .
73                         '<a href="readmsgs.php?mode=new&count=0">' .
74                         'Read new messages</a> ' .
75                         '<a href="display_enter.php">' .
76                         'Enter a message</a> ' .
77                         '<a href="who.php">' .
78                         'Who is online?</a> ' .
79                         '<A HREF="logout.php">' .
80                         'Log out</A><HR>' ;
81         }
82
83 }
84
85
86 function bbs_page_footer() {
87         echo "<HR>";
88         echo "Powered by Citadel.  And a few cups of coffee.<BR>\n";
89         echo "</BODY></HTML>\n";
90 }
91
92
93 ?>