]> code.citadel.org Git - citadel.git/blob - webcit/mainmenu.c
got login and frames working together
[citadel.git] / webcit / mainmenu.c
1 #include <stdlib.h>
2 #include <unistd.h>
3 #include <stdio.h>
4 #include <ctype.h>
5 #include <string.h>
6 #include <errno.h>
7 #include "webcit.h"
8
9
10 /* 
11  * menu of commands (just the menu html itself)
12  */
13
14 void embed_main_menu() {
15         wprintf("<CENTER><TABLE border=0><TR>");
16
17         wprintf("<TD>");        /* start of first column */
18
19         wprintf("<UL>");
20         wprintf("<LI><B><A HREF=\"/knrooms\">\n");
21         wprintf("List known rooms</B></A><BR>\n");
22         wprintf("Where can I go from here?</LI>\n");
23         
24         wprintf("<LI><B><A HREF=\"/gotonext\">\n");
25         wprintf("Goto next room</B></A><BR>\n");
26         wprintf("...with <EM>unread</EM> messages</LI>\n");
27         
28         wprintf("<LI><B><A HREF=\"/skip\">\n");
29         wprintf("Skip to next room</B></A><BR>\n");
30         wprintf("(come back here later)</LI>\n");
31         
32         /* ungoto not supported yet
33         if ( (strlen(ugname)>0) && (strucmp(ugname,room_name)) ) {
34                 wprintf("<LI><B><A HREF=\"/ungoto\">\n");
35                 wprintf("Ungoto</B></A><BR>\n");
36                 wprintf("(oops! Back to %s)</LI>\n",ugname);
37                 }
38         */
39         
40         wprintf("</UL>\n");
41         
42         wprintf("</TD><TD>\n"); /* start of second column */
43         
44         wprintf("<UL>");
45         wprintf("<LI><B><A HREF=\"/readnew\">\n");
46         wprintf("Read new messages</B></A><BR>...in this room</LI>\n");
47         
48         wprintf("<LI><B><A HREF=\"/readfwd\">\n");
49         wprintf("Read all messages</B></A><BR>...old <EM>and</EM> new</LI>\n");
50
51         wprintf("<LI><B><A HREF=\"/display_enter\">\n");
52         wprintf("Enter a message</B></A><BR>(post in this room)</LI>");
53         wprintf("</UL>\n");
54
55         wprintf("</TD><TD>"); /* start of third column */
56
57         wprintf("<UL>");
58         wprintf("<LI><B><A HREF=\"/whobbs\">\n");
59         wprintf("Who is online?</B></A><BR>(users <EM>currently</EM> logged on)</LI>\n");
60         
61         wprintf("<LI><B><A HREF=\"/userlist\">\n");
62         wprintf("User list</B></A><BR>(all registered users)</LI>\n");
63
64         wprintf("<LI><B><A HREF=\"/advanced\">\n");
65         wprintf("Advanced options</B></A><BR>...and maintenance</LI>\n");
66
67         wprintf("<LI><B><A HREF=\"/termquit\">\n");
68         wprintf("Log off</B></A><BR>Bye!</LI>\n");
69         wprintf("</UL>\n");
70
71         wprintf("</TR></TABLE>\n");
72
73         wprintf("</CENTER>\n");
74         }
75
76 /*
77  * menu of commands (as a page)
78  */
79 void display_main_menu() {
80         printf("HTTP/1.0 200 OK\n");
81         output_headers();
82         wprintf("<HTML><HEAD><TITLE>WebCit main menu</TITLE></HEAD><BODY>\n");
83         embed_main_menu();
84         printf("</BODY></HTML>\n");
85         wDumpContent();
86         }