]> code.citadel.org Git - citadel.git/blobdiff - webcit/mainmenu.c
* look and feel overhaul -- almost done!
[citadel.git] / webcit / mainmenu.c
index 805506d068bd6edb2061eee2d291b4559cceaf38..8b34b46666e6c8fafa65b8149c152e5ac97b0b06 100644 (file)
@@ -33,14 +33,10 @@ void display_main_menu(void)
 {
        output_headers(1);
 
-       wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=770077><TR><TD>"
-               "<FONT SIZE=+1 COLOR=\"FFFFFF\""
-               "<B>Basic commands</B>\n"
-               "</FONT></TD>"
-               "</TD></TR></TABLE>\n"
-               "<CENTER><TABLE border=0><TR>"
-       );
+       svprintf("BOXTITLE", WCS_STRING, "Basic commands");
+       do_template("beginbox");
 
+       wprintf("<TABLE border=0 align=center><TR>");
        wprintf("<TD>");        /* start of first column */
 
        wprintf("<UL>");
@@ -79,8 +75,8 @@ void display_main_menu(void)
        wprintf("</TD><TD>");   /* start of third column */
 
        wprintf("<UL>");
-       wprintf("<LI><B><A HREF=\"/whobbs\">\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");
@@ -90,15 +86,17 @@ void display_main_menu(void)
        wprintf("</UL>\n");
 
        wprintf("</TR></TABLE>\n");
+       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=\"/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");
 
@@ -106,13 +104,12 @@ void display_main_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");
@@ -128,14 +125,12 @@ void display_main_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");
@@ -154,14 +149,13 @@ void display_main_menu(void)
        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");
@@ -180,13 +174,11 @@ void display_main_menu(void)
                        wprintf("<LI><A HREF=\"/display_floorconfig\">\n");
                        wprintf("Add, change, or delete floors</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_netconf\">\n");
                        wprintf("Configure networking with other systems</A>\n");
                }
                wprintf("</UL>\n");
+               do_template("endbox");
        }
        wprintf("</TD></TR></TABLE>");
        wDumpContent(2);
@@ -201,12 +193,10 @@ void display_main_menu(void)
  */
 void display_generic(void)
 {
-       output_headers(1);
+       output_headers(3);
 
-       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");
+       svprintf("BOXTITLE", WCS_STRING, "Enter a server command");
+       do_template("beginbox");
 
        wprintf("<CENTER>");
        wprintf("This screen allows you to enter Citadel server commands which are\n");
@@ -219,12 +209,15 @@ 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");
 
        wprintf("</FORM></CENTER>\n");
+       do_template("endbox");
        wDumpContent(1);
 }
 
@@ -240,15 +233,13 @@ void do_generic(void)
                return;
        }
 
-       output_headers(1);
+       output_headers(3);
 
        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");
+       svprintf("BOXTITLE", WCS_STRING, "Server command results");
+       do_template("beginbox");
 
        wprintf("<TABLE border=0><TR><TD>Command:</TD><TD><TT>");
        escputs(bstr("g_cmd"));
@@ -286,6 +277,7 @@ void do_generic(void)
        wprintf("<HR>");
        wprintf("<A HREF=\"/display_generic\">Enter another command</A><BR>\n");
        wprintf("<A HREF=\"/display_advanced\">Return to menu</A>\n");
+       do_template("endbox");
        wDumpContent(1);
 }
 
@@ -319,3 +311,5 @@ void display_menubar(int as_single_page) {
 
 
 }
+
+