* Moved the room access control screen into a tab on the edit room menu
authorArt Cancro <ajc@citadel.org>
Fri, 18 Feb 2005 05:09:53 +0000 (05:09 +0000)
committerArt Cancro <ajc@citadel.org>
Fri, 18 Feb 2005 05:09:53 +0000 (05:09 +0000)
webcit/ChangeLog
webcit/auth.c
webcit/iconbar.c
webcit/mainmenu.c
webcit/roomops.c
webcit/webcit.c
webcit/webcit.h

index dfb63079f95b63136225b5ef05cbd6ace09b246d..4e9345705d966d711ecccd85f5de3c69b035f800 100644 (file)
@@ -1,4 +1,7 @@
 $Log$
+Revision 602.4  2005/02/18 05:09:52  ajc
+* Moved the room access control screen into a tab on the edit room menu
+
 Revision 602.3  2005/02/17 04:48:26  ajc
 * After setup is complete, tell them how to log in.
 * Don't allow the creation of accounts with blank passwords.
@@ -2384,3 +2387,4 @@ Sun Dec  6 19:50:55 EST 1998 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
 
 1998-12-03 Nathan Bryant <bryant@cs.usm.maine.edu>
        * webserver.c: warning fix
+
index 9c57a6e67681aec371ea67cf2bf5d1b98e60ee3e..79f56ead519eb432cb9089d83ecfbd3c97c95129 100644 (file)
@@ -367,7 +367,7 @@ void display_changepw(void)
                fmout(NULL, "CENTER");
        }
 
-       wprintf("<form name=\"changepwform\" action=\"changepw\" method=\"post\" onLoad=\"document.changepwform.action.disabled = true\">\n");
+       wprintf("<form name=\"changepwform\" action=\"changepw\" method=\"post\">\n");
        wprintf("<CENTER>"
                "<table border=\"0\" cellspacing=\"5\" cellpadding=\"5\" "
                "BGCOLOR=\"#EEEEEE\">"
index 0fd151a938fee9dcdee9d0d935608d4f3efd1c73..0456c341b99d9fbdea7dfa729dfd8f77c06c0851 100644 (file)
@@ -55,7 +55,6 @@ void do_iconbar(void) {
        int ib_users = 1;       /* Users icon */
        int ib_chat = 1;        /* Chat icon */
        int ib_advanced = 1;    /* Advanced Options icon */
-       int ib_logoff = 1;      /* Logoff button */
        int ib_citadel = 1;     /* 'Powered by Citadel' logo */
        /*
         */
@@ -78,7 +77,6 @@ void do_iconbar(void) {
                if (!strcasecmp(key, "ib_users")) ib_users = atoi(value);
                if (!strcasecmp(key, "ib_chat")) ib_chat = atoi(value);
                if (!strcasecmp(key, "ib_advanced")) ib_advanced = atoi(value);
-               if (!strcasecmp(key, "ib_logoff")) ib_logoff = atoi(value);
                if (!strcasecmp(key, "ib_citadel")) ib_citadel = atoi(value);
        }
 
@@ -256,7 +254,23 @@ void do_iconbar(void) {
                wprintf("</A></li>\n");
        }
 
-       if (ib_logoff) {
+       if ((WC->axlevel >= 6) || (WC->is_room_aide)) {
+               wprintf("<li>"
+                       "<A HREF=\"/display_aide_menu\" "
+                       "TITLE=\"Room and system administration functions\" "
+                       ">"
+               );
+               if (ib_displayas != IB_TEXTONLY) {
+                       wprintf("<IMG BORDER=\"0\" WIDTH=\"32\" HEIGHT=\"32\" "
+                       "SRC=\"/static/advanced-icon.gif\">");
+               }
+               if (ib_displayas != IB_PICONLY) {
+                       wprintf("Administration");
+               }
+               wprintf("</A></li>\n");
+       }
+
+       if (1) {
                wprintf("<li>"
                        "<A HREF=\"/termquit\" TITLE=\"Log off\" "
                        "onClick=\"return confirm('Log off now?');\">"
@@ -302,6 +316,7 @@ void display_customize_iconbar(void) {
        char buf[SIZ];
        char key[SIZ], value[SIZ];
        int i;
+       int bar = 0;
 
        /* The initialized values of these variables also happen to
         * specify the default values for users who haven't customized
@@ -320,7 +335,6 @@ void display_customize_iconbar(void) {
        int ib_users = 1;       /* Users icon */
        int ib_chat = 1;        /* Chat icon */
        int ib_advanced = 1;    /* Advanced Options icon */
-       int ib_logoff = 1;      /* Logoff button */
        int ib_citadel = 1;     /* 'Powered by Citadel' logo */
        /*
         */
@@ -343,7 +357,6 @@ void display_customize_iconbar(void) {
                if (!strcasecmp(key, "ib_users")) ib_users = atoi(value);
                if (!strcasecmp(key, "ib_chat")) ib_chat = atoi(value);
                if (!strcasecmp(key, "ib_advanced")) ib_advanced = atoi(value);
-               if (!strcasecmp(key, "ib_logoff")) ib_logoff = atoi(value);
                if (!strcasecmp(key, "ib_citadel")) ib_citadel = atoi(value);
        }
 
@@ -379,7 +392,7 @@ void display_customize_iconbar(void) {
 
        wprintf("<TABLE border=0 cellspacing=0 cellpadding=3 width=100%%>\n");
 
-       wprintf("<TR BGCOLOR=\"#CCCCCC\"><TD>"
+       wprintf("<TR BGCOLOR=%s><TD>"
                "<INPUT TYPE=\"checkbox\" NAME=\"ib_logo\" VALUE=\"yes\" %s>"
                "</TD><TD>"
                "<IMG BORDER=\"0\" WIDTH=\"48\" HEIGHT=\"48\" "
@@ -388,10 +401,11 @@ void display_customize_iconbar(void) {
                "<B>Site logo</B><br />"
                "A graphic describing this site"
                "</TD></TR>\n",
+               ((bar = 1 - bar), (bar ? "\"#CCCCCC\"" : "\"#FFFFFF\"")),
                (ib_logo ? "CHECKED" : "")
        );
 
-       wprintf("<TR><TD>"
+       wprintf("<TR bgcolor=%s><TD>"
                "<INPUT TYPE=\"checkbox\" NAME=\"ib_summary\" VALUE=\"yes\" %s>"
                "</TD><TD>"
                "<IMG BORDER=\"0\" WIDTH=\"48\" HEIGHT=\"48\" "
@@ -400,10 +414,11 @@ void display_customize_iconbar(void) {
                "<B>Summary</B><br />"
                "Your summary page"
                "</TD></TR>\n",
+               ((bar = 1 - bar), (bar ? "\"#CCCCCC\"" : "\"#FFFFFF\"")),
                (ib_summary ? "CHECKED" : "")
        );
 
-       wprintf("<TR BGCOLOR=\"#CCCCCC\"><TD>"
+       wprintf("<TR bgcolor=%s><TD>"
                "<INPUT TYPE=\"checkbox\" NAME=\"ib_inbox\" VALUE=\"yes\" %s>"
                "</TD><TD>"
                "<IMG BORDER=\"0\" WIDTH=\"48\" HEIGHT=\"48\" "
@@ -412,10 +427,11 @@ void display_customize_iconbar(void) {
                "<B>Mail (inbox)</B><br />"
                "A shortcut to your e-mail Inbox."
                "</TD></TR>\n",
+               ((bar = 1 - bar), (bar ? "\"#CCCCCC\"" : "\"#FFFFFF\"")),
                (ib_inbox ? "CHECKED" : "")
        );
 
-       wprintf("<TR><TD>"
+       wprintf("<TR bgcolor=%s><TD>"
                "<INPUT TYPE=\"checkbox\" NAME=\"ib_contacts\" "
                "VALUE=\"yes\" %s>"
                "</TD><TD>"
@@ -425,10 +441,11 @@ void display_customize_iconbar(void) {
                "<B>Contacts</B><br />"
                "Your personal address book."
                "</TD></TR>\n",
+               ((bar = 1 - bar), (bar ? "\"#CCCCCC\"" : "\"#FFFFFF\"")),
                (ib_contacts ? "CHECKED" : "")
        );
 
-       wprintf("<TR BGCOLOR=\"#CCCCCC\"><TD>"
+       wprintf("<TR bgcolor=%s><TD>"
                "<INPUT TYPE=\"checkbox\" NAME=\"ib_notes\" "
                "VALUE=\"yes\" %s>"
                "</TD><TD>"
@@ -438,11 +455,12 @@ void display_customize_iconbar(void) {
                "<B>Notes</B><br />"
                "Your personal notes."
                "</TD></TR>\n",
+               ((bar = 1 - bar), (bar ? "\"#CCCCCC\"" : "\"#FFFFFF\"")),
                (ib_notes ? "CHECKED" : "")
        );
 
 #ifdef WEBCIT_WITH_CALENDAR_SERVICE
-       wprintf("<TR><TD>"
+       wprintf("<TR bgcolor=%s><TD>"
                "<INPUT TYPE=\"checkbox\" NAME=\"ib_calendar\" "
                "VALUE=\"yes\" %s>"
                "</TD><TD>"
@@ -452,10 +470,11 @@ void display_customize_iconbar(void) {
                "<B>Calendar</B><br />"
                "A shortcut to your personal calendar."
                "</TD></TR>\n",
+               ((bar = 1 - bar), (bar ? "\"#CCCCCC\"" : "\"#FFFFFF\"")),
                (ib_calendar ? "CHECKED" : "")
        );
 
-       wprintf("<TR BGCOLOR=\"#CCCCCC\"><TD>"
+       wprintf("<TR bgcolor=%s><TD>"
                "<INPUT TYPE=\"checkbox\" NAME=\"ib_tasks\" VALUE=\"yes\" %s>"
                "</TD><TD>"
                "<IMG BORDER=\"0\" WIDTH=\"48\" HEIGHT=\"48\" "
@@ -464,11 +483,12 @@ void display_customize_iconbar(void) {
                "<B>Tasks</B><br />"
                "A shortcut to your personal task list."
                "</TD></TR>\n",
+               ((bar = 1 - bar), (bar ? "\"#CCCCCC\"" : "\"#FFFFFF\"")),
                (ib_tasks ? "CHECKED" : "")
        );
 #endif /* WEBCIT_WITH_CALENDAR_SERVICE */
 
-       wprintf("<TR><TD>"
+       wprintf("<TR bgcolor=%s><TD>"
                "<INPUT TYPE=\"checkbox\" NAME=\"ib_rooms\" VALUE=\"yes\" %s>"
                "</TD><TD>"
                "<IMG BORDER=\"0\" WIDTH=\"48\" HEIGHT=\"48\" "
@@ -478,10 +498,11 @@ void display_customize_iconbar(void) {
                "Clicking this icon displays a list of all accesible "
                "rooms (or folders) available."
                "</TD></TR>\n",
+               ((bar = 1 - bar), (bar ? "\"#CCCCCC\"" : "\"#FFFFFF\"")),
                (ib_rooms ? "CHECKED" : "")
        );
 
-       wprintf("<TR BGCOLOR=\"#CCCCCC\"><TD>"
+       wprintf("<TR bgcolor=%s><TD>"
                "<INPUT TYPE=\"checkbox\" NAME=\"ib_users\" VALUE=\"yes\" %s>"
                "</TD><TD>"
                "<IMG BORDER=\"0\" WIDTH=\"48\" HEIGHT=\"48\" "
@@ -491,10 +512,11 @@ void display_customize_iconbar(void) {
                "Clicking this icon displays a list of all users "
                "currently logged in."
                "</TD></TR>\n",
+               ((bar = 1 - bar), (bar ? "\"#CCCCCC\"" : "\"#FFFFFF\"")),
                (ib_users ? "CHECKED" : "")
        );
 
-       wprintf("<TR><TD>"
+       wprintf("<TR bgcolor=%s><TD>"
                "<INPUT TYPE=\"checkbox\" NAME=\"ib_chat\" VALUE=\"yes\" %s>"
                "</TD><TD>"
                "<IMG BORDER=\"0\" WIDTH=\"48\" HEIGHT=\"48\" "
@@ -504,10 +526,11 @@ void display_customize_iconbar(void) {
                "Clicking this icon enters real-time chat mode "
                "with other users in the same room."
                "</TD></TR>\n",
+               ((bar = 1 - bar), (bar ? "\"#CCCCCC\"" : "\"#FFFFFF\"")),
                (ib_chat ? "CHECKED" : "")
        );
 
-       wprintf("<TR BGCOLOR=\"#CCCCCC\"><TD>"
+       wprintf("<TR bgcolor=%s><TD>"
                "<INPUT TYPE=\"checkbox\" NAME=\"ib_advanced\" "
                "VALUE=\"yes\" %s>"
                "</TD><TD>"
@@ -517,23 +540,11 @@ void display_customize_iconbar(void) {
                "<B>Advanced options</B><br />"
                "Access to the complete menu of Citadel functions."
                "</TD></TR>\n",
+               ((bar = 1 - bar), (bar ? "\"#CCCCCC\"" : "\"#FFFFFF\"")),
                (ib_advanced ? "CHECKED" : "")
        );
 
-       wprintf("<TR><TD>"
-               "<INPUT TYPE=\"checkbox\" NAME=\"ib_logoff\" "
-               "VALUE=\"yes\" %s>"
-               "</TD><TD>"
-               "<IMG BORDER=\"0\" WIDTH=\"48\" HEIGHT=\"48\" "
-               "SRC=\"/static/exit-icon.gif\" ALT=\"&nbsp;\">"
-               "</TD><TD>"
-               "<B>Log off</B><br />"
-               "Exit from the Citadel system.  If you remove this icon "
-               "then you will have no way out!"
-               "</TD></TR>\n",
-               (ib_logoff ? "CHECKED" : "")
-       );
-       wprintf("<TR BGCOLOR=\"#CCCCCC\"><TD>"
+       wprintf("<TR bgcolor=%s><TD>"
                "<INPUT TYPE=\"checkbox\" NAME=\"ib_citadel\" "
                "VALUE=\"yes\" %s>"
                "</TD><TD>"
@@ -543,6 +554,7 @@ void display_customize_iconbar(void) {
                "<B>Citadel logo</B><br />"
                "Displays the &quot;Powered by Citadel&quot; graphic"
                "</TD></TR>\n",
+               ((bar = 1 - bar), (bar ? "\"#CCCCCC\"" : "\"#FFFFFF\"")),
                (ib_citadel ? "CHECKED" : "")
        );
 
index ad3ca5286b50dfe8a574944847b059cb0b19f5b1..5a0af2f7d9d272fea88567c874c3658853f4f681 100644 (file)
@@ -132,33 +132,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");
 
@@ -181,7 +154,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");
@@ -205,53 +178,60 @@ 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></center>");
+       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");
-       }
+/*
+ * 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("<center><table border=0 width=99%% bgcolor=\"#ffffff\"><tr><td>\n");
+
+       wprintf("<A HREF=\"/display_siteconfig\">"
+               "<span class=\"mainmenu\">"
+               "Edit site-wide configuration</span></A>\n");
+
+       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");
+
        wprintf("</td></tr></table></center>");
        wDumpContent(2);
 }
@@ -265,10 +245,15 @@ 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("<center><table border=0 width=99%% bgcolor=\"#ffffff\"><tr><td>\n");
 
        wprintf("<CENTER>");
        wprintf("This screen allows you to enter Citadel server commands which are\n");
@@ -290,7 +275,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></center>\n");
        wDumpContent(1);
 }
 
index 56e8fe65fc151092b21e3e1e5dae67fe5d6ea4b7..ae1de7791d6a067deda1e3608e2c3b8696cf74f4 100644 (file)
@@ -826,7 +826,7 @@ void display_editroom(void)
        output_headers(1, 1, 1, 0, 0, 0, 0);
 
        /* print the tabbed dialog */
-       wprintf("<br /><TABLE border=0 cellspacing=0 cellpadding=0 width=100%%>"
+       wprintf("<br /><center><TABLE border=0 cellspacing=0 cellpadding=0 width=99%%>"
                "<TR ALIGN=CENTER>"
                "<TD>&nbsp;</TD>\n");
 
@@ -878,6 +878,22 @@ void display_editroom(void)
 
        wprintf("<TD>&nbsp;</TD>\n");
 
+       if (!strcmp(tab, "access")) {
+               wprintf("<TD BGCOLOR=\"#FFFFFF\"><SPAN CLASS=\"tablabel\">");
+       }
+       else {
+               wprintf("<TD BGCOLOR=\"#CCCCCC\"><A HREF=\"/display_editroom&tab=access\">");
+       }
+       wprintf("Access controls");
+       if (!strcmp(tab, "access")) {
+               wprintf("</SPAN></TD>\n");
+       }
+       else {
+               wprintf("</A></TD>\n");
+       }
+
+       wprintf("<TD>&nbsp;</TD>\n");
+
        if (!strcmp(tab, "sharing")) {
                wprintf("<TD BGCOLOR=\"#FFFFFF\"><SPAN CLASS=\"tablabel\">");
        }
@@ -914,7 +930,7 @@ void display_editroom(void)
        /* end tabbed dialog */ 
 
        /* begin content of whatever tab is open now */
-       wprintf("<TABLE border=0 width=100%% bgcolor=\"#FFFFFF\">\n"
+       wprintf("<TABLE border=0 width=99%% bgcolor=\"#FFFFFF\">\n"
                "<TR><TD>\n");
 
        if (!strcmp(tab, "admin")) {
@@ -1379,6 +1395,10 @@ void display_editroom(void)
 
        }
 
+       /* Mailing list management */
+       if (!strcmp(tab, "access")) {
+               display_whok();
+       }
 
        /* end content of whatever tab is open now */
        wprintf("</TD></TR></TABLE>\n");
@@ -1560,26 +1580,25 @@ void editroom(void)
        return;
 }
 
+
 /*
- * Invite, Kick, and show Who Knows a room
+ * Display form for Invite, Kick, and show Who Knows a room
  */
-void display_whok(void)
-{
+void do_invt_kick(void) {
         char buf[SIZ], room[SIZ], username[SIZ];
 
         serv_puts("GETR");
         serv_gets(buf);
 
         if (buf[0] != '2') {
-               strcpy(WC->ImportantMessage, &buf[4]);
-               display_main_menu();
+               escputs(&buf[4]);
                return;
         }
         extract(room, &buf[4], 0);
 
         strcpy(username, bstr("username"));
 
-        if(!strcmp(bstr("sc"), "Kick")) {
+        if (!strcmp(bstr("sc"), "Kick")) {
                 sprintf(buf, "KICK %s", username);
                 serv_puts(buf);
                 serv_gets(buf);
@@ -1591,7 +1610,9 @@ void display_whok(void)
                                "<B><I>User %s kicked out of room %s.</I></B>\n", 
                                 username, room);
                 }
-        } else if(!strcmp(bstr("sc"), "Invite")) {
+        }
+
+       if (!strcmp(bstr("sc"), "Invite")) {
                 sprintf(buf, "INVT %s", username);
                 serv_puts(buf);
                 serv_gets(buf);
@@ -1604,19 +1625,37 @@ void display_whok(void)
                                 username, room);
                 }
         }
-        
-        output_headers(1, 1, 1, 0, 0, 0, 0);
-       stresc(buf, WC->wc_roomname, 1, 1);
-       svprintf("BOXTITLE", WCS_STRING, "Access control list for %s", buf);
-       do_template("beginbox");
 
+       display_editroom();
+}
+
+
+
+/*
+ * Display form for Invite, Kick, and show Who Knows a room
+ */
+void display_whok(void)
+{
+        char buf[SIZ], room[SIZ], username[SIZ];
+
+        serv_puts("GETR");
+        serv_gets(buf);
+
+        if (buf[0] != '2') {
+               escputs(&buf[4]);
+               return;
+        }
+        extract(room, &buf[4], 0);
+
+        
        wprintf("<TABLE border=0 CELLSPACING=10><TR VALIGN=TOP>"
                "<TD>The users listed below have access to this room.  "
                "To remove a user from the access list, select the user "
                "name from the list and click 'Kick'.<br /><br />");
        
-        wprintf("<CENTER><FORM METHOD=\"POST\" ACTION=\"/display_whok\">\n");
-        wprintf("<SELECT NAME=\"username\" SIZE=10>\n");
+        wprintf("<CENTER><FORM METHOD=\"POST\" ACTION=\"/do_invt_kick\">\n");
+       wprintf("<INPUT TYPE=\"hidden\" NAME=\"tab\" VALUE=\"access\">\n");
+        wprintf("<SELECT NAME=\"username\" SIZE=\"10\" style=\"width:100%%\">\n");
         serv_puts("WHOK");
         serv_gets(buf);
         if (buf[0] == '1') {
@@ -1636,15 +1675,15 @@ void display_whok(void)
                "To grant another user access to this room, enter the "
                "user name in the box below and click 'Invite'.<br /><br />");
 
-        wprintf("<CENTER><FORM METHOD=\"POST\" ACTION=\"/display_whok\">\n");
+        wprintf("<CENTER><FORM METHOD=\"POST\" ACTION=\"/do_invt_kick\">\n");
+       wprintf("<INPUT TYPE=\"hidden\" NAME=\"tab\" VALUE=\"access\">\n");
         wprintf("Invite: ");
-        wprintf("<input type=text name=username><br />\n"
-               "<input type=hidden name=sc value=\"Invite\">"
-               "<input type=submit value=\"Invite\">"
+        wprintf("<input type=\"text\" name=\"username\" style=\"width:100%%\"><br />\n"
+               "<input type=\"hidden\" name=\"sc\" value=\"Invite\">"
+               "<input type=\"submit\" value=\"Invite\">"
                "</FORM></CENTER>\n");
 
        wprintf("</TD></TR></TABLE>\n");
-       do_template("endbox");
         wDumpContent(1);
 }
 
index 807c84b667ee30717bfb1174837e72a6b80159a6..d6f289e9032b8292d59d242a0c7b66923e6698b8 100644 (file)
@@ -1104,6 +1104,8 @@ void session_loop(struct httprequest *req)
                blank_page();
        } else if (!strcasecmp(action, "do_template")) {
                url_do_template();
+       } else if (!strcasecmp(action, "display_aide_menu")) {
+               display_aide_menu();
        } else if (!strcasecmp(action, "display_main_menu")) {
                display_main_menu();
        } else if (!strcasecmp(action, "whobbs")) {
@@ -1164,14 +1166,16 @@ void session_loop(struct httprequest *req)
                display_entroom();
        } else if (!strcasecmp(action, "entroom")) {
                entroom();
+       } else if (!strcasecmp(action, "display_whok")) {
+               display_whok();
+       } else if (!strcasecmp(action, "do_invt_kick")) {
+               do_invt_kick();
        } else if (!strcasecmp(action, "display_editroom")) {
                display_editroom();
        } else if (!strcasecmp(action, "netedit")) {
                netedit();
        } else if (!strcasecmp(action, "editroom")) {
                editroom();
-        } else if (!strcasecmp(action, "display_whok")) {
-                display_whok();
        } else if (!strcasecmp(action, "display_editinfo")) {
                display_edit("Room info", "EINF 0", "RINF", "/editinfo", 1);
        } else if (!strcasecmp(action, "editinfo")) {
index fce7285bab513003327be1247ce44fb834eea59d..9d82c7061d3bdd9be6f90b907abc53fd6bda3d5f 100644 (file)
@@ -267,6 +267,7 @@ void display_login(char *mesg);
 void do_welcome(void);
 void do_logout(void);
 void display_main_menu(void);
+void display_aide_menu(void);
 void display_advanced_menu(void);
 void slrp_highest(void);
 void gotonext(void);
@@ -333,6 +334,7 @@ void display_editroom(void);
 void netedit(void);
 void editroom(void);
 void display_whok(void);
+void do_invt_kick(void);
 void server_to_text(void);
 void save_edit(char *description, char *enter_cmd, int regoto);
 void display_edit(char *description, char *check_cmd,