]> code.citadel.org Git - citadel.git/blobdiff - webcit/mainmenu.c
* Begin migration to the new "rounded boxes" look
[citadel.git] / webcit / mainmenu.c
index 12c81a67071e8b4456bfd98099943525fc037097..47ca39e2d295f074322e36d95131ce851abdc99a 100644 (file)
 
 
 
-
-
-/* 
- * menu of commands (just the menu html itself)
+/*
+ * The Main Menu
  */
-
-void embed_main_menu(void)
+void display_main_menu(void)
 {
-       wprintf("<CENTER><TABLE border=0><TR>");
+       output_headers(1);
+
+       svprintf("BOXTITLE", WCS_STRING, "Basic commands");
+       do_template("beginbox");
 
+       wprintf("<TABLE border=0 align=center><TR>");
        wprintf("<TD>");        /* start of first column */
 
        wprintf("<UL>");
@@ -74,42 +75,28 @@ void embed_main_menu(void)
        wprintf("</TD><TD>");   /* start of third column */
 
        wprintf("<UL>");
-       wprintf("<LI><B><A HREF=\"/static/whoframeset.html\" TARGET=\"_top\">\n");
-       wprintf("Who is online?</B></A><BR>(users <EM>currently</EM> logged on)</LI>\n");
+       wprintf("<LI><B><A HREF=\"/summary\">\n");
+       wprintf("Summary page</B></A><BR>Summary of my account</LI>\n");
 
        wprintf("<LI><B><A HREF=\"/userlist\">\n");
        wprintf("User list</B></A><BR>(all registered users)</LI>\n");
 
-       wprintf("<LI><B><A HREF=\"/advanced\">\n");
-       wprintf("Advanced options</B></A><BR>...and maintenance</LI>\n");
-
-       wprintf("<LI><B><A HREF=\"/termquit\" TARGET=\"top\">\n");
+       wprintf("<LI><B><A HREF=\"/termquit\" TARGET=\"_top\">\n");
        wprintf("Log off</B></A><BR>Bye!</LI>\n");
        wprintf("</UL>\n");
 
        wprintf("</TR></TABLE>\n");
-
-       wprintf("</CENTER>\n");
-}
-
-/*
- * advanced options
- */
-void embed_advanced_menu(void)
-{
+       do_template("endbox");
 
        wprintf("<TABLE WIDTH=100%%><TR VALIGN=TOP><TD>");
 
-
-       wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=770000><TR><TD>");
-       wprintf("<FONT SIZE=+1 COLOR=\"FFFFFF\"");
-       wprintf("<B>Interaction</B>\n");
-       wprintf("</FONT></TD></TR></TABLE>\n");
+       svprintf("BOXTITLE", WCS_STRING, "Interaction");
+       do_template("beginbox");
 
        wprintf("<UL>");
-       wprintf("<LI><A HREF=\"/display_page\">\n");
-       wprintf("Page another user</A>\n");
-
+       wprintf("<LI><A HREF=\"/whobbs\">\n");
+       wprintf("Who is online?</A><font size=-2> "
+               "(users <EM>currently</EM> logged on)</font>\n");
        wprintf("<LI><A HREF=\"/chat\">");
        wprintf("Chat with other online users</A>\n");
 
@@ -117,13 +104,12 @@ void embed_advanced_menu(void)
        wprintf("<FONT SIZE=-2>Generic server command</FONT></A>\n");
 
        wprintf("</UL>\n");
+       do_template("endbox");
 
        wprintf("</TD><TD>");
 
-       wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=007700><TR><TD>");
-       wprintf("<FONT SIZE=+1 COLOR=\"FFFFFF\"");
-       wprintf("<B>Your info</B>\n");
-       wprintf("</FONT></TD></TR></TABLE>\n");
+       svprintf("BOXTITLE", WCS_STRING, "Your info");
+       do_template("beginbox");
 
        wprintf("<UL>");
        wprintf("<LI><A HREF=\"/display_editbio\">\n");
@@ -139,14 +125,12 @@ void embed_advanced_menu(void)
        wprintf("Change your password</A>\n");
 
        wprintf("</UL>\n");
-
+       do_template("endbox");
 
        wprintf("</TD></TR><TR VALIGN=TOP><TD>");
 
-       wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=000077><TR><TD>");
-       wprintf("<FONT SIZE=+1 COLOR=\"FFFFFF\"");
-       wprintf("<B>Advanced room commands</B>\n");
-       wprintf("</FONT></TD></TR></TABLE>\n");
+       svprintf("BOXTITLE", WCS_STRING, "Advanced room commands");
+       do_template("beginbox");
 
        wprintf("<UL>");
        wprintf("<LI><A HREF=\"/display_private\">\n");
@@ -158,71 +142,52 @@ void embed_advanced_menu(void)
        wprintf("<LI><A HREF=\"/display_zap\">");
        wprintf("Zap (forget) this room (%s)</A>\n", WC->wc_roomname);
 
+        wprintf("<LI><A HREF=\"/display_whok\">\n");
+        wprintf("Access controls for this room</A>\n");
+
        wprintf("<LI><A HREF=\"/zapped_list\">");
        wprintf("List all forgotten rooms</A>\n");
 
        wprintf("</UL>\n");
+       do_template("endbox");
 
        wprintf("</TD><TD>");
 
        if ((WC->axlevel >= 6) || (WC->is_room_aide)) {
-               wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=007777><TR><TD>");
-               wprintf("<FONT SIZE=+1 COLOR=\"FFFFFF\"");
-               wprintf("<B>Administrative functions</B>\n");
-               wprintf("</FONT></TD></TR></TABLE>\n");
+               svprintf("BOXTITLE", WCS_STRING, "Administrative functions");
+               do_template("beginbox");
 
                wprintf("<UL>");
                wprintf("<LI><A HREF=\"/display_editroom\">\n");
                wprintf("Edit or delete this room</A>\n");
 
-                wprintf("<LI><A HREF=\"/display_whok\">\n");
-                wprintf("Show who knows this room</A>\n");
-
                wprintf("<LI><A HREF=\"/display_siteconfig\">\n");
                wprintf("Edit site-wide configuration</A>\n");
 
                if (WC->axlevel >= 6) {
+                       wprintf("<LI><A HREF=\"/select_user_to_edit\">\n");
+                       wprintf("Add, change, delete user accounts</A>\n");
+
                        wprintf("<LI><A HREF=\"/validate\">\n");
                        wprintf("Validate new users</A>\n");
 
-                       wprintf("<LI><A HREF=\"/select_floor_to_edit_pic\">\n");
-                       wprintf("Set or change a floor label graphic</A>\n");
+                       wprintf("<LI><A HREF=\"/display_floorconfig\">\n");
+                       wprintf("Add, change, or delete floors</A>\n");
 
                        wprintf("<LI><A HREF=\"/display_netconf\">\n");
                        wprintf("Configure networking with other systems</A>\n");
+                       wprintf("<LI><A HREF=\"/static/colorpicker.html\">\n");
+                       wprintf("Reconfigure color scheme</A>\n");
                }
                wprintf("</UL>\n");
+               do_template("endbox");
        }
        wprintf("</TD></TR></TABLE>");
-
-       wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=770077><TR><TD>");
-       wprintf("<FONT SIZE=+1 COLOR=\"FFFFFF\"");
-       wprintf("<B>Basic commands</B>\n");
-       wprintf("</FONT></TD></TR></TABLE>\n");
-
-}
-
-
-
-
-/*
- * menu of commands (as a page)
- */
-void display_main_menu(void)
-{
-       output_headers(1);
-       embed_main_menu();
        wDumpContent(2);
 }
 
 
-void display_advanced_menu(void)
-{
-       output_headers(1);
-       embed_advanced_menu();
-       embed_main_menu();
-       wDumpContent(2);
-}
+
 
 
 /*
@@ -232,10 +197,9 @@ void display_generic(void)
 {
        output_headers(1);
 
-       wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=770077><TR><TD>");
-       wprintf("<FONT SIZE=+1 COLOR=\"FFFFFF\"");
-       wprintf("<B>Enter a server command</B>\n");
-       wprintf("</FONT></TD></TR></TABLE>\n");
+       wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=\"#770077\"><TR><TD>");
+       wprintf("<SPAN CLASS=\"titlebar\">Enter a server command</SPAN>\n");
+       wprintf("</TD></TR></TABLE>\n");
 
        wprintf("<CENTER>");
        wprintf("This screen allows you to enter Citadel server commands which are\n");
@@ -248,8 +212,10 @@ void display_generic(void)
        wprintf("<INPUT TYPE=\"text\" NAME=\"g_cmd\" SIZE=80 MAXLENGTH=\"250\"><BR>\n");
 
        wprintf("Command input (if requesting SEND_LISTING transfer mode):<BR>\n");
-       wprintf("<TEXTAREA NAME=\"g_input\" ROWS=10 COLS=80 WIDTH=80></TEXTAREA>\n");
+       wprintf("<TEXTAREA NAME=\"g_input\" ROWS=10 COLS=80 WIDTH=80></TEXTAREA><BR>\n");
 
+       wprintf("<FONT SIZE=-2>Detected host header is http://%s</FONT>\n",
+               WC->http_host);
        wprintf("<INPUT TYPE=\"submit\" NAME=\"sc\" VALUE=\"Send command\">");
        wprintf("<INPUT TYPE=\"submit\" NAME=\"sc\" VALUE=\"Cancel\"><BR>\n");
 
@@ -259,8 +225,8 @@ void display_generic(void)
 
 void do_generic(void)
 {
-       char buf[256];
-       char gcontent[256];
+       char buf[SIZ];
+       char gcontent[SIZ];
        char *junk;
        size_t len;
 
@@ -274,10 +240,9 @@ void do_generic(void)
        serv_printf("%s", bstr("g_cmd"));
        serv_gets(buf);
 
-       wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=770077><TR><TD>");
-       wprintf("<FONT SIZE=+1 COLOR=\"FFFFFF\"");
-       wprintf("<B>Server command results</B>\n");
-       wprintf("</FONT></TD></TR></TABLE>\n");
+       wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=\"#770077\"><TR><TD>");
+       wprintf("<SPAN CLASS=\"titlebar\">Server command results</SPAN>\n");
+       wprintf("</TD></TR></TABLE>\n");
 
        wprintf("<TABLE border=0><TR><TD>Command:</TD><TD><TT>");
        escputs(bstr("g_cmd"));
@@ -296,7 +261,7 @@ void do_generic(void)
                wprintf("000");
        }
        if (buf[0] == '4') {
-               text_to_server(bstr("g_input"));
+               text_to_server(bstr("g_input"), 0);
                serv_puts("000");
        }
        if (buf[0] == '6') {
@@ -337,10 +302,10 @@ void display_menubar(int as_single_page) {
                        "BODY   { text-decoration: none; }\n"
                        "</STYLE>\n"
                        "</HEAD>\n");
-               do_template("background.html");
+               do_template("background");
        }
 
-       do_template("menubar.html");
+       do_template("menubar");
 
        if (as_single_page) {
                wDumpContent(2);
@@ -348,3 +313,5 @@ void display_menubar(int as_single_page) {
 
 
 }
+
+