void zapped_list(void)
{
output_headers(1);
- wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=770000><TR><TD>");
- wprintf("<FONT SIZE=+1 COLOR=\"FFFFFF\"");
- wprintf("<B>Zapped (forgotten) rooms</B>\n");
+ wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=\"#770000\"><TR><TD>");
+ wprintf("<SPAN CLASS=\"titlebar\">Zapped (forgotten) rooms</SPAN>\n");
wprintf("</TD></TR></TABLE><BR>\n");
listrms("LZRM -1");
wprintf("<BR><BR>\n");
serv_puts("OIMG _roompic_");
serv_gets(buf);
if (buf[0] == '2') {
- wprintf("<TD BGCOLOR=444455>");
+ wprintf("<TD BGCOLOR=\"#444455\">");
wprintf("<IMG SRC=\"/image&name=_roompic_&room=");
urlescputs(WC->wc_roomname);
wprintf("\"></TD>");
"<A HREF=\"/dotgoto?room=_MAIL_\">"
"<IMG SRC=\"/static/mail.gif\" border=0 "
"ALT=\"You have new mail\">"
- "<BR><FONT SIZE=2 COLOR=FFFFFF>"
- "%d new mail</FONT></A>", WC->new_mail);
+ "<BR><SPAN CLASS=\"youhavemail\">"
+ "%d new mail</SPAN></A>", WC->new_mail);
WC->remember_new_mail = WC->new_mail;
}
}
"[selectedIndex].value\">\n");
for (i=0; i<(sizeof viewdefs / sizeof (char *)); ++i) {
- wprintf("<OPTION %s VALUE=\"/changeview?view=%d\">",
- ((i == WC->wc_view) ? "SELECTED" : ""),
- i );
- escputs(viewdefs[i]);
- wprintf("</OPTION>\n");
+ /*
+ * Only offer the views that make sense, given the default
+ * view for the room. For example, don't offer a Calendar
+ * view in a non-Calendar room.
+ */
+ if (
+ (i == WC->wc_view)
+ || (i == WC->wc_default_view)
+ || ( (i == 0) && (WC->wc_default_view == 1) )
+ || ( (i == 1) && (WC->wc_default_view == 0) )
+ ) {
+
+ wprintf("<OPTION %s VALUE=\"/changeview?view=%d\">",
+ ((i == WC->wc_view) ? "SELECTED" : ""),
+ i );
+ escputs(viewdefs[i]);
+ wprintf("</OPTION>\n");
+ }
}
wprintf("</SELECT></FORM>\n");
}
}
strcpy(WC->wc_roomname, WC->wc_roomname);
WC->wc_view = extract_int(&buf[4], 11);
+ WC->wc_default_view = extract_int(&buf[4], 12);
}
*/
char *pop_march(int desired_floor)
{
- static char TheRoom[64];
+ static char TheRoom[128];
int TheFloor = 0;
int TheOrder = 32767;
int TheWeight = 0;
{
char buf[SIZ];
struct march *mptr, *mptr2;
- char next_room[32];
+ char next_room[128];
/* First check to see if the march-mode list is already allocated.
* If it is, pop the first room off the list and go there.
/* print the tabbed dialog */
wprintf("<TABLE border=0 cellspacing=0 cellpadding=0 width=100%%>"
- "<TR ALIGN=CENTER BGCOLOR=FFFFFF>"
+ "<TR ALIGN=CENTER BGCOLOR=\"#FFFFFF\">"
"<TD> </TD>\n");
if (!strcmp(tab, "admin")) {
- wprintf("<TD BGCOLOR=000077><FONT SIZE=+1 COLOR=\"FFFFFF\"><B>");
+ wprintf("<TD BGCOLOR=\"#000077\"><SPAN CLASS=\"tablabel\">");
}
else {
- wprintf("<TD BGCOLOR=AAAAAA><A HREF=\"/display_editroom&tab=admin\">");
+ wprintf("<TD BGCOLOR=\"#AAAAAA\"><A HREF=\"/display_editroom&tab=admin\">");
}
wprintf("Room administration");
if (!strcmp(tab, "admin")) {
- wprintf("</B></FONT></TD>\n");
+ wprintf("</SPAN></TD>\n");
}
else {
wprintf("</A></TD>\n");
wprintf("<TD> </TD>\n");
if (!strcmp(tab, "config")) {
- wprintf("<TD BGCOLOR=000077><FONT SIZE=+1 COLOR=\"FFFFFF\"><B>");
+ wprintf("<TD BGCOLOR=\"#000077\"><SPAN CLASS=\"tablabel\">");
}
else {
- wprintf("<TD BGCOLOR=AAAAAA><A HREF=\"/display_editroom&tab=config\">");
+ wprintf("<TD BGCOLOR=\"#AAAAAA\"><A HREF=\"/display_editroom&tab=config\">");
}
wprintf("Room configuration");
if (!strcmp(tab, "config")) {
- wprintf("</B></FONT></TD>\n");
+ wprintf("</SPAN></TD>\n");
}
else {
wprintf("</A></TD>\n");
wprintf("<TD> </TD>\n");
if (!strcmp(tab, "sharing")) {
- wprintf("<TD BGCOLOR=000077><FONT SIZE=+1 COLOR=\"FFFFFF\"><B>");
+ wprintf("<TD BGCOLOR=\"#000077\"><SPAN CLASS=\"tablabel\">");
}
else {
- wprintf("<TD BGCOLOR=AAAAAA><A HREF=\"/display_editroom&tab=sharing\">");
+ wprintf("<TD BGCOLOR=\"#AAAAAA\"><A HREF=\"/display_editroom&tab=sharing\">");
}
wprintf("Sharing");
if (!strcmp(tab, "sharing")) {
- wprintf("</B></FONT></TD>\n");
+ wprintf("</SPAN></TD>\n");
}
else {
wprintf("</A></TD>\n");
wprintf("<TD> </TD>\n");
if (!strcmp(tab, "listserv")) {
- wprintf("<TD BGCOLOR=000077><FONT SIZE=+1 COLOR=\"FFFFFF\"><B>");
+ wprintf("<TD BGCOLOR=\"#000077\"><SPAN CLASS=\"tablabel\">");
}
else {
- wprintf("<TD BGCOLOR=AAAAAA><A HREF=\"/display_editroom&tab=listserv\">");
+ wprintf("<TD BGCOLOR=\"#AAAAAA\"><A HREF=\"/display_editroom&tab=listserv\">");
}
wprintf("Mailing list service");
if (!strcmp(tab, "listserv")) {
- wprintf("</B></FONT></TD>\n");
+ wprintf("</SPAN></TD>\n");
}
else {
wprintf("</A></TD>\n");
}
wprintf("<TD> </TD></TR>"
- "<TR><TD BGCOLOR=000077 COLSPAN=9 HEIGHT=5> </TD></TR>"
+ "<TR><TD BGCOLOR=\"#000077\" COLSPAN=9 HEIGHT=5> </TD></TR>"
"</TABLE>\n");
/* end tabbed dialog */
output_headers(1);
- wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=007700><TR><TD>");
- wprintf("<FONT SIZE=+1 COLOR=\"FFFFFF\"<B>Access control list for ");
+ wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=\"#007700\"><TR><TD>");
+ wprintf("<SPAN CLASS=\"titlebar\">Access control list for ");
escputs(WC->wc_roomname);
- wprintf("</B></FONT></TD></TR></TABLE>\n");
+ wprintf("</SPAN></TD></TR></TABLE>\n");
if(!strcmp(bstr("sc"), "Kick")) {
sprintf(buf, "KICK %s", username);
}
output_headers(1);
- wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=000077><TR><TD>");
- wprintf("<FONT SIZE=+1 COLOR=\"FFFFFF\"");
- wprintf("<B>Enter (create) a new room</B>\n");
- wprintf("</FONT></TD></TR></TABLE>\n");
+ wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=\"#000077\"><TR><TD>");
+ wprintf("<SPAN CLASS=\"titlebar\">Enter (create) a new room</SPAN>\n");
+ wprintf("</TD></TR></TABLE>\n");
wprintf("<FORM METHOD=\"POST\" ACTION=\"/entroom\">\n");
output_headers(1);
- wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=770000><TR><TD>");
- wprintf("<FONT SIZE=+1 COLOR=\"FFFFFF\"");
- wprintf("<B>Goto a private room</B>\n");
- wprintf("</FONT></TD></TR></TABLE>\n");
+ wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=\"#770000\"><TR><TD>");
+ wprintf("<SPAN CLASS=\"titlebar\">Goto a private room</SPAN>\n");
+ wprintf("</TD></TR></TABLE>\n");
wprintf("<CENTER>\n");
wprintf("If you know the name of a hidden (guess-name) or\n");
*/
void goto_private(void)
{
- char hold_rm[32];
+ char hold_rm[SIZ];
char buf[SIZ];
if (strcasecmp(bstr("sc"), "OK")) {
{
output_headers(1);
- wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=770000><TR><TD>");
- wprintf("<FONT SIZE=+1 COLOR=\"FFFFFF\"");
- wprintf("<B>Zap (forget) the current room</B>\n");
- wprintf("</FONT></TD></TR></TABLE>\n");
+ wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=\"#770000\"><TR><TD>");
+ wprintf("<SPAN CLASS=\"titlebar\">Zap (forget) the current room</SPAN>\n");
+ wprintf("</TD></TR></TABLE>\n");
wprintf("If you select this option, <em>%s</em> will ", WC->wc_roomname);
wprintf("disappear from your room list. Is this what you wish ");
return;
}
output_headers(1);
- wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=770000><TR><TD>");
- wprintf("<FONT SIZE=+1 COLOR=\"FFFFFF\"");
- wprintf("<B>Confirm deletion of room</B>\n");
- wprintf("</FONT></TD></TR></TABLE>\n");
+ wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=\"#770000\"><TR><TD>");
+ wprintf("<SPAN CLASS=\"titlebar\">Confirm deletion of room</SPAN>\n");
+ wprintf("</TD></TR></TABLE>\n");
wprintf("<CENTER>");
wprintf("<FORM METHOD=\"GET\" ACTION=\"/delete_room\">\n");
}
/* title bar */
- wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=000077><TR><TD>"
- "<FONT SIZE=+1 COLOR=\"FFFFFF\"<B>"
+ wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=\"#000077\"><TR><TD>"
+ "<SPAN CLASS=\"titlebar\">"
);
if (!strcasecmp(listviewpref, "rooms")) {
wprintf("Room list");
if (!strcasecmp(listviewpref, "folders")) {
wprintf("Folder list");
}
- wprintf("</B></TD>\n");
+ wprintf("</SPAN></TD>\n");
/* offer the ability to switch views */