$Log$
+Revision 603.11 2005/03/09 04:08:30 ajc
+* Delete room is now confirmed through a JavaScript popup instead of
+ a transition page
+* New icon for "Tasks." In order to keep it consistent with the rest of
+ the icons, it is ugly.
+* Modified page popup style slightly.
+
Revision 603.10 2005/03/08 04:59:31 ajc
* More attractive display of vCards (hide unknown fields)
* Added "title" and "organization" to vCard display/edit
1998-12-03 Nathan Bryant <bryant@cs.usm.maine.edu>
* webserver.c: warning fix
-
);
if (ib_displayas != IB_TEXTONLY) {
wprintf("<IMG BORDER=\"0\" WIDTH=\"32\" HEIGHT=\"32\" "
- "SRC=\"/static/vcalendar.gif\">");
+ "SRC=\"/static/tasks.gif\">");
}
if (ib_displayas != IB_PICONLY) {
wprintf("Tasks");
"<INPUT TYPE=\"checkbox\" NAME=\"ib_tasks\" VALUE=\"yes\" %s>"
"</TD><TD>"
"<IMG BORDER=\"0\" WIDTH=\"48\" HEIGHT=\"48\" "
- "SRC=\"/static/vcalendar.gif\" ALT=\" \">"
+ "SRC=\"/static/tasks.gif\" ALT=\" \">"
"</TD><TD>"
"<B>Tasks</B><br />"
"A shortcut to your personal task list."
if (!strcmp(tab, "admin")) {
wprintf("<UL>"
- "<LI><A HREF=\"/confirm_delete_room\">\n"
+ "<LI><A HREF=\"/delete_room\" "
+ "onClick=\"return confirm('Are you sure you want to delete this room?');\">\n"
"Delete this room</A>\n"
"<LI><A HREF=\"/display_editroompic\">\n"
"Set or change the graphic for this room's banner</A>\n"
-
-/*
- * Confirm deletion of the current room
- */
-void confirm_delete_room(void)
-{
- char buf[SIZ];
-
- serv_puts("KILL 0");
- serv_gets(buf);
- if (buf[0] != '2') {
- strcpy(WC->ImportantMessage, &buf[4]);
- display_main_menu();
- return;
- }
- output_headers(1, 1, 2, 0, 0, 0, 0);
- wprintf("<div id=\"banner\">\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("</div>\n<div id=\"content\">\n");
-
- wprintf("<CENTER>");
- wprintf("<FORM METHOD=\"GET\" ACTION=\"/delete_room\">\n");
-
- wprintf("Are you sure you want to delete <FONT SIZE=+1>");
- escputs(WC->wc_roomname);
- wprintf("</FONT>?<br />\n");
-
- wprintf("<INPUT TYPE=\"submit\" NAME=\"sc\" VALUE=\"Delete\">");
- wprintf("<INPUT TYPE=\"submit\" NAME=\"sc\" VALUE=\"Cancel\">");
-
- wprintf("</FORM></CENTER>\n");
- wDumpContent(1);
-}
-
-
/*
* Delete the current room
*/
void delete_room(void)
{
char buf[SIZ];
- char sc[SIZ];
- strcpy(sc, bstr("sc"));
-
- if (strcasecmp(sc, "Delete")) {
- strcpy(WC->ImportantMessage,
- "Cancelled. This room was not deleted.");
- display_main_menu();
- return;
- }
serv_puts("KILL 1");
serv_gets(buf);
if (buf[0] != '2') {
save_edit("Your bio", "EBIO", 0);
} else if (!strcasecmp(action, "confirm_move_msg")) {
confirm_move_msg();
- } else if (!strcasecmp(action, "confirm_delete_room")) {
- confirm_delete_room();
} else if (!strcasecmp(action, "delete_room")) {
delete_room();
} else if (!strcasecmp(action, "validate")) {