10 #include <sys/types.h>
12 #include <sys/socket.h>
15 #include <netinet/in.h>
32 char floorlist[128][SIZ];
35 * load the list of floors
37 void load_floorlist(void)
42 for (a = 0; a < 128; ++a)
48 strcpy(floorlist[0], "Main Floor");
51 while (serv_gets(buf), strcmp(buf, "000")) {
52 extract(floorlist[extract_int(buf, 0)], buf, 1);
58 * remove a room from the march list
60 void remove_march(char *aaa)
62 struct march *mptr, *mptr2;
64 if (WC->march == NULL)
67 if (!strcasecmp(WC->march->march_name, aaa)) {
68 mptr = WC->march->next;
74 for (mptr = WC->march; mptr != NULL; mptr = mptr->next) {
75 if (!strcasecmp(mptr->march_name, aaa)) {
76 mptr2->next = mptr->next;
89 void room_tree_list(struct roomlisting *rp)
97 if (rp->lnext != NULL) {
98 room_tree_list(rp->lnext);
100 strcpy(rmname, rp->rlname);
103 wprintf("<A HREF=\"/dotgoto&room=");
108 if ((f & QR_DIRECTORY) && (f & QR_NETWORK))
110 else if (f & QR_DIRECTORY)
112 else if (f & QR_NETWORK)
116 wprintf("</A><TT> </TT>\n");
118 if (rp->rnext != NULL) {
119 room_tree_list(rp->rnext);
126 * Room ordering stuff (compare first by floor, then by order)
128 int rordercmp(struct roomlisting *r1, struct roomlisting *r2)
130 if ((r1 == NULL) && (r2 == NULL))
136 if (r1->rlfloor < r2->rlfloor)
138 if (r1->rlfloor > r2->rlfloor)
140 if (r1->rlorder < r2->rlorder)
142 if (r1->rlorder > r2->rlorder)
149 * Common code for all room listings
151 void listrms(char *variety)
156 struct roomlisting *rl = NULL;
157 struct roomlisting *rp;
158 struct roomlisting *rs;
161 /* Ask the server for a room list */
168 while (serv_gets(buf), strcmp(buf, "000")) {
170 rp = malloc(sizeof(struct roomlisting));
171 extract(rp->rlname, buf, 0);
172 rp->rlflags = extract_int(buf, 1);
173 rp->rlfloor = extract_int(buf, 2);
174 rp->rlorder = extract_int(buf, 3);
183 if (rordercmp(rp, rs) < 0) {
184 if (rs->lnext == NULL) {
191 if (rs->rnext == NULL) {
203 /* If no rooms were listed, print an nbsp to make the cell
204 * borders show up anyway.
206 if (num_rooms == 0) wprintf(" ");
218 * list all rooms by floor (only should get called from knrooms() because
219 * that's where output_headers() is called from)
221 void list_all_rooms_by_floor(void)
226 wprintf("<TABLE width=100%% border><TR><TH>Floor</TH>");
227 wprintf("<TH>Rooms with new messages</TH>");
228 wprintf("<TH>Rooms with no new messages</TH></TR>\n");
230 for (a = 0; a < 128; ++a)
231 if (floorlist[a][0] != 0) {
233 /* Floor name column */
236 serv_printf("OIMG _floorpic_|%d", a);
241 wprintf("<IMG SRC=\"/image&name=_floorpic_&parm=%d\" ALT=\"%s\">",
242 a, &floorlist[a][0]);
244 escputs(&floorlist[a][0]);
249 /* Rooms with new messages column */
251 sprintf(buf, "LKRN %d", a);
253 wprintf("</TD>\n<TD>");
255 /* Rooms with old messages column */
256 sprintf(buf, "LKRO %d", a);
258 wprintf("</TD></TR>\n");
260 wprintf("</TABLE>\n");
266 * list all forgotten rooms
268 void zapped_list(void)
271 wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=770000><TR><TD>");
272 wprintf("<FONT SIZE=+1 COLOR=\"FFFFFF\"");
273 wprintf("<B>Zapped (forgotten) rooms</B>\n");
274 wprintf("</TD></TR></TABLE><BR>\n");
276 wprintf("<BR><BR>\n");
277 wprintf("Click on any room to un-zap it and goto that room.\n");
283 * read this room's info file (set v to 1 for verbose mode)
299 /* Display room graphic. The server doesn't actually
300 * need the room name, but we supply it in order to
301 * keep the browser from using a cached graphic from
304 void embed_room_graphic(void) {
307 serv_puts("OIMG _roompic_");
310 wprintf("<TD BGCOLOR=444455>");
311 wprintf("<IMG SRC=\"/image&name=_roompic_&room=");
312 urlescputs(WC->wc_roomname);
321 /* Let the user know if new mail has arrived
323 void embed_newmail_button(void) {
324 if ( (WC->new_mail > WC->remember_new_mail) && (WC->new_mail>0) ) {
326 "<A HREF=\"/dotgoto?room=_MAIL_\">"
327 "<IMG SRC=\"/static/mail.gif\" border=0 "
328 "ALT=\"You have new mail\">"
329 "<BR><FONT SIZE=2 COLOR=FFFFFF>"
330 "%d new mail</FONT></A>", WC->new_mail);
331 WC->remember_new_mail = WC->new_mail;
338 * Display the current view and offer an option to change it
340 void embed_view_o_matic(void) {
343 wprintf("<FORM NAME=\"viewomatic\">\n"
344 "<SELECT NAME=\"newview\" SIZE=\"1\" "
345 "OnChange=\"location.href=viewomatic.newview.options"
346 "[selectedIndex].value\">\n");
348 for (i=0; i<(sizeof viewdefs / sizeof (char *)); ++i) {
349 wprintf("<OPTION %s VALUE=\"/changeview?view=%d\">",
350 ((i == WC->wc_view) ? "SELECTED" : ""),
352 escputs(viewdefs[i]);
353 wprintf("</OPTION>\n");
355 wprintf("</SELECT></FORM>\n");
360 void embed_room_banner(char *got) {
363 /* We need to have the information returned by a GOTO server command.
364 * If it isn't supplied, we fake it by issuing our own GOTO.
367 serv_printf("GOTO %s", WC->wc_roomname);
372 /* If the user happens to select the "make this my start page" link,
373 * we want it to remember the URL as a "/dotskip" one instead of
374 * a "skip" or "gotonext" or something like that.
376 snprintf(WC->this_page, sizeof(WC->this_page), "/dotskip&room=%s",
379 /* Check for new mail. */
380 WC->new_mail = extract_int(&got[4], 9);
381 WC->wc_view = extract_int(&got[4], 11);
383 svprintf("ROOMNAME", WCS_STRING, "%s", WC->wc_roomname);
384 svprintf("NEWMSGS", WCS_STRING, "%d", extract_int(&got[4], 1));
385 svprintf("TOTALMSGS", WCS_STRING, "%d", extract_int(&got[4], 2));
386 svcallback("ROOMPIC", embed_room_graphic);
387 svcallback("ROOMINFO", readinfo);
388 svcallback("YOUHAVEMAIL", embed_newmail_button);
389 svcallback("VIEWOMATIC", embed_view_o_matic);
390 svcallback("START", offer_start_page);
392 do_template("roombanner");
393 clear_local_substs();
401 * generic routine to take the session to a new room
403 * display_name values: 0 = goto only
404 * 1 = goto and display
407 void gotoroom(char *gname, int display_name)
410 static long ls = (-1L);
415 wprintf("Pragma: no-cache\n");
416 wprintf("Cache-Control: no-store\n");
418 wprintf("<HTML><HEAD>\n"
419 "<META HTTP-EQUIV=\"refresh\" CONTENT=\"500363689;\">\n"
420 "<META HTTP-EQUIV=\"Pragma\" CONTENT=\"no-cache\">\n"
421 "<META HTTP-EQUIV=\"expired\" CONTENT=\"28-May-1971 18:10:00 GMT\">\n"
422 "<meta name=\"MSSmartTagsPreventParsing\" content=\"TRUE\">\n"
424 do_template("background");
426 if (display_name != 2) {
427 /* store ungoto information */
428 strcpy(WC->ugname, WC->wc_roomname);
431 /* move to the new room */
432 serv_printf("GOTO %s", gname);
435 serv_puts("GOTO _BASEROOM_");
440 wprintf("<EM>%s</EM><BR>\n", &buf[4]);
445 extract(WC->wc_roomname, &buf[4], 0);
446 WC->room_flags = extract_int(&buf[4], 4);
447 /* highest_msg_read = extract_int(&buf[4],6);
448 maxmsgnum = extract_int(&buf[4],5);
449 is_mail = (char) extract_int(&buf[4],7); */
450 ls = extract_long(&buf[4], 6);
453 WC->is_room_aide = WC->is_aide;
455 WC->is_room_aide = (char) extract_int(&buf[4], 8);
457 remove_march(WC->wc_roomname);
458 if (!strcasecmp(gname, "_BASEROOM_"))
461 /* Display the room banner */
463 embed_room_banner(buf);
466 strcpy(WC->wc_roomname, WC->wc_roomname);
467 WC->wc_view = extract_int(&buf[4], 11);
472 * Locate the room on the march list which we most want to go to. Each room
473 * is measured given a "weight" of preference based on various factors.
475 char *pop_march(int desired_floor)
477 static char TheRoom[64];
479 int TheOrder = 32767;
482 struct march *mptr = NULL;
484 strcpy(TheRoom, "_BASEROOM_");
485 if (WC->march == NULL)
488 for (mptr = WC->march; mptr != NULL; mptr = mptr->next) {
490 if ((strcasecmp(mptr->march_name, "_BASEROOM_")))
491 weight = weight + 10000;
492 if (mptr->march_floor == desired_floor)
493 weight = weight + 5000;
495 weight = weight + ((128 - (mptr->march_floor)) * 128);
496 weight = weight + (128 - (mptr->march_order));
498 if (weight > TheWeight) {
500 strcpy(TheRoom, mptr->march_name);
501 TheFloor = mptr->march_floor;
502 TheOrder = mptr->march_order;
510 /* Goto next room having unread messages.
511 * We want to skip over rooms that the user has already been to, and take the
512 * user back to the lobby when done. The room we end up in is placed in
513 * newroom - which is set to 0 (the lobby) initially.
514 * We start the search in the current room rather than the beginning to prevent
515 * two or more concurrent users from dragging each other back to the same room.
520 struct march *mptr, *mptr2;
523 /* First check to see if the march-mode list is already allocated.
524 * If it is, pop the first room off the list and go there.
527 if (WC->march == NULL) {
531 while (serv_gets(buf), strcmp(buf, "000")) {
532 mptr = (struct march *) malloc(sizeof(struct march));
534 extract(mptr->march_name, buf, 0);
535 mptr->march_floor = extract_int(buf, 2);
536 mptr->march_order = extract_int(buf, 3);
537 if (WC->march == NULL) {
541 while (mptr2->next != NULL)
546 /* add _BASEROOM_ to the end of the march list, so the user will end up
547 * in the system base room (usually the Lobby>) at the end of the loop
549 mptr = (struct march *) malloc(sizeof(struct march));
551 strcpy(mptr->march_name, "_BASEROOM_");
552 if (WC->march == NULL) {
556 while (mptr2->next != NULL)
561 * ...and remove the room we're currently in, so a <G>oto doesn't make us
562 * walk around in circles
564 remove_march(WC->wc_roomname);
566 if (WC->march != NULL) {
567 strcpy(next_room, pop_march(-1));
569 strcpy(next_room, "_BASEROOM_");
573 smart_goto(next_room);
577 void smart_goto(char *next_room) {
578 gotoroom(next_room, 0);
585 * mark all messages in current room as having been read
587 void slrp_highest(void)
592 serv_puts("SLRP HIGHEST");
595 wprintf("<EM>%s</EM><BR>\n", &buf[4]);
602 * un-goto the previous room
608 if (!strcmp(WC->ugname, "")) {
609 smart_goto(WC->wc_roomname);
612 serv_printf("GOTO %s", WC->ugname);
615 smart_goto(WC->wc_roomname);
618 if (WC->uglsn >= 0L) {
619 serv_printf("SLRP %ld", WC->uglsn);
622 strcpy(buf, WC->ugname);
623 strcpy(WC->ugname, "");
632 * Set/clear/read the "self-service list subscribe" flag for a room
634 * Set 'newval' to 0 to clear, 1 to set, any other value to leave unchanged.
635 * Always returns the new value.
638 int self_service(int newval) {
639 int current_value = 0;
645 int flags, floor, order, view, flags2;
649 if (buf[0] != '2') return(0);
651 extract(name, &buf[4], 0);
652 extract(password, &buf[4], 1);
653 extract(dirname, &buf[4], 2);
654 flags = extract_int(&buf[4], 3);
655 floor = extract_int(&buf[4], 4);
656 order = extract_int(&buf[4], 5);
657 view = extract_int(&buf[4], 6);
658 flags2 = extract_int(&buf[4], 7);
660 if (flags2 & QR2_SELFLIST) {
668 flags2 = flags2 | QR2_SELFLIST;
670 else if (newval == 0) {
671 flags2 = flags2 & ~QR2_SELFLIST;
674 return(current_value);
677 if (newval != current_value) {
678 serv_printf("SETR %s|%s|%s|%d|0|%d|%d|%d|%d",
679 name, password, dirname, flags,
680 floor, order, view, flags2);
694 * display the form for editing a room
696 void display_editroom(void)
703 char er_password[10];
705 char er_roomaide[26];
711 char *not_shared_with;
714 if (strlen(tab) == 0) tab = "admin";
720 display_error(&buf[4]);
723 extract(er_name, &buf[4], 0);
724 extract(er_password, &buf[4], 1);
725 extract(er_dirname, &buf[4], 2);
726 er_flags = extract_int(&buf[4], 3);
727 er_floor = extract_int(&buf[4], 4);
731 /* print the tabbed dialog */
732 wprintf("<TABLE border=0 cellspacing=0 cellpadding=0 width=100%%>"
733 "<TR ALIGN=CENTER BGCOLOR=FFFFFF>"
734 "<TD> </TD>\n");
736 if (!strcmp(tab, "admin")) {
737 wprintf("<TD BGCOLOR=000077><FONT SIZE=+1 COLOR=\"FFFFFF\"><B>");
740 wprintf("<TD BGCOLOR=AAAAAA><A HREF=\"/display_editroom&tab=admin\">");
742 wprintf("Room administration");
743 if (!strcmp(tab, "admin")) {
744 wprintf("</B></FONT></TD>\n");
747 wprintf("</A></TD>\n");
750 wprintf("<TD> </TD>\n");
752 if (!strcmp(tab, "config")) {
753 wprintf("<TD BGCOLOR=000077><FONT SIZE=+1 COLOR=\"FFFFFF\"><B>");
756 wprintf("<TD BGCOLOR=AAAAAA><A HREF=\"/display_editroom&tab=config\">");
758 wprintf("Room configuration");
759 if (!strcmp(tab, "config")) {
760 wprintf("</B></FONT></TD>\n");
763 wprintf("</A></TD>\n");
766 wprintf("<TD> </TD>\n");
768 if (!strcmp(tab, "sharing")) {
769 wprintf("<TD BGCOLOR=000077><FONT SIZE=+1 COLOR=\"FFFFFF\"><B>");
772 wprintf("<TD BGCOLOR=AAAAAA><A HREF=\"/display_editroom&tab=sharing\">");
775 if (!strcmp(tab, "sharing")) {
776 wprintf("</B></FONT></TD>\n");
779 wprintf("</A></TD>\n");
782 wprintf("<TD> </TD>\n");
784 if (!strcmp(tab, "listserv")) {
785 wprintf("<TD BGCOLOR=000077><FONT SIZE=+1 COLOR=\"FFFFFF\"><B>");
788 wprintf("<TD BGCOLOR=AAAAAA><A HREF=\"/display_editroom&tab=listserv\">");
790 wprintf("Mailing list service");
791 if (!strcmp(tab, "listserv")) {
792 wprintf("</B></FONT></TD>\n");
795 wprintf("</A></TD>\n");
798 wprintf("<TD> </TD></TR>"
799 "<TR><TD BGCOLOR=000077 COLSPAN=9 HEIGHT=5> </TD></TR>"
802 /* end tabbed dialog */
805 if (!strcmp(tab, "admin")) {
807 "<LI><A HREF=\"/confirm_delete_room\">\n"
808 "Delete this room</A>\n"
809 "<LI><A HREF=\"/display_editroompic\">\n"
810 "Set or change the graphic for this room's banner</A>\n"
811 "<LI><A HREF=\"/display_editinfo\">\n"
812 "Edit this room's Info file</A>\n"
816 if (!strcmp(tab, "config")) {
817 wprintf("<FORM METHOD=\"POST\" ACTION=\"/editroom\">\n");
819 wprintf("<UL><LI>Name of room: ");
820 wprintf("<INPUT TYPE=\"text\" NAME=\"er_name\" VALUE=\"%s\" MAXLENGTH=\"19\">\n", er_name);
822 wprintf("<LI>Resides on floor: ");
824 wprintf("<SELECT NAME=\"er_floor\" SIZE=\"1\">\n");
825 for (i = 0; i < 128; ++i)
826 if (strlen(floorlist[i]) > 0) {
829 wprintf("SELECTED ");
830 wprintf("VALUE=\"%d\">", i);
831 escputs(floorlist[i]);
832 wprintf("</OPTION>\n");
834 wprintf("</SELECT>\n");
836 wprintf("<LI>Type of room:<UL>\n");
838 wprintf("<LI><INPUT TYPE=\"radio\" NAME=\"type\" VALUE=\"public\" ");
839 if ((er_flags & QR_PRIVATE) == 0)
841 wprintf("> Public room\n");
843 wprintf("<LI><INPUT TYPE=\"radio\" NAME=\"type\" VALUE=\"guessname\" ");
844 if ((er_flags & QR_PRIVATE) &&
845 (er_flags & QR_GUESSNAME))
847 wprintf("> Private - guess name\n");
849 wprintf("<LI><INPUT TYPE=\"radio\" NAME=\"type\" VALUE=\"passworded\" ");
850 if ((er_flags & QR_PRIVATE) &&
851 (er_flags & QR_PASSWORDED))
853 wprintf("> Private - require password:\n");
854 wprintf("<INPUT TYPE=\"text\" NAME=\"er_password\" VALUE=\"%s\" MAXLENGTH=\"9\">\n", er_password);
856 wprintf("<LI><INPUT TYPE=\"radio\" NAME=\"type\" VALUE=\"invonly\" ");
857 if ((er_flags & QR_PRIVATE)
858 && ((er_flags & QR_GUESSNAME) == 0)
859 && ((er_flags & QR_PASSWORDED) == 0))
861 wprintf("> Private - invitation only\n");
863 wprintf("<LI><INPUT TYPE=\"checkbox\" NAME=\"bump\" VALUE=\"yes\" ");
864 wprintf("> If private, cause current users to forget room\n");
868 wprintf("<LI><INPUT TYPE=\"checkbox\" NAME=\"prefonly\" VALUE=\"yes\" ");
869 if (er_flags & QR_PREFONLY)
871 wprintf("> Preferred users only\n");
873 wprintf("<LI><INPUT TYPE=\"checkbox\" NAME=\"readonly\" VALUE=\"yes\" ");
874 if (er_flags & QR_READONLY)
876 wprintf("> Read-only room\n");
878 /* directory stuff */
879 wprintf("<LI><INPUT TYPE=\"checkbox\" NAME=\"directory\" VALUE=\"yes\" ");
880 if (er_flags & QR_DIRECTORY)
882 wprintf("> File directory room\n");
884 wprintf("<UL><LI>Directory name: ");
885 wprintf("<INPUT TYPE=\"text\" NAME=\"er_dirname\" VALUE=\"%s\" MAXLENGTH=\"14\">\n", er_dirname);
887 wprintf("<LI><INPUT TYPE=\"checkbox\" NAME=\"ulallowed\" VALUE=\"yes\" ");
888 if (er_flags & QR_UPLOAD)
890 wprintf("> Uploading allowed\n");
892 wprintf("<LI><INPUT TYPE=\"checkbox\" NAME=\"dlallowed\" VALUE=\"yes\" ");
893 if (er_flags & QR_DOWNLOAD)
895 wprintf("> Downloading allowed\n");
897 wprintf("<LI><INPUT TYPE=\"checkbox\" NAME=\"visdir\" VALUE=\"yes\" ");
898 if (er_flags & QR_VISDIR)
900 wprintf("> Visible directory</UL>\n");
902 /* end of directory stuff */
904 wprintf("<LI><INPUT TYPE=\"checkbox\" NAME=\"network\" VALUE=\"yes\" ");
905 if (er_flags & QR_NETWORK)
907 wprintf("> Network shared room\n");
909 /* start of anon options */
911 wprintf("<LI>Anonymous messages<UL>\n");
913 wprintf("<LI><INPUT TYPE=\"radio\" NAME=\"anon\" VALUE=\"no\" ");
914 if (((er_flags & QR_ANONONLY) == 0)
915 && ((er_flags & QR_ANONOPT) == 0))
917 wprintf("> No anonymous messages\n");
919 wprintf("<LI><INPUT TYPE=\"radio\" NAME=\"anon\" VALUE=\"anononly\" ");
920 if (er_flags & QR_ANONONLY)
922 wprintf("> All messages are anonymous\n");
924 wprintf("<LI><INPUT TYPE=\"radio\" NAME=\"anon\" VALUE=\"anon2\" ");
925 if (er_flags & QR_ANONOPT)
927 wprintf("> Prompt user when entering messages</UL>\n");
929 /* end of anon options */
931 wprintf("<LI>Room aide: \n");
935 wprintf("<EM>%s</EM>\n", &buf[4]);
937 extract(er_roomaide, &buf[4], 0);
938 wprintf("<INPUT TYPE=\"text\" NAME=\"er_roomaide\" VALUE=\"%s\" MAXLENGTH=\"25\">\n", er_roomaide);
941 wprintf("</UL><CENTER>\n");
942 wprintf("<INPUT TYPE=\"submit\" NAME=\"sc\" VALUE=\"OK\">");
943 wprintf("<INPUT TYPE=\"submit\" NAME=\"sc\" VALUE=\"Cancel\">");
944 wprintf("</CENTER>\n");
948 /* Sharing the room with other Citadel nodes... */
949 if (!strcmp(tab, "sharing")) {
951 shared_with = strdup("");
952 not_shared_with = strdup("");
954 /* Learn the current configuration */
955 serv_puts("CONF getsys|application/x-citadel-ignet-config");
957 if (buf[0]=='1') while (serv_gets(buf), strcmp(buf, "000")) {
958 extract(node, buf, 0);
959 not_shared_with = realloc(not_shared_with,
960 strlen(not_shared_with) + 32);
961 strcat(not_shared_with, node);
962 strcat(not_shared_with, "|");
967 if (buf[0]=='1') while (serv_gets(buf), strcmp(buf, "000")) {
968 extract(cmd, buf, 0);
969 extract(node, buf, 1);
970 if (!strcasecmp(cmd, "ignet_push_share")) {
971 shared_with = realloc(shared_with,
972 strlen(shared_with) + 32);
973 strcat(shared_with, node);
974 strcat(shared_with, "|");
978 for (i=0; i<num_tokens(shared_with, '|'); ++i) {
979 extract(node, shared_with, i);
980 for (j=0; j<num_tokens(not_shared_with, '|'); ++j) {
981 extract(cmd, not_shared_with, j);
982 if (!strcasecmp(node, cmd)) {
983 remove_token(not_shared_with, j, '|');
988 /* Display the stuff */
989 wprintf("<CENTER><BR>"
990 "<TABLE border=1 cellpadding=5><TR>"
991 "<TD><B><I>Shared with</I></B></TD>"
992 "<TD><B><I>Not shared with</I></B></TD></TR>\n"
995 for (i=0; i<num_tokens(shared_with, '|'); ++i) {
996 extract(node, shared_with, i);
997 if (strlen(node) > 0) {
998 wprintf("%s ", node);
999 wprintf("<A HREF=\"/netedit&cmd=remove&line="
1000 "ignet_push_share|");
1002 wprintf("&tab=sharing\">(unshare)</A><BR>");
1006 wprintf("</TD><TD>\n");
1008 for (i=0; i<num_tokens(not_shared_with, '|'); ++i) {
1009 extract(node, not_shared_with, i);
1010 if (strlen(node) > 0) {
1011 wprintf("%s ", node);
1012 wprintf("<A HREF=\"/netedit&cmd=add&line="
1013 "ignet_push_share|");
1015 wprintf("&tab=sharing\">(share)</A><BR>");
1019 wprintf("</TD></TR>"
1021 "<I><B>Reminder:</B> When sharing a room, "
1022 "it must be shared from both ends. Adding a node to "
1023 "the 'shared' list sends messages out, but in order to"
1024 " receive messages, the other nodes must be configured"
1025 " to send messages out to your system as well.</I><BR>"
1030 /* Mailing list management */
1031 if (!strcmp(tab, "listserv")) {
1033 wprintf("<BR><center>"
1034 "<TABLE BORDER=0 WIDTH=100%% CELLPADDING=5>"
1035 "<TR><TD VALIGN=TOP>");
1037 wprintf("<i>The contents of this room are being "
1038 "mailed <b>as individual messages</b> "
1039 "to the following list recipients:"
1044 if (buf[0]=='1') while (serv_gets(buf), strcmp(buf, "000")) {
1045 extract(cmd, buf, 0);
1046 if (!strcasecmp(cmd, "listrecp")) {
1047 extract(recp, buf, 1);
1050 wprintf(" <A HREF=\"/netedit&cmd=remove&line="
1053 wprintf("&tab=listserv\">(remove)</A><BR>");
1057 wprintf("<BR><FORM METHOD=\"POST\" ACTION=\"/netedit\">\n"
1058 "<INPUT TYPE=\"hidden\" NAME=\"tab\" VALUE=\"listserv\">\n"
1059 "<INPUT TYPE=\"hidden\" NAME=\"prefix\" VALUE=\"listrecp|\">\n");
1060 wprintf("<INPUT TYPE=\"text\" NAME=\"line\">\n");
1061 wprintf("<INPUT TYPE=\"submit\" NAME=\"cmd\" VALUE=\"Add\">");
1062 wprintf("</FORM>\n");
1064 wprintf("</TD><TD VALIGN=TOP>\n");
1066 wprintf("<i>The contents of this room are being "
1067 "mailed <b>in digest form</b> "
1068 "to the following list recipients:"
1073 if (buf[0]=='1') while (serv_gets(buf), strcmp(buf, "000")) {
1074 extract(cmd, buf, 0);
1075 if (!strcasecmp(cmd, "digestrecp")) {
1076 extract(recp, buf, 1);
1079 wprintf(" <A HREF=\"/netedit&cmd=remove&line="
1082 wprintf("&tab=listserv\">(remove)</A><BR>");
1086 wprintf("<BR><FORM METHOD=\"POST\" ACTION=\"/netedit\">\n"
1087 "<INPUT TYPE=\"hidden\" NAME=\"tab\" VALUE=\"listserv\">\n"
1088 "<INPUT TYPE=\"hidden\" NAME=\"prefix\" VALUE=\"digestrecp|\">\n");
1089 wprintf("<INPUT TYPE=\"text\" NAME=\"line\">\n");
1090 wprintf("<INPUT TYPE=\"submit\" NAME=\"cmd\" VALUE=\"Add\">");
1091 wprintf("</FORM>\n");
1093 wprintf("</TD></TR></TABLE><HR>\n");
1095 if (self_service(999) == 1) {
1096 wprintf("This room is configured to allow "
1097 "self-service subscribe/unsubscribe requests."
1098 " <A HREF=\"/toggle_self_service?newval=0&"
1100 "Click to disable.</A><BR>\n"
1104 wprintf("This room is <i>not</i> configured to allow "
1105 "self-service subscribe/unsubscribe requests."
1106 " <A HREF=\"/toggle_self_service?newval=1&"
1108 "Click to enable.</A><BR>\n"
1113 wprintf("</CENTER>\n");
1121 * Toggle self-service list subscription
1123 void toggle_self_service(void) {
1126 newval = atoi(bstr("newval"));
1127 self_service(newval);
1134 * save new parameters for a room
1140 char er_password[10];
1141 char er_dirname[15];
1142 char er_roomaide[26];
1148 if (strcmp(bstr("sc"), "OK")) {
1149 display_error("Cancelled. Changes were not saved.");
1155 if (buf[0] != '2') {
1156 display_error(&buf[4]);
1159 extract(er_name, &buf[4], 0);
1160 extract(er_password, &buf[4], 1);
1161 extract(er_dirname, &buf[4], 2);
1162 er_flags = extract_int(&buf[4], 3);
1164 strcpy(er_roomaide, bstr("er_roomaide"));
1165 if (strlen(er_roomaide) == 0) {
1168 if (buf[0] != '2') {
1169 strcpy(er_roomaide, "");
1171 extract(er_roomaide, &buf[4], 0);
1174 strcpy(buf, bstr("er_name"));
1176 if (strlen(buf) > 0)
1177 strcpy(er_name, buf);
1179 strcpy(buf, bstr("er_password"));
1181 if (strlen(buf) > 0)
1182 strcpy(er_password, buf);
1184 strcpy(buf, bstr("er_dirname"));
1186 if (strlen(buf) > 0)
1187 strcpy(er_dirname, buf);
1189 strcpy(buf, bstr("type"));
1190 er_flags &= !(QR_PRIVATE | QR_PASSWORDED | QR_GUESSNAME);
1192 if (!strcmp(buf, "invonly")) {
1193 er_flags |= (QR_PRIVATE);
1195 if (!strcmp(buf, "guessname")) {
1196 er_flags |= (QR_PRIVATE | QR_GUESSNAME);
1198 if (!strcmp(buf, "passworded")) {
1199 er_flags |= (QR_PRIVATE | QR_PASSWORDED);
1201 if (!strcmp(bstr("prefonly"), "yes")) {
1202 er_flags |= QR_PREFONLY;
1204 er_flags &= ~QR_PREFONLY;
1207 if (!strcmp(bstr("readonly"), "yes")) {
1208 er_flags |= QR_READONLY;
1210 er_flags &= ~QR_READONLY;
1213 if (!strcmp(bstr("network"), "yes")) {
1214 er_flags |= QR_NETWORK;
1216 er_flags &= ~QR_NETWORK;
1219 if (!strcmp(bstr("directory"), "yes")) {
1220 er_flags |= QR_DIRECTORY;
1222 er_flags &= ~QR_DIRECTORY;
1225 if (!strcmp(bstr("ulallowed"), "yes")) {
1226 er_flags |= QR_UPLOAD;
1228 er_flags &= ~QR_UPLOAD;
1231 if (!strcmp(bstr("dlallowed"), "yes")) {
1232 er_flags |= QR_DOWNLOAD;
1234 er_flags &= ~QR_DOWNLOAD;
1237 if (!strcmp(bstr("visdir"), "yes")) {
1238 er_flags |= QR_VISDIR;
1240 er_flags &= ~QR_VISDIR;
1243 strcpy(buf, bstr("anon"));
1245 er_flags &= ~(QR_ANONONLY | QR_ANONOPT);
1246 if (!strcmp(buf, "anononly"))
1247 er_flags |= QR_ANONONLY;
1248 if (!strcmp(buf, "anon2"))
1249 er_flags |= QR_ANONOPT;
1252 if (!strcmp(bstr("bump"), "yes"))
1255 er_floor = atoi(bstr("er_floor"));
1257 sprintf(buf, "SETR %s|%s|%s|%u|%d|%d",
1258 er_name, er_password, er_dirname, er_flags, bump, er_floor);
1261 if (buf[0] != '2') {
1262 display_error(&buf[4]);
1265 gotoroom(er_name, 0);
1267 if (strlen(er_roomaide) > 0) {
1268 sprintf(buf, "SETA %s", er_roomaide);
1271 if (buf[0] != '2') {
1272 display_error(&buf[4]);
1276 smart_goto(er_name);
1280 * Invite, Kick, and show Who Knows a room
1282 void display_whok(void)
1284 char buf[SIZ], room[SIZ], username[SIZ];
1289 if (buf[0] != '2') {
1290 display_error(&buf[4]);
1293 extract(room, &buf[4], 0);
1295 strcpy(username, bstr("username"));
1299 wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=007700><TR><TD>");
1300 wprintf("<FONT SIZE=+1 COLOR=\"FFFFFF\"<B>Access control list for ");
1301 escputs(WC->wc_roomname);
1302 wprintf("</B></FONT></TD></TR></TABLE>\n");
1304 if(!strcmp(bstr("sc"), "Kick")) {
1305 sprintf(buf, "KICK %s", username);
1309 if (buf[0] != '2') {
1310 display_error(&buf[4]);
1313 wprintf("<B><I>User %s kicked out of room %s.</I></B>\n",
1316 } else if(!strcmp(bstr("sc"), "Invite")) {
1317 sprintf(buf, "INVT %s", username);
1321 if (buf[0] != '2') {
1322 display_error(&buf[4]);
1325 wprintf("<B><I>User %s invited to room %s.</I></B>\n",
1332 wprintf("<TABLE border=0 CELLSPACING=10><TR VALIGN=TOP>"
1333 "<TD>The users listed below have access to this room. "
1334 "To remove a user from the access list, select the user "
1335 "name from the list and click 'Kick'.<BR><BR>");
1337 wprintf("<CENTER><FORM METHOD=\"POST\" ACTION=\"/display_whok\">\n");
1338 wprintf("<SELECT NAME=\"username\" SIZE=10>\n");
1341 if (buf[0] == '1') {
1342 while (serv_gets(buf), strcmp(buf, "000")) {
1343 extract(username, buf, 0);
1344 wprintf("<OPTION>");
1349 wprintf("</SELECT><BR>\n");
1351 wprintf("<input type=submit name=sc value=\"Kick\">");
1352 wprintf("</FORM></CENTER>\n");
1355 "To grant another user access to this room, enter the "
1356 "user name in the box below and click 'Invite'.<BR><BR>");
1358 wprintf("<CENTER><FORM METHOD=\"POST\" ACTION=\"/display_whok\">\n");
1359 wprintf("Invite: ");
1360 wprintf("<input type=text name=username><BR>\n"
1361 "<input type=hidden name=sc value=\"Invite\">"
1362 "<input type=submit value=\"Invite\">"
1363 "</FORM></CENTER>\n");
1365 wprintf("</TD></TR></TABLE>\n");
1372 * display the form for entering a new room
1374 void display_entroom(void)
1379 serv_puts("CRE8 0");
1382 if (buf[0] != '2') {
1383 display_error(&buf[4]);
1388 wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=000077><TR><TD>");
1389 wprintf("<FONT SIZE=+1 COLOR=\"FFFFFF\"");
1390 wprintf("<B>Enter (create) a new room</B>\n");
1391 wprintf("</FONT></TD></TR></TABLE>\n");
1393 wprintf("<FORM METHOD=\"POST\" ACTION=\"/entroom\">\n");
1395 wprintf("<UL><LI>Name of room: ");
1396 wprintf("<INPUT TYPE=\"text\" NAME=\"er_name\" MAXLENGTH=\"19\">\n");
1398 wprintf("<LI>Type of room:<UL>\n");
1400 wprintf("<LI><INPUT TYPE=\"radio\" NAME=\"type\" VALUE=\"public\" ");
1401 wprintf("CHECKED > Public room\n");
1403 wprintf("<LI><INPUT TYPE=\"radio\" NAME=\"type\" VALUE=\"guessname\" ");
1404 wprintf("> Private - guess name\n");
1406 wprintf("<LI><INPUT TYPE=\"radio\" NAME=\"type\" VALUE=\"passworded\" ");
1407 wprintf("> Private - require password:\n");
1408 wprintf("<INPUT TYPE=\"text\" NAME=\"er_password\" MAXLENGTH=\"9\">\n");
1410 wprintf("<LI><INPUT TYPE=\"radio\" NAME=\"type\" VALUE=\"invonly\" ");
1411 wprintf("> Private - invitation only\n");
1414 wprintf("<LI>Resides on floor: ");
1416 wprintf("<SELECT NAME=\"er_floor\" SIZE=\"1\">\n");
1417 for (i = 0; i < 128; ++i)
1418 if (strlen(floorlist[i]) > 0) {
1419 wprintf("<OPTION ");
1420 wprintf("VALUE=\"%d\">", i);
1421 escputs(floorlist[i]);
1422 wprintf("</OPTION>\n");
1424 wprintf("</SELECT>\n");
1428 wprintf("<CENTER>\n");
1429 wprintf("<INPUT TYPE=\"submit\" NAME=\"sc\" VALUE=\"OK\">");
1430 wprintf("<INPUT TYPE=\"submit\" NAME=\"sc\" VALUE=\"Cancel\">");
1431 wprintf("</CENTER>\n");
1432 wprintf("</FORM>\n<HR>");
1433 serv_printf("MESG roomaccess");
1435 if (buf[0] == '1') {
1451 char er_password[10];
1455 if (strcmp(bstr("sc"), "OK")) {
1456 display_error("Cancelled. No new room was created.");
1459 strcpy(er_name, bstr("er_name"));
1460 strcpy(er_type, bstr("type"));
1461 strcpy(er_password, bstr("er_password"));
1462 er_floor = atoi(bstr("er_floor"));
1465 if (!strcmp(er_type, "guessname"))
1467 if (!strcmp(er_type, "passworded"))
1469 if (!strcmp(er_type, "invonly"))
1472 sprintf(buf, "CRE8 1|%s|%d|%s|%d",
1473 er_name, er_num_type, er_password, er_floor);
1476 if (buf[0] != '2') {
1477 display_error(&buf[4]);
1480 smart_goto(er_name);
1485 * display the screen to enter a private room
1487 void display_private(char *rname, int req_pass)
1492 wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=770000><TR><TD>");
1493 wprintf("<FONT SIZE=+1 COLOR=\"FFFFFF\"");
1494 wprintf("<B>Goto a private room</B>\n");
1495 wprintf("</FONT></TD></TR></TABLE>\n");
1497 wprintf("<CENTER>\n");
1498 wprintf("If you know the name of a hidden (guess-name) or\n");
1499 wprintf("passworded room, you can enter that room by typing\n");
1500 wprintf("its name below. Once you gain access to a private\n");
1501 wprintf("room, it will appear in your regular room listings\n");
1502 wprintf("so you don't have to keep returning here.\n");
1503 wprintf("<BR><BR>");
1505 wprintf("<FORM METHOD=\"POST\" ACTION=\"/goto_private\">\n");
1507 wprintf("<TABLE border><TR><TD>");
1508 wprintf("Enter room name:</TD><TD>");
1509 wprintf("<INPUT TYPE=\"text\" NAME=\"gr_name\" VALUE=\"%s\" MAXLENGTH=\"19\">\n", rname);
1512 wprintf("</TD></TR><TR><TD>");
1513 wprintf("Enter room password:</TD><TD>");
1514 wprintf("<INPUT TYPE=\"password\" NAME=\"gr_pass\" MAXLENGTH=\"9\">\n");
1516 wprintf("</TD></TR></TABLE>\n");
1518 wprintf("<INPUT TYPE=\"submit\" NAME=\"sc\" VALUE=\"OK\">");
1519 wprintf("<INPUT TYPE=\"submit\" NAME=\"sc\" VALUE=\"Cancel\">");
1520 wprintf("</FORM>\n");
1525 * goto a private room
1527 void goto_private(void)
1532 if (strcasecmp(bstr("sc"), "OK")) {
1533 display_main_menu();
1536 strcpy(hold_rm, WC->wc_roomname);
1537 strcpy(buf, "GOTO ");
1538 strcat(buf, bstr("gr_name"));
1540 strcat(buf, bstr("gr_pass"));
1544 if (buf[0] == '2') {
1545 smart_goto(bstr("gr_name"));
1548 if (!strncmp(buf, "540", 3)) {
1549 display_private(bstr("gr_name"), 1);
1553 wprintf("%s\n", &buf[4]);
1560 * display the screen to zap a room
1562 void display_zap(void)
1566 wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=770000><TR><TD>");
1567 wprintf("<FONT SIZE=+1 COLOR=\"FFFFFF\"");
1568 wprintf("<B>Zap (forget) the current room</B>\n");
1569 wprintf("</FONT></TD></TR></TABLE>\n");
1571 wprintf("If you select this option, <em>%s</em> will ", WC->wc_roomname);
1572 wprintf("disappear from your room list. Is this what you wish ");
1573 wprintf("to do?<BR>\n");
1575 wprintf("<FORM METHOD=\"POST\" ACTION=\"/zap\">\n");
1576 wprintf("<INPUT TYPE=\"submit\" NAME=\"sc\" VALUE=\"OK\">");
1577 wprintf("<INPUT TYPE=\"submit\" NAME=\"sc\" VALUE=\"Cancel\">");
1578 wprintf("</FORM>\n");
1589 char final_destination[SIZ];
1591 /* If the forget-room routine fails for any reason, we fall back
1592 * to the current room; otherwise, we go to the Lobby
1594 strcpy(final_destination, WC->wc_roomname);
1596 if (!strcasecmp(bstr("sc"), "OK")) {
1597 serv_printf("GOTO %s", WC->wc_roomname);
1599 if (buf[0] != '2') {
1600 /* ExpressMessageCat(&buf[4]); */
1604 if (buf[0] != '2') {
1605 /* ExpressMessageCat(&buf[4]); */
1607 strcpy(final_destination, "_BASEROOM_");
1611 smart_goto(final_destination);
1618 * Confirm deletion of the current room
1620 void confirm_delete_room(void)
1624 serv_puts("KILL 0");
1626 if (buf[0] != '2') {
1627 display_error(&buf[4]);
1631 wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=770000><TR><TD>");
1632 wprintf("<FONT SIZE=+1 COLOR=\"FFFFFF\"");
1633 wprintf("<B>Confirm deletion of room</B>\n");
1634 wprintf("</FONT></TD></TR></TABLE>\n");
1636 wprintf("<CENTER>");
1637 wprintf("<FORM METHOD=\"POST\" ACTION=\"/delete_room\">\n");
1639 wprintf("Are you sure you want to delete <FONT SIZE=+1>");
1640 escputs(WC->wc_roomname);
1641 wprintf("</FONT>?<BR>\n");
1643 wprintf("<INPUT TYPE=\"submit\" NAME=\"sc\" VALUE=\"Delete\">");
1644 wprintf("<INPUT TYPE=\"submit\" NAME=\"sc\" VALUE=\"Cancel\">");
1646 wprintf("</FORM></CENTER>\n");
1652 * Delete the current room
1654 void delete_room(void)
1659 strcpy(sc, bstr("sc"));
1661 if (strcasecmp(sc, "Delete")) {
1662 display_error("Cancelled. This room was not deleted.");
1665 serv_puts("KILL 1");
1667 if (buf[0] != '2') {
1668 display_error(&buf[4]);
1670 smart_goto("_BASEROOM_");
1677 * Perform changes to a room's network configuration
1679 void netedit(void) {
1684 if (strlen(bstr("line"))==0) {
1689 strcpy(line, bstr("prefix"));
1690 strcat(line, bstr("line"));
1691 strcat(line, bstr("suffix"));
1701 if (buf[0] != '1') {
1707 /* This loop works for add *or* remove. Spiffy, eh? */
1708 while (serv_gets(buf), strcmp(buf, "000")) {
1709 if (strcasecmp(buf, line)) {
1710 fprintf(fp, "%s\n", buf);
1717 if (buf[0] != '4') {
1723 while (fgets(buf, sizeof buf, fp) != NULL) {
1724 buf[strlen(buf)-1] = 0;
1728 if (!strcasecmp(bstr("cmd"), "add")) {
1740 * Convert a room name to a folder-ish-looking name.
1742 void room_to_folder(char *folder, char *room, int floor, int is_mailbox)
1747 * For mailboxes, just do it straight...
1750 sprintf(folder, "My folders|%s", room);
1754 * Otherwise, prefix the floor name as a "public folders" moniker
1757 sprintf(folder, "%s|%s", floorlist[floor], room);
1761 * Replace "/" characters with "|" for pseudo-folder-delimiting
1763 for (i=0; i<strlen(folder); ++i) {
1764 if (folder[i] == '/') folder[i] = '|';
1775 * Change the view for this room
1777 void change_view(void) {
1781 view = atol(bstr("view"));
1783 serv_printf("VIEW %d", view);
1785 smart_goto(WC->wc_roomname);
1790 * Show the room list in "folders" format. (only should get called by
1791 * knrooms() because that's where output_headers() is called from)
1793 void folders(void) {
1796 int levels, oldlevels;
1806 struct folder *fold = NULL;
1808 int max_folders = 0;
1809 int alloc_folders = 0;
1816 /* Start with the mailboxes */
1819 fold = malloc(sizeof(struct folder));
1820 memset(fold, 0, sizeof(struct folder));
1821 strcpy(fold[0].name, "My folders");
1823 /* Then add floors */
1826 if (buf[0]=='1') while(serv_gets(buf), strcmp(buf, "000")) {
1827 if (max_folders >= alloc_folders) {
1828 alloc_folders = max_folders + 100;
1829 fold = realloc(fold,
1830 alloc_folders * sizeof(struct folder));
1832 memset(&fold[max_folders], 0, sizeof(struct folder));
1833 extract(fold[max_folders].name, buf, 1);
1838 for (p = 0; p < 2; ++p) {
1839 if (p == 0) serv_puts("LKRN");
1840 else if (p == 1) serv_puts("LKRO");
1842 if (buf[0]=='1') while(serv_gets(buf), strcmp(buf, "000")) {
1843 if (max_folders >= alloc_folders) {
1844 alloc_folders = max_folders + 100;
1845 fold = realloc(fold,
1846 alloc_folders * sizeof(struct folder));
1848 memset(&fold[max_folders], 0, sizeof(struct folder));
1849 extract(fold[max_folders].room, buf, 0);
1850 if (p == 0) fold[max_folders].hasnewmsgs = 1;
1851 flags = extract_int(buf, 1);
1852 floor = extract_int(buf, 2);
1853 if (flags & QR_MAILBOX) {
1854 fold[max_folders].is_mailbox = 1;
1856 room_to_folder(fold[max_folders].name,
1857 fold[max_folders].room,
1859 fold[max_folders].is_mailbox);
1860 fold[max_folders].selectable = 1;
1865 /* Bubble-sort the folder list */
1866 for (i=0; i<max_folders; ++i) {
1867 for (j=0; j<(max_folders-1)-i; ++j) {
1868 if (strcasecmp(fold[j].name, fold[j+1].name) > 0) {
1869 memcpy(&ftmp, &fold[j], sizeof(struct folder));
1870 memcpy(&fold[j], &fold[j+1],
1871 sizeof(struct folder));
1872 memcpy(&fold[j+1], &ftmp,
1873 sizeof(struct folder));
1882 for (i=0; i<max_folders; ++i) {
1884 levels = num_tokens(fold[i].name, '|');
1885 if (levels > oldlevels) {
1886 for (k=0; k<(levels-oldlevels); ++k) {
1891 if (levels < oldlevels) {
1892 for (k=0; k<(oldlevels-levels); ++k) {
1900 if (fold[i].selectable) {
1901 wprintf("<A HREF=\"/dotgoto?room=");
1902 urlescputs(fold[i].room);
1905 if (fold[i].hasnewmsgs) wprintf("<B>");
1906 extract(buf, fold[i].name, levels-1);
1908 if (fold[i].hasnewmsgs) wprintf("</B>");
1909 if (fold[i].selectable) wprintf("</A>\n");
1911 while (nests-- > 0) wprintf("</UL>\n");
1918 /* Do either a known rooms list or a folders list, depending on the
1922 char listviewpref[SIZ];
1927 /* Determine whether the user is trying to change views */
1928 if (bstr("view") != NULL) {
1929 if (strlen(bstr("view")) > 0) {
1930 set_preference("roomlistview", bstr("view"));
1934 get_preference("roomlistview", listviewpref);
1936 if (strcasecmp(listviewpref, "folders")) {
1937 strcpy(listviewpref, "rooms");
1941 wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=000077><TR><TD>"
1942 "<FONT SIZE=+1 COLOR=\"FFFFFF\"<B>"
1944 if (!strcasecmp(listviewpref, "rooms")) {
1945 wprintf("Room list");
1947 if (!strcasecmp(listviewpref, "folders")) {
1948 wprintf("Folder list");
1950 wprintf("</B></TD>\n");
1953 /* offer the ability to switch views */
1954 wprintf("<TD><FORM NAME=\"roomlistomatic\">\n"
1955 "<SELECT NAME=\"newview\" SIZE=\"1\" "
1956 "OnChange=\"location.href=roomlistomatic.newview.options"
1957 "[selectedIndex].value\">\n");
1959 wprintf("<OPTION %s VALUE=\"/knrooms&view=rooms\">"
1962 ( !strcasecmp(listviewpref, "rooms") ? "SELECTED" : "" )
1965 wprintf("<OPTION %s VALUE=\"/knrooms&view=folders\">"
1966 "View as folder list"
1968 ( !strcasecmp(listviewpref, "folders") ? "SELECTED" : "" )
1971 wprintf("</SELECT></FORM></TD><TD>\n");
1973 wprintf("</TD></TR></TABLE><BR>\n");
1975 /* Display the room list in the user's preferred format */
1976 if (!strcasecmp(listviewpref, "folders")) {
1980 list_all_rooms_by_floor();