]> code.citadel.org Git - citadel.git/blobdiff - webcit/mainmenu.c
* The previous <div style=\"margin-right:1px\"> has been replaced by a
[citadel.git] / webcit / mainmenu.c
index 00407c911e33bd7f8954208a283c861d3e8826dd..fa08b32f43e4360eedfbfd9048d1ed56e7c99b13 100644 (file)
@@ -1,7 +1,9 @@
-/* $Id$ */
-
-
-
+/*
+ * $Id$
+ *
+ * Displays the "advanced" (main) menu.
+ *
+ */
 
 #include <ctype.h>
 #include <stdlib.h>
@@ -33,7 +35,8 @@ void display_main_menu(void)
 {
        output_headers(1, 1, 1, 0, 0, 0, 0);
 
-       wprintf("<TABLE WIDTH=100%%>"
+       wprintf("<div id=\"fix_scrollbar_bug\">"
+               "<TABLE WIDTH=100%%>"
                "<TR><TD COLSPAN=2>\n");
 
        svprintf("BOXTITLE", WCS_STRING, "Basic commands");
@@ -130,33 +133,6 @@ void display_main_menu(void)
        wprintf("</TD></TR>"
                "<TR VALIGN=TOP><TD>");
 
-       svprintf("BOXTITLE", WCS_STRING, "Interaction");
-       do_template("beginbox");
-
-       wprintf("<A HREF=\"/whobbs\">"
-               "<span class=\"mainmenu\">"
-               "Who is online now?</span></A><br />\n"
-       );
-
-       wprintf("<A HREF=\"#\" onClick=\"window.open('/chat', "
-               "'ctdl_chat_window', "
-               "'toolbar=no,location=no,directories=no,copyhistory=no,"
-               "status=no,scrollbars=yes,resizable=yes');\""
-               ">"
-               "<span class=\"mainmenu\">"
-               "Chat with other users in <i>"
-       );
-       escputs(WC->wc_roomname);
-       wprintf("</i></span></A><br />\n");
-
-       wprintf("<A HREF=\"/display_generic\">\n");
-       wprintf("<span class=\"mainmenu\">"
-               "Generic server command</span></A>\n");
-
-       do_template("endbox");
-
-       wprintf("</TD><TD>");
-
        svprintf("BOXTITLE", WCS_STRING, "Your info");
        do_template("beginbox");
 
@@ -179,7 +155,7 @@ void display_main_menu(void)
 
        do_template("endbox");
 
-       wprintf("</TD></TR><TR VALIGN=TOP><TD>");
+       wprintf("</TD><TD>");
 
        svprintf("BOXTITLE", WCS_STRING, "Advanced room commands");
        do_template("beginbox");
@@ -203,54 +179,78 @@ void display_main_menu(void)
                "Zap (forget) this room (%s)</span></A><br />\n",
                WC->wc_roomname);
 
-        wprintf("<A HREF=\"/display_whok\">\n"
-               "<span class=\"mainmenu\">"
-               "Access controls for this room</span></A><br />\n");
-
        wprintf("<A HREF=\"/zapped_list\">"
                "<span class=\"mainmenu\">"
                "List all forgotten rooms</span></A>\n");
 
        do_template("endbox");
 
-       wprintf("</TD><TD>");
+       wprintf("</td></tr></table></div>");
+       wDumpContent(2);
+}
 
-       if ((WC->axlevel >= 6) || (WC->is_room_aide)) {
-               svprintf("BOXTITLE", WCS_STRING, "Administrative functions");
-               do_template("beginbox");
 
-               wprintf("<A HREF=\"/display_siteconfig\">"
-                       "<span class=\"mainmenu\">"
-                       "Edit site-wide configuration</span></A>\n");
-
-               if (WC->axlevel >= 6) {
-                       wprintf("<br />"
-                               "<A HREF=\"/select_user_to_edit\">"
-                               "<span class=\"mainmenu\">"
-                               "Add, change, delete user accounts"
-                               "</span></A><br />\n");
-
-                       wprintf("<A HREF=\"/validate\">"
-                               "<span class=\"mainmenu\">"
-                               "Validate new users</span></A><br />\n");
-
-                       wprintf("<A HREF=\"/display_floorconfig\">"
-                               "<span class=\"mainmenu\">"
-                               "Add, change, or delete floors"
-                               "</span></A><br />\n");
-
-                       wprintf("<A HREF=\"/display_netconf\">"
-                               "<span class=\"mainmenu\">"
-                               "Configure networking with other systems"
-                               "</span></A><br />\n");
-
-                       wprintf("<A HREF=\"/display_inetconf\">"
-                               "<span class=\"mainmenu\">"
-                               "Internet and domain configuration</span></a><br />\n");
-               }
-               do_template("endbox");
-       }
-       wprintf("</TD></TR></TABLE>");
+/*
+ * System administration menu
+ */
+void display_aide_menu(void)
+{
+       output_headers(1, 1, 2, 0, 0, 0, 0);
+       wprintf("<div id=\"banner\">\n"
+               "<TABLE WIDTH=100%% BORDER=0 BGCOLOR=\"#444455\"><TR><TD>"
+               "<SPAN CLASS=\"titlebar\">System Administration Menu</SPAN>"
+               "</TD></TR></TABLE>\n"
+               "</div>\n<div id=\"content\">\n"
+       );
+
+       wprintf("<div id=\"fix_scrollbar_bug\">"
+               "<table border=0 width=100%%><tr valign=top><td>");
+
+       svprintf("BOXTITLE", WCS_STRING, "Global Configuration");
+       do_template("beginbox");
+
+       wprintf("<A HREF=\"/display_siteconfig\">"
+               "<span class=\"mainmenu\">"
+               "Edit site-wide configuration</span></A><br />\n");
+
+       wprintf("<A HREF=\"/display_inetconf\">"
+               "<span class=\"mainmenu\">"
+               "Domain names and Internet mail configuration</span></a><br />\n");
+
+       wprintf("<A HREF=\"/display_netconf\">"
+               "<span class=\"mainmenu\">"
+               "Configure replication with other Citadel servers"
+               "</span></A>\n");
+
+       do_template("endbox");
+
+       wprintf("</td><td>");
+
+       svprintf("BOXTITLE", WCS_STRING, "User account management");
+       do_template("beginbox");
+
+       wprintf("<A HREF=\"/select_user_to_edit\">"
+               "<span class=\"mainmenu\">"
+               "Add, change, delete user accounts"
+               "</span></A><br />\n");
+
+       wprintf("<A HREF=\"/validate\">"
+               "<span class=\"mainmenu\">"
+               "Validate new users</span></A><br />\n");
+
+       do_template("endbox");
+
+       svprintf("BOXTITLE", WCS_STRING, "Rooms and Floors");
+       do_template("beginbox");
+
+       wprintf("<A HREF=\"/display_floorconfig\">"
+               "<span class=\"mainmenu\">"
+               "Add, change, or delete floors"
+               "</span></A>\n");
+
+       do_template("endbox");
+
+       wprintf("</td></tr></table></div>");
        wDumpContent(2);
 }
 
@@ -263,10 +263,16 @@ void display_main_menu(void)
  */
 void display_generic(void)
 {
-       output_headers(1, 1, 0, 0, 0, 0, 0);
+       output_headers(1, 1, 2, 0, 0, 0, 0);
+       wprintf("<div id=\"banner\">\n"
+               "<TABLE WIDTH=100%% BORDER=0 BGCOLOR=\"#444455\"><TR><TD>"
+               "<SPAN CLASS=\"titlebar\">Enter a server command</SPAN>"
+               "</TD></TR></TABLE>\n"
+               "</div>\n<div id=\"content\">\n"
+       );
 
-       svprintf("BOXTITLE", WCS_STRING, "Enter a server command");
-       do_template("beginbox");
+       wprintf("<div id=\"fix_scrollbar_bug\">"
+               "<table border=0 width=100%% bgcolor=\"#ffffff\"><tr><td>\n");
 
        wprintf("<CENTER>");
        wprintf("This screen allows you to enter Citadel server commands which are\n");
@@ -288,7 +294,7 @@ void display_generic(void)
        wprintf("<INPUT TYPE=\"submit\" NAME=\"sc\" VALUE=\"Cancel\"><br />\n");
 
        wprintf("</FORM></CENTER>\n");
-       do_template("endbox");
+       wprintf("</td></tr></table></div>\n");
        wDumpContent(1);
 }