From: Art Cancro Date: Fri, 18 Feb 2005 05:09:53 +0000 (+0000) Subject: * Moved the room access control screen into a tab on the edit room menu X-Git-Tag: v7.86~5038 X-Git-Url: https://code.citadel.org/?a=commitdiff_plain;h=ff28c875671ab347f07aaaba5883fb4d47ece6ea;p=citadel.git * Moved the room access control screen into a tab on the edit room menu --- diff --git a/webcit/ChangeLog b/webcit/ChangeLog index dfb63079f..4e9345705 100644 --- a/webcit/ChangeLog +++ b/webcit/ChangeLog @@ -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 1998-12-03 Nathan Bryant * webserver.c: warning fix + diff --git a/webcit/auth.c b/webcit/auth.c index 9c57a6e67..79f56ead5 100644 --- a/webcit/auth.c +++ b/webcit/auth.c @@ -367,7 +367,7 @@ void display_changepw(void) fmout(NULL, "CENTER"); } - wprintf("
\n"); + wprintf("\n"); wprintf("
" "" diff --git a/webcit/iconbar.c b/webcit/iconbar.c index 0fd151a93..0456c341b 100644 --- a/webcit/iconbar.c +++ b/webcit/iconbar.c @@ -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("\n"); } - if (ib_logoff) { + if ((WC->axlevel >= 6) || (WC->is_room_aide)) { + wprintf("
  • " + "" + ); + if (ib_displayas != IB_TEXTONLY) { + wprintf(""); + } + if (ib_displayas != IB_PICONLY) { + wprintf("Administration"); + } + wprintf("
  • \n"); + } + + if (1) { wprintf("
  • " "" @@ -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("
  • \n"); - wprintf("\n", + ((bar = 1 - bar), (bar ? "\"#CCCCCC\"" : "\"#FFFFFF\"")), (ib_logo ? "CHECKED" : "") ); - wprintf("\n", + ((bar = 1 - bar), (bar ? "\"#CCCCCC\"" : "\"#FFFFFF\"")), (ib_summary ? "CHECKED" : "") ); - wprintf("\n", + ((bar = 1 - bar), (bar ? "\"#CCCCCC\"" : "\"#FFFFFF\"")), (ib_inbox ? "CHECKED" : "") ); - wprintf("\n", + ((bar = 1 - bar), (bar ? "\"#CCCCCC\"" : "\"#FFFFFF\"")), (ib_contacts ? "CHECKED" : "") ); - wprintf("\n", + ((bar = 1 - bar), (bar ? "\"#CCCCCC\"" : "\"#FFFFFF\"")), (ib_notes ? "CHECKED" : "") ); #ifdef WEBCIT_WITH_CALENDAR_SERVICE - wprintf("\n", + ((bar = 1 - bar), (bar ? "\"#CCCCCC\"" : "\"#FFFFFF\"")), (ib_calendar ? "CHECKED" : "") ); - wprintf("\n", + ((bar = 1 - bar), (bar ? "\"#CCCCCC\"" : "\"#FFFFFF\"")), (ib_tasks ? "CHECKED" : "") ); #endif /* WEBCIT_WITH_CALENDAR_SERVICE */ - wprintf("\n", + ((bar = 1 - bar), (bar ? "\"#CCCCCC\"" : "\"#FFFFFF\"")), (ib_rooms ? "CHECKED" : "") ); - wprintf("\n", + ((bar = 1 - bar), (bar ? "\"#CCCCCC\"" : "\"#FFFFFF\"")), (ib_users ? "CHECKED" : "") ); - wprintf("\n", + ((bar = 1 - bar), (bar ? "\"#CCCCCC\"" : "\"#FFFFFF\"")), (ib_chat ? "CHECKED" : "") ); - wprintf("\n", + ((bar = 1 - bar), (bar ? "\"#CCCCCC\"" : "\"#FFFFFF\"")), (ib_advanced ? "CHECKED" : "") ); - wprintf("\n", - (ib_logoff ? "CHECKED" : "") - ); - wprintf("\n", + ((bar = 1 - bar), (bar ? "\"#CCCCCC\"" : "\"#FFFFFF\"")), (ib_citadel ? "CHECKED" : "") ); diff --git a/webcit/mainmenu.c b/webcit/mainmenu.c index ad3ca5286..5a0af2f7d 100644 --- a/webcit/mainmenu.c +++ b/webcit/mainmenu.c @@ -132,33 +132,6 @@ void display_main_menu(void) wprintf("" "
    " + wprintf("
    " "" "" "Site logo
    " "A graphic describing this site" "
    " + wprintf("
    " "" "" "Summary
    " "Your summary page" "
    " + wprintf("
    " "" "" "Mail (inbox)
    " "A shortcut to your e-mail Inbox." "
    " + wprintf("
    " "" "" @@ -425,10 +441,11 @@ void display_customize_iconbar(void) { "Contacts
    " "Your personal address book." "
    " + wprintf("
    " "" "" @@ -438,11 +455,12 @@ void display_customize_iconbar(void) { "Notes
    " "Your personal notes." "
    " + wprintf("
    " "" "" @@ -452,10 +470,11 @@ void display_customize_iconbar(void) { "Calendar
    " "A shortcut to your personal calendar." "
    " + wprintf("
    " "" "" "Tasks
    " "A shortcut to your personal task list." "
    " + wprintf("
    " "" "" "
    " + wprintf("
    " "" "" "
    " + wprintf("
    " "" "" "
    " + wprintf("
    " "" "" @@ -517,23 +540,11 @@ void display_customize_iconbar(void) { "Advanced options
    " "Access to the complete menu of Citadel functions." "
    " - "" - "" - "\" \"" - "" - "Log off
    " - "Exit from the Citadel system. If you remove this icon " - "then you will have no way out!" - "
    " + wprintf("
    " "" "" @@ -543,6 +554,7 @@ void display_customize_iconbar(void) { "Citadel logo
    " "Displays the "Powered by Citadel" graphic" "
    "); - svprintf("BOXTITLE", WCS_STRING, "Interaction"); - do_template("beginbox"); - - wprintf("" - "" - "Who is online now?
    \n" - ); - - wprintf("" - "" - "Chat with other users in " - ); - escputs(WC->wc_roomname); - wprintf("
    \n"); - - wprintf("\n"); - wprintf("" - "Generic server command\n"); - - do_template("endbox"); - - wprintf("
    "); - svprintf("BOXTITLE", WCS_STRING, "Your info"); do_template("beginbox"); @@ -181,7 +154,7 @@ void display_main_menu(void) do_template("endbox"); - wprintf("
    "); + wprintf(""); svprintf("BOXTITLE", WCS_STRING, "Advanced room commands"); do_template("beginbox"); @@ -205,53 +178,60 @@ void display_main_menu(void) "Zap (forget) this room (%s)
    \n", WC->wc_roomname); - wprintf("\n" - "" - "Access controls for this room
    \n"); - wprintf("" "" "List all forgotten rooms\n"); do_template("endbox"); - wprintf("
    "); + wprintf("
    "); + wDumpContent(2); +} - if ((WC->axlevel >= 6) || (WC->is_room_aide)) { - svprintf("BOXTITLE", WCS_STRING, "Administrative functions"); - do_template("beginbox"); - wprintf("" - "" - "Edit site-wide configuration\n"); - - if (WC->axlevel >= 6) { - wprintf("
    " - "" - "" - "Add, change, delete user accounts" - "
    \n"); - - wprintf("" - "" - "Validate new users
    \n"); - - wprintf("" - "" - "Add, change, or delete floors" - "
    \n"); - - wprintf("" - "" - "Configure networking with other systems" - "
    \n"); - - wprintf("" - "" - "Internet and domain configuration
    \n"); - } - do_template("endbox"); - } +/* + * System administration menu + */ +void display_aide_menu(void) +{ + output_headers(1, 1, 2, 0, 0, 0, 0); + wprintf("
    \n" + "
    " + "System Administration Menu" + "
    \n" + "
    \n
    \n" + ); + + wprintf("
    \n"); + + wprintf("" + "" + "Edit site-wide configuration\n"); + + wprintf("
    " + "" + "" + "Add, change, delete user accounts" + "
    \n"); + + wprintf("" + "" + "Validate new users
    \n"); + + wprintf("" + "" + "Add, change, or delete floors" + "
    \n"); + + wprintf("" + "" + "Configure networking with other systems" + "
    \n"); + + wprintf("" + "" + "Internet and domain configuration
    \n"); + wprintf("
    "); 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("
    \n" + "
    " + "Enter a server command" + "
    \n" + "
    \n
    \n" + ); - svprintf("BOXTITLE", WCS_STRING, "Enter a server command"); - do_template("beginbox"); + wprintf("
    \n"); wprintf("
    "); wprintf("This screen allows you to enter Citadel server commands which are\n"); @@ -290,7 +275,7 @@ void display_generic(void) wprintf("
    \n"); wprintf("
    \n"); - do_template("endbox"); + wprintf("
    \n"); wDumpContent(1); } diff --git a/webcit/roomops.c b/webcit/roomops.c index 56e8fe65f..ae1de7791 100644 --- a/webcit/roomops.c +++ b/webcit/roomops.c @@ -826,7 +826,7 @@ void display_editroom(void) output_headers(1, 1, 1, 0, 0, 0, 0); /* print the tabbed dialog */ - wprintf("
    " + wprintf("
    " "" "\n"); @@ -878,6 +878,22 @@ void display_editroom(void) wprintf("\n"); + if (!strcmp(tab, "access")) { + wprintf("\n"); + } + else { + wprintf("\n"); + } + + wprintf("\n"); + if (!strcmp(tab, "sharing")) { wprintf("
      "); + } + else { + wprintf(""); + } + wprintf("Access controls"); + if (!strcmp(tab, "access")) { + wprintf(" "); } @@ -914,7 +930,7 @@ void display_editroom(void) /* end tabbed dialog */ /* begin content of whatever tab is open now */ - wprintf("\n" + wprintf("
    \n" "
    \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("
    \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) "User %s kicked out of room %s.\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("" "
    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'.

    "); - wprintf("
    \n"); - wprintf("\n"); + wprintf("\n"); wprintf("Invite: "); - wprintf("
    \n" - "" - "" + wprintf("
    \n" + "" + "" "
    \n"); wprintf("
    \n"); - do_template("endbox"); wDumpContent(1); } diff --git a/webcit/webcit.c b/webcit/webcit.c index 807c84b66..d6f289e90 100644 --- a/webcit/webcit.c +++ b/webcit/webcit.c @@ -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")) { diff --git a/webcit/webcit.h b/webcit/webcit.h index fce7285ba..9d82c7061 100644 --- a/webcit/webcit.h +++ b/webcit/webcit.h @@ -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,