* The code which loads expire policies had been incompletely ported to strbuf, causin...
[citadel.git] / ctdlphp / ctdlheader.php
blob66dca66362cdc390babcde39976c356c9de2d911
1 <?PHP
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.
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.
17 include "ctdlsession.php";
18 include "ctdlprotocol.php";
19 include "ctdlelements.php";
21 function bbs_page_header() {
23 // Make sure we're connected to Citadel. Do not remove this!!
24 establish_citadel_session();
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 <link rel="stylesheet" href="sitestyle.css" type="text/css" />
32 <meta name="Description" content="Citadel BBS">
33 <meta name="Keywords" content="citadel,bbs">
34 <meta name="MSSmartTagsPreventParsing" content="TRUE">
35 <title>
36 LITERAL;
38 if ($_SESSION["serv_humannode"]) {
39 echo $_SESSION["serv_humannode"] ;
41 else {
42 echo "BBS powered by Citadel" ;
45 echo <<<LITERAL
46 </title>
47 </head>
49 <body
50 text="#000000"
51 bgcolor="#FFFFFF"
52 link="#0000FF"
53 vlink="#990066"
54 alink="#DD0000"
58 LITERAL;
60 echo '<div id="Header">';
61 echo '<TABLE BORDER=0 WIDTH=100%>';
62 echo '<TR>';
63 echo '<TD>' . $_SESSION["serv_humannode"] . '</TD>' ;
64 echo '<TD>' . (isset($_SESSION["username"]))?'':$_SESSION["username"] . '</TD>' ;
65 echo '<TD>' . (isset($_SESSION["room"]))?'':$_SESSION["room"] . '</TD>' ;
66 echo '<TD ALIGN=RIGHT><A HREF="logout.php">Log out</A></TD>' ;
67 echo '</TR></TABLE>';
68 echo '</div>';
70 // Temporary menu
71 if (isset($_SESSION["logged_in"])) {
72 echo '<div id="Menu">' .
73 '<a href="listrooms.php">' .
74 'room list</A><BR>' .
75 '<a href="readmsgs.php?mode=all&count=0">' .
76 'Read all</a><BR>' .
77 '<a href="readmsgs.php?mode=new&count=0">' .
78 'Read new</a><BR>' .
79 '<a href="display_enter.php">' .
80 'Enter msg</a><BR>' .
81 '<a href="who.php">' .
82 'Who is online?</a><BR>' .
83 '<a href="myinfo.php">' .
84 'My information</a><BR>' .
85 '<A HREF="logout.php">' .
86 'Log out</A>' .
87 '</div>' ;
88 echo '<div id="demolinks">' .
89 '<a href="testcommand.php">' .
90 'demolist</A><BR>' .
91 '<a href="readmsgs.php?mode=all&count=0">' .
92 'Read all</a><BR>' .
93 '<a href="readmsgs.php?mode=new&count=0">' .
94 'Read new</a><BR>' .
95 '<a href="display_enter.php">' .
96 'Enter msg</a><BR>' .
97 '<a href="who.php">' .
98 'Who is online?</a><BR>' .
99 '<A HREF="logout.php">' .
100 'Log out</A>' .
101 '</div>' ;
104 echo '<div id="Content">' ;
109 function bbs_page_footer() {
110 //echo "<HR>";
111 //echo "Powered by Citadel. And a few cups of coffee.<BR>\n";
113 echo '</div>' ;
114 echo '</BODY></HTML>';