From: Art Cancro Date: Tue, 11 Jan 2005 05:05:11 +0000 (+0000) Subject: * *** HUGE CHANGES *** *** WARNING: NOT FULLY FUNCTIONAL *** X-Git-Tag: v7.86~5155 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=792253218528e4327e0ddf1da78e424c9c9f08a4 * *** HUGE CHANGES *** *** WARNING: NOT FULLY FUNCTIONAL *** * Ripped things apart in a big way. The frameset is gone (except for chat, for which we'll probably keep frames). Iconbar and banner are now done using CSS and
tags. * Room read/enter/goto controls are currently missing. Stay tuned. * I am in the process of rewriting all of the markup as valid XHTML. --- diff --git a/webcit/ChangeLog b/webcit/ChangeLog index a1eca06f8..f7ba8dd30 100644 --- a/webcit/ChangeLog +++ b/webcit/ChangeLog @@ -1,4 +1,12 @@ $Log$ +Revision 528.3 2005/01/11 05:05:08 ajc +* *** HUGE CHANGES *** *** WARNING: NOT FULLY FUNCTIONAL *** +* Ripped things apart in a big way. The frameset is gone (except for + chat, for which we'll probably keep frames). Iconbar and banner are + now done using CSS and
tags. +* Room read/enter/goto controls are currently missing. Stay tuned. +* I am in the process of rewriting all of the markup as valid XHTML. + Revision 528.2 2004/12/29 22:08:08 ajc * roomops.c: provide a way to create room shares with a mapping to an alternate room name on the other end. @@ -2154,4 +2162,3 @@ 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 50e42586d..a2f51d6d7 100644 --- a/webcit/auth.c +++ b/webcit/auth.c @@ -46,7 +46,8 @@ void display_login(char *mesg) { char buf[SIZ]; - output_headers(3); + output_headers(1, 1, 2, 0, 0, 0, 0); + wprintf("
\n"); if (mesg != NULL) if (strlen(mesg) > 0) { stresc(buf, mesg, 0, 0); @@ -59,7 +60,7 @@ void display_login(char *mesg) do_template("login"); - wDumpContent(0); /* No menu here; not logged in yet! */ + wDumpContent(2); } @@ -159,7 +160,8 @@ void do_welcome(void) svprintf("STARTPAGE", WCS_STRING, startpage); - do_template("mainframeset"); + /* FIXME ... go to my start page, not to the summary */ + summary(); } @@ -181,7 +183,8 @@ void do_logout(void) strcpy(WC->wc_password, ""); strcpy(WC->wc_roomname, ""); - output_headers(2); /* note "2" causes cookies to be unset */ + /* Calling output_headers() this way causes the cookies to be un-set */ + output_headers(1, 1, 0, 1, 0, 0, 0); wprintf("
"); serv_puts("MESG goodbye"); @@ -201,7 +204,7 @@ void do_logout(void) ); } - wprintf("
Log in again   " + wprintf("
Log in again   " "Close window" "
\n"); wDumpContent(2); @@ -209,7 +212,6 @@ void do_logout(void) } - /* * validate new users */ @@ -220,7 +222,7 @@ void validate(void) char buf[SIZ]; int a; - output_headers(3); + output_headers(1, 1, 0, 0, 0, 0, 0); strcpy(buf, bstr("user")); if (strlen(buf) > 0) @@ -228,14 +230,14 @@ void validate(void) serv_printf("VALI %s|%s", buf, bstr("axlevel")); serv_gets(buf); if (buf[0] != '2') { - wprintf("%s
\n", &buf[4]); + wprintf("%s
\n", &buf[4]); } } serv_puts("GNUR"); serv_gets(buf); if (buf[0] != '3') { - wprintf("%s
\n", &buf[4]); + wprintf("%s
\n", &buf[4]); wDumpContent(1); return; } @@ -253,38 +255,38 @@ void validate(void) serv_gets(buf); ++a; if (a == 1) - wprintf("User #%s

%s

", + wprintf("User #%s

%s

", buf, &cmd[4]); if (a == 2) - wprintf("PW: %s
\n", buf); + wprintf("PW: %s
\n", buf); if (a == 3) - wprintf("%s
\n", buf); + wprintf("%s
\n", buf); if (a == 4) - wprintf("%s
\n", buf); + wprintf("%s
\n", buf); if (a == 5) wprintf("%s, ", buf); if (a == 6) wprintf("%s ", buf); if (a == 7) - wprintf("%s
\n", buf); + wprintf("%s
\n", buf); if (a == 8) - wprintf("%s
\n", buf); + wprintf("%s
\n", buf); if (a == 9) wprintf("Current access level: %d (%s)\n", atoi(buf), axdefs[atoi(buf)]); } while (strcmp(buf, "000")); } else { - wprintf("

%s

%s
\n", user, &cmd[4]); + wprintf("

%s

%s
\n", user, &cmd[4]); } - wprintf("
Select access level for this user:
\n"); + wprintf("
Select access level for this user:
\n"); for (a = 0; a <= 6; ++a) { wprintf("%s   \n", a, axdefs[a]); } - wprintf("
\n"); + wprintf("
\n"); wprintf("\n"); do_template("endbox"); @@ -335,11 +337,11 @@ void display_changepw(void) { char buf[SIZ]; - output_headers(3); + output_headers(1, 1, 0, 0, 0, 0, 0); svprintf("BOXTITLE", WCS_STRING, "Change your password"); do_template("beginbox"); - wprintf("

"); + wprintf("

"); serv_puts("MESG changepw"); serv_gets(buf); if (buf[0] == '1') { @@ -354,7 +356,7 @@ void display_changepw(void) wprintf("\n"); wprintf("Enter it again to confirm:\n"); wprintf("\n"); - wprintf("
\n"); + wprintf("
\n"); wprintf("\n" " " "\n"); diff --git a/webcit/calendar.c b/webcit/calendar.c index a28eadaa3..e5f839025 100644 --- a/webcit/calendar.c +++ b/webcit/calendar.c @@ -38,7 +38,7 @@ void cal_process_attachment(char *part_source, long msgnum, char *cal_partnum) { " but support for calendars is not available on this " "particular system. Please ask your system administrator to " "install a new version of the Citadel web service with " - "calendaring enabled.
\n" + "calendaring enabled.
\n" ); } @@ -48,7 +48,7 @@ void display_calendar(long msgnum) { "Cannot display calendar item. You are seeing this error " "because your WebCit service has not been installed with " "calendar support. Please contact your system administrator." - "
\n"); + "
\n"); } void display_task(long msgnum) { @@ -56,7 +56,7 @@ void display_task(long msgnum) { "Cannot display to-do item. You are seeing this error " "because your WebCit service has not been installed with " "calendar support. Please contact your system administrator." - "
\n"); + "
\n"); } #else /* WEBCIT_WITH_CALENDAR_SERVICE */ @@ -332,7 +332,7 @@ void cal_process_attachment(char *part_source, long msgnum, char *cal_partnum) { cal = icalcomponent_new_from_string(part_source); if (cal == NULL) { - wprintf("Error parsing calendar object
\n"); + wprintf("Error parsing calendar object
\n"); return; } @@ -352,12 +352,14 @@ void cal_process_attachment(char *part_source, long msgnum, char *cal_partnum) { void respond_to_request(void) { char buf[SIZ]; - output_headers(3); + output_headers(1, 1, 2, 0, 0, 0, 0); + wprintf("
\n"); wprintf("
" "Respond to meeting request" - "

\n" + "\n" ); + wprintf("
\n
\n"); serv_printf("ICAL respond|%s|%s|%s|", bstr("msgnum"), @@ -394,7 +396,7 @@ void respond_to_request(void) { wprintf("wc_roomname); - wprintf("\">
Return to messages

\n"); + wprintf("\">
Return to messages
\n"); wDumpContent(1); } @@ -407,12 +409,14 @@ void respond_to_request(void) { void handle_rsvp(void) { char buf[SIZ]; - output_headers(3); + output_headers(1, 1, 2, 0, 0, 0, 0); + wprintf("
\n"); wprintf("
" "" "Update your calendar with this RSVP" - "

\n" + "\n" + "
\n" ); serv_printf("ICAL handle_rsvp|%s|%s|%s|", @@ -445,7 +449,7 @@ void handle_rsvp(void) { wprintf("wc_roomname); - wprintf("\">
Return to messages

\n"); + wprintf("\">
Return to messages
\n"); wDumpContent(1); } @@ -517,10 +521,12 @@ void display_edit_individual_task(icalcomponent *supplied_vtodo, long msgnum) { created_new_vtodo = 1; } - output_headers(3); - wprintf("
" + output_headers(1, 1, 2, 0, 0, 0, 0); + wprintf("
\n" + "
" "Edit task" - "

\n" + "
\n" + "
\n" ); do_template("beginbox_nt"); @@ -913,7 +919,7 @@ void do_freebusy(char *req) { if (buf[0] != '1') { wprintf("HTTP/1.0 404 %s\n", &buf[4]); - output_headers(0); + output_headers(0, 0, 0, 0, 0, 0, 0); wprintf("Content-Type: text/plain\n"); wprintf("\n"); wprintf("%s\n", &buf[4]); diff --git a/webcit/calendar_view.c b/webcit/calendar_view.c index d89af8631..975d8c198 100644 --- a/webcit/calendar_view.c +++ b/webcit/calendar_view.c @@ -29,11 +29,11 @@ #ifndef WEBCIT_WITH_CALENDAR_SERVICE void do_calendar_view(void) { /* stub for non-libical builds */ - wprintf("
Calendar view not available

\n"); + wprintf("
Calendar view not available

\n"); } void do_tasks_view(void) { /* stub for non-libical builds */ - wprintf("
Tasks view not available

\n"); + wprintf("
Tasks view not available

\n"); } #else /* WEBCIT_WITH_CALENDAR_SERVICE */ @@ -52,7 +52,7 @@ void calendar_month_view_display_events(time_t thetime) { int all_day_event = 0; if (WC->num_cal == 0) { - wprintf("


\n"); + wprintf("


\n"); return; } @@ -112,7 +112,7 @@ lprintf(9, "Event: %04d/%02d/%02d, Now: %04d/%02d/%02d\n", ); escputs((char *) icalproperty_get_comment(p)); - wprintf("
\n"); + wprintf("
\n"); if (all_day_event) { wprintf(""); @@ -225,7 +225,7 @@ void calendar_month_view(int year, int month, int day) { wprintf("%s ", months[tm.tm_mon]); } wprintf("" - "%d
", + "%d
", tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday, @@ -251,7 +251,7 @@ void calendar_month_view(int year, int month, int day) { void calendar_week_view(int year, int month, int day) { - wprintf("
week view FIXME

\n"); + wprintf("
week view FIXME

\n"); } @@ -269,7 +269,7 @@ void calendar_day_view_display_events(int year, int month, int all_day_event = 0; if (WC->num_cal == 0) { - wprintf("


\n"); + wprintf("


\n"); return; } @@ -313,7 +313,7 @@ void calendar_day_view_display_events(int year, int month, ); escputs((char *) icalproperty_get_comment(p)); - wprintf("
\n"); + wprintf("
\n"); if (all_day_event) { wprintf(""); @@ -424,9 +424,9 @@ void calendar_day_view(int year, int month, int day) { /* Today's date */ wprintf(""); - wprintf("%s
" - "%d
" - "%d
", + wprintf("%s
" + "%d
" + "%d
", months[month-1], day, year); wprintf(""); @@ -441,11 +441,11 @@ void calendar_day_view(int year, int month, int day) { wprintf("\n"); /* End todays-date-with-left-and-right-arrows */ - wprintf("

" + wprintf("

" " " "Add new calendar event" - "

\n", + "

\n", year, month, day ); @@ -515,7 +515,7 @@ void calendar_summary_view(void) { if (p != NULL) { escputs((char *) icalproperty_get_comment(p)); - wprintf(" (%s)
\n", timestring); + wprintf(" (%s)
\n", timestring); } } } @@ -685,7 +685,7 @@ void do_tasks_view(void) { wprintf("\n"); - wprintf("
" + wprintf("
" "Add new task\n" ); diff --git a/webcit/context_loop.c b/webcit/context_loop.c index c8b0fda4c..e9ea3772a 100644 --- a/webcit/context_loop.c +++ b/webcit/context_loop.c @@ -263,7 +263,6 @@ void context_loop(int sock) int desired_session = 0; int got_cookie = 0; struct wcsession *TheSession, *sptr; - int outside_frameset_allowed = 0; /* * Find out what it is that the web browser is asking for @@ -333,27 +332,6 @@ void context_loop(int sock) "?force_close_session=yes HTTP/1.0"); } - /* These are the URL's which may be executed outside of the - * main frameset. If it's not one of these, the page will - * need JavaScript added to force the frameset to reload. - */ - if ( (!strcasecmp(buf, "/")) - || (!strncasecmp(buf, "/static/", 8)) - || (!strncasecmp(buf, "/do_welcome", 11)) - || (!strncasecmp(buf, "/do_logout", 10)) - || (!strncasecmp(buf, "/login", 6)) - || (!strncasecmp(buf, "/page_popup", 11)) - || (!strncasecmp(buf, "/page_user", 10)) /* Sometimes this is wrong */ - || (!strncasecmp(buf, "/display_page", 10)) /* Sometimes this is wrong */ - || (!strncasecmp(buf, "/listsub", 8)) - || (!strncasecmp(buf, "/freebusy", 9)) - || (!strncasecmp(buf, "/termquit", 9)) ) { - outside_frameset_allowed = 1; - } - else { - outside_frameset_allowed = 0; - } - /* * See if there's an existing session open with the desired ID */ @@ -399,7 +377,6 @@ void context_loop(int sock) pthread_setspecific(MyConKey, (void *)TheSession); TheSession->http_sock = sock; TheSession->lastreq = time(NULL); /* log */ - TheSession->outside_frameset_allowed = outside_frameset_allowed; session_loop(req); /* do transaction */ pthread_mutex_unlock(&TheSession->SessionMutex); /* unbind */ diff --git a/webcit/event.c b/webcit/event.c index b9ea1fea3..595f103ab 100644 --- a/webcit/event.c +++ b/webcit/event.c @@ -84,7 +84,7 @@ void display_edit_individual_event(icalcomponent *supplied_vevent, long msgnum) } /* Begin output */ - output_headers(3); + output_headers(1, 1, 0, 0, 0, 0, 0); do_template("beginbox_nt"); wprintf("

 " " Add or edit an event

\n"); @@ -96,8 +96,8 @@ void display_edit_individual_event(icalcomponent *supplied_vevent, long msgnum) if (p != NULL) { escputs((char *)icalproperty_get_comment(p)); } - wprintf("
\n"); - wprintf("SEQUENCE == %d
\n", sequence); + wprintf("
\n"); + wprintf("SEQUENCE == %d
\n", sequence); *************************************************************/ wprintf("
\n"); @@ -323,7 +323,7 @@ void display_edit_individual_event(icalcomponent *supplied_vevent, long msgnum) wprintf("\n"); /* Attendees */ - wprintf("Attendees
" + wprintf("Attendees
" "(One per line)" "" "
\n"); + wprintf("Command input (if requesting SEND_LISTING transfer mode):
\n"); + wprintf("
\n"); wprintf("Detected host header is http://%s\n", WC->http_host); wprintf(""); wprintf(" "); - wprintf("
\n"); + wprintf("
\n"); wprintf("
\n"); do_template("endbox"); @@ -313,7 +313,7 @@ void do_generic(void) return; } - output_headers(3); + output_headers(1, 1, 0, 0, 0, 0, 0); serv_printf("%s", bstr("g_cmd")); serv_gets(buf); @@ -325,7 +325,7 @@ void do_generic(void) escputs(bstr("g_cmd")); wprintf("Result:"); escputs(buf); - wprintf("
\n"); + wprintf("
\n"); if (buf[0] == '8') { serv_printf("\n\n000"); @@ -333,7 +333,7 @@ void do_generic(void) if ((buf[0] == '1') || (buf[0] == '8')) { while (serv_gets(gcontent), strcmp(gcontent, "000")) { escputs(gcontent); - wprintf("
\n"); + wprintf("
\n"); } wprintf("000"); } @@ -354,8 +354,8 @@ void do_generic(void) serv_write(junk, len); free(junk); } - wprintf("
"); - wprintf("Enter another command
\n"); + wprintf("
"); + wprintf("Enter another command
\n"); wprintf("Return to menu\n"); do_template("endbox"); wDumpContent(1); @@ -372,7 +372,7 @@ void do_generic(void) void display_menubar(int as_single_page) { if (as_single_page) { - output_headers(0); + output_headers(0, 0, 0, 0, 0, 0, 0); wprintf("\n" "\n" "MenuBar\n" diff --git a/webcit/messages.c b/webcit/messages.c index ffe4a20f6..5030cb2fa 100644 --- a/webcit/messages.c +++ b/webcit/messages.c @@ -206,7 +206,7 @@ void display_parsed_vcard(struct vCard *v, int full) { } else if (!strcasecmp(firsttoken, "email")) { - if (strlen(mailto) > 0) strcat(mailto, "
"); + if (strlen(mailto) > 0) strcat(mailto, "
"); strcat(mailto, ""); } else if (!strcasecmp(firsttoken, "tel")) { - if (strlen(phone) > 0) strcat(phone, "
"); + if (strlen(phone) > 0) strcat(phone, "
"); strcat(phone, thisvalue); for (j=0; j 0) { escputs(buf); - wprintf("
"); + wprintf("
"); } } wprintf("\n"); @@ -364,7 +364,7 @@ void read_message(long msgnum) { serv_printf("MSG4 %ld", msgnum); serv_gets(buf); if (buf[0] != '1') { - wprintf("ERROR: %s
\n", &buf[4]); + wprintf("ERROR: %s
\n", &buf[4]); return; } @@ -381,7 +381,7 @@ void read_message(long msgnum) { while (serv_gets(buf), strcasecmp(buf, "text")) { if (!strcmp(buf, "000")) { - wprintf("unexpected end of message

\n"); + wprintf("unexpected end of message

\n"); wprintf("\n"); return; } @@ -447,7 +447,7 @@ void read_message(long msgnum) { "TARGET=\"wc.%ld.%s\">" "\n" - "Part %s: %s (%s, %d bytes)

\n", + "Part %s: %s (%s, %d bytes)
\n", msgnum, mime_partnum, msgnum, mime_partnum, mime_partnum, mime_filename, @@ -500,7 +500,7 @@ void read_message(long msgnum) { wprintf(""); if (strlen(m_subject) > 0) { - wprintf("
" + wprintf("
" "" "Subject: %s" "", m_subject @@ -549,7 +549,7 @@ void read_message(long msgnum) { strcpy(mime_content_type, "text/plain"); while (serv_gets(buf), (strlen(buf) > 0)) { if (!strcmp(buf, "000")) { - wprintf("unexpected end of message

\n"); + wprintf("unexpected end of message

\n"); goto ENDBODY; } if (!strncasecmp(buf, "Content-type: ", 14)) { @@ -582,9 +582,9 @@ void read_message(long msgnum) { wprintf(""); url(buf); escputs(buf); - wprintf("
\n"); + wprintf("
\n"); } - wprintf("
"); + wprintf("
"); } else /* HTML is fun, but we've got to strip it first */ @@ -594,7 +594,7 @@ void read_message(long msgnum) { /* Unknown weirdness */ else { - wprintf("I don't know how to display %s
\n", + wprintf("I don't know how to display %s
\n", mime_content_type); while (serv_gets(buf), strcmp(buf, "000")) { } } @@ -642,7 +642,7 @@ ENDBODY: wprintf("\n"); /* end everythingamundo table */ - wprintf("
\n"); + wprintf("
\n"); } @@ -950,7 +950,7 @@ void do_addrbook_view(struct addrbookent *addrbook, int num_ab) { wprintf("\n"); } } - wprintf("
\n"); + wprintf("
\n"); wprintf("\n" @@ -1000,7 +1000,7 @@ int load_msg_ptrs(char *servcmd) serv_puts(servcmd); serv_gets(buf); if (buf[0] != '1') { - wprintf("%s
\n", &buf[4]); + wprintf("%s
\n", &buf[4]); return (nummsgs); } while (serv_gets(buf), strcmp(buf, "000")) { @@ -1049,7 +1049,7 @@ void readloop(char *oper) is_summary = atoi(bstr("summary")); if (maxmsgs == 0) maxmsgs = DEFAULT_MAXMSGS; - output_headers(1); + output_headers(1, 1, 1, 0, 0, 0, 0); /* When in summary mode, always show ALL messages instead of just * new or old. Otherwise, show what the user asked for. @@ -1544,7 +1544,7 @@ void display_enter(void) #endif /* Otherwise proceed normally */ - output_headers(1); + output_headers(1, 1, 1, 0, 0, 0, 0); sprintf(buf, "ENT0 0|%s|0|0", bstr("recp")); serv_puts(buf); serv_gets(buf); @@ -1552,7 +1552,7 @@ void display_enter(void) if (!strncmp(buf, "570", 3)) { if (strlen(bstr("recp")) > 0) { svprintf("RECPERROR", WCS_STRING, - "%s
\n", + "%s
\n", &buf[4] ); } @@ -1560,7 +1560,7 @@ void display_enter(void) goto DONE; } if (buf[0] != '2') { - wprintf("%s
\n", &buf[4]); + wprintf("%s
\n", &buf[4]); goto DONE; } @@ -1604,12 +1604,12 @@ void display_enter(void) wprintf("
"); wprintf("" " " - "
\n"); + "
\n"); wprintf("
\n"); - wprintf("\n" - "\n" + " \n" - " \n" - " - - - - - - - - - - - - - - - -
Button mouseover demo
- - -
- - - - - - - diff --git a/webcit/static/chatframeset.html b/webcit/static/chatframeset.html index 7a03044a5..3f64b1727 100644 --- a/webcit/static/chatframeset.html +++ b/webcit/static/chatframeset.html @@ -1,31 +1,30 @@ - - - - Real-time chat: <?ROOMNAME> - - - + + + Real-time chat: <?ROOMNAME> + + + - + - - + + - - + + - - + + - + - + - +<noframes> Sorry, web-based access to Citadel requires a browser that supports frames, -such as <A HREF="http://www.netscape.com/communicator">Netscape</A> or -<A HREF="http://www.mozilla.org">Mozilla</A>. If you are using an older +such as <a href="http://www.mozilla.org/products/firefox/">Firefox</a> or +<a href="http://www.mozilla.org">Mozilla</a>. If you are using an older browser, please upgrade now. - + - + diff --git a/webcit/static/empty.html b/webcit/static/empty.html index 7383a6907..df87876a5 100644 --- a/webcit/static/empty.html +++ b/webcit/static/empty.html @@ -1,9 +1,8 @@ - - - - Empty Page - - - - - + + + Empty Page + + + + + diff --git a/webcit/static/endbox.html b/webcit/static/endbox.html index 796f18425..d6f4f83f3 100644 --- a/webcit/static/endbox.html +++ b/webcit/static/endbox.html @@ -1,10 +1,3 @@ - - - - - - - - - -
+ + +
diff --git a/webcit/static/head.html b/webcit/static/head.html index 7fbffbea1..a7565b15b 100644 --- a/webcit/static/head.html +++ b/webcit/static/head.html @@ -1,13 +1,401 @@ - - - - <?SERV_HUMANNODE> - Citadel - - - - - - + + + + - + +Citadel: <?SERV_HUMANNODE> + + + + + diff --git a/webcit/static/login.html b/webcit/static/login.html index 7fc2a9aae..2a811a4b1 100644 --- a/webcit/static/login.html +++ b/webcit/static/login.html @@ -1,29 +1,29 @@ -
- - - +
+ +
+
- - - - - +
User name:
Password:
+ + + + - + -
User name:
Password:
+
-
+
-

+

@@ -38,10 +38,10 @@ cookies.
  • Also keep in mind that if your browser is configured to block pop-up windows, you will not be able - to receive any instant messages.
    + to receive any instant messages.
    -
  • +
    diff --git a/webcit/static/lowerleftcorner.gif b/webcit/static/lowerleftcorner.gif deleted file mode 100644 index 9438eb9cf..000000000 Binary files a/webcit/static/lowerleftcorner.gif and /dev/null differ diff --git a/webcit/static/lowerrightcorner.gif b/webcit/static/lowerrightcorner.gif deleted file mode 100644 index f84ac372a..000000000 Binary files a/webcit/static/lowerrightcorner.gif and /dev/null differ diff --git a/webcit/static/mainframeset.html b/webcit/static/mainframeset.html deleted file mode 100644 index d54b04c44..000000000 --- a/webcit/static/mainframeset.html +++ /dev/null @@ -1,29 +0,0 @@ - - - - Citadel - - - - - - - - - - - - - - - - - - -Sorry, web-based access to Citadel requires a browser that supports frames, -such as <A HREF="http://www.netscape.com/communicator">Netscape</A> or -<A HREF="http://www.mozilla.org">Mozilla</A>. If you are using an older -browser, please upgrade now. - - - diff --git a/webcit/static/menubar.html b/webcit/static/menubar.html index 9b573ac63..1bce4f539 100644 --- a/webcit/static/menubar.html +++ b/webcit/static/menubar.html @@ -1,90 +1,90 @@ - + -
    -

    +
    +

    - - - - - - - - - - - - - - - - - - - - - - - - -
    - - Goto next room - -
    - - Skip this room - -
    - - Ungoto -
    - - Read new messages - -
    - - Read all messages - -
    - - Enter a message - -
    - - - Who is online? - - -
    - - Page another user - -
    - - Advanced options - -
    - - Log off
    -
    + + + + + + + + + + + + + + + + + + + + + + + + +
    + + Goto next room + +
    + + Skip this room + +
    + + Ungoto +
    + + Read new messages + +
    + + Read all messages + +
    + + Enter a message + +
    + + + Who is online? + + +
    + + Page another user + +
    + + Advanced options + +
    + + Log off
    +
    -

    +

    - -POWERED BY
    -CITADEL
    + +POWERED BY
    +CITADEL
    -
    +
    diff --git a/webcit/static/navbar.html b/webcit/static/navbar.html index f0ef9aa66..020197ae6 100644 --- a/webcit/static/navbar.html +++ b/webcit/static/navbar.html @@ -1,42 +1,41 @@ - - - - - - - - + + + + + + + - - - - -
    - - - Ungoto - - - - New messages - - - - All messages - - - - Enter a message - - - Skip this room - - - - Goto next room - -
    + + + + +
    + + + Ungoto + + + + New messages + + + + All messages + + + + Enter a message + + + Skip this room + + + + Goto next room + +
    - - + + diff --git a/webcit/static/newstartpage.html b/webcit/static/newstartpage.html index 75573cf4f..fec7e4d23 100644 --- a/webcit/static/newstartpage.html +++ b/webcit/static/newstartpage.html @@ -1,20 +1,20 @@ - - - - -
    - New start page - -
    + + + + +
    + New start page + +
    -
    +
    Your start page has been changed. -

    +

    -(Note: this does not change your browser's home page. -It changes the page you begin on when you log on to ). -

    +(Note: this does not change your browser's home page. +It changes the page you begin on when you log on to ). +

    Back... -
    +
    diff --git a/webcit/static/nocookies.html b/webcit/static/nocookies.html index 3b256da6f..e42e995e4 100644 --- a/webcit/static/nocookies.html +++ b/webcit/static/nocookies.html @@ -1,21 +1,20 @@ - - - - Error - - - - + + + Error + + + + -
    -

    Sorry!

    -
    +
    +

    Sorry!

    +
    In order to access this system, you must use a web browser which supports -"cookies" and have them turned on.

    +"cookies" and have them turned on.

    This software sends a cookie that is only used during your login session, -and will not be saved to your disk.

    +and will not be saved to your disk.

    Please enable cookies and log in again. We are sorry for the inconvenience. -
    +
    - - + + diff --git a/webcit/static/palette.htm b/webcit/static/palette.htm index 14f5db738..835008bc2 100644 --- a/webcit/static/palette.htm +++ b/webcit/static/palette.htm @@ -1,4 +1,3 @@ - Text Color diff --git a/webcit/static/prompt_for_recipient.html b/webcit/static/prompt_for_recipient.html index 79948daab..7ae834afd 100644 --- a/webcit/static/prompt_for_recipient.html +++ b/webcit/static/prompt_for_recipient.html @@ -1,21 +1,21 @@ - -
    + +
    Send private e-mail -
    +
    -
    - -
    -
    +
    + +
    + Enter recipient(s):  -

    - +

    +   - - -
    -
    -
    + + +
    +
    +
    diff --git a/webcit/static/roombanner.html b/webcit/static/roombanner.html index 562d60f9e..89922ce6e 100644 --- a/webcit/static/roombanner.html +++ b/webcit/static/roombanner.html @@ -1,26 +1,26 @@ -
    +
    - - +
    + - - - + + - + - - -
    - - - - + + + + + - + - - new of messages -
    - -
    + + + new of messages +
    + + + + -
    +
    diff --git a/webcit/static/style.css b/webcit/static/style.css deleted file mode 100644 index 12631e068..000000000 --- a/webcit/static/style.css +++ /dev/null @@ -1,404 +0,0 @@ -a:link { - color: #0000FF; - text-decoration: none; -} - -a:visited { - color: #0000FF; - text-decoration: none; -} - -a:active { - color: #0000FF; - text-decoration: none; -} - -a:hover { - text-decoration: underline; -} - -.menubar_link { - font-family: Bitstream Vera Sans,Tahoma,Arial,Helvetica,sans-serif; - font-size: 9pt; -} - -.navbar_link { - font-family: Bitstream Vera Sans,Arial,Helvetica,sans-serif; - font-size: 7pt; -} - -.titlebar { - font-family: Bitstream Vera Sans,Arial,Helvetica,sans-serif; - font-size: 12pt; - color: #FFFFEE; -} - -.mainmenu { - font-family: Bitstream Vera Sans,Arial,Helvetica,sans-serif; - font-size: 10pt; - font-weight: bold; - color: #880000; -} - -.menudesc { - font-family: Bitstream Vera Sans,Arial,Helvetica,sans-serif; - font-size: 8pt; - color: #000088; -} - -.message_header { - font-family: Bitstream Vera Sans,Arial,Helvetica,sans-serif; - font-size: 10pt; - color: #000000; -} - -.message_subject { - font-family: Bitstream Vera Sans,Arial,Helvetica,sans-serif; - font-size: 10pt; - color: #000000; - font-style: italic; -} - -.tablabel { - font-family: Bitstream Vera Sans,Arial,Helvetica,sans-serif; - font-size: 10pt; - font-weight: bold; - color: #000000; -} - -.boxlabel { - font-family: Bitstream Vera Sans,Arial,Helvetica,sans-serif; - font-size: 9pt; - font-weight: bold; - color: #FFFFEE; -} - -.youhavemail { - font-family: Bitstream Vera Sans,Arial,Helvetica,sans-serif; - font-size: 6pt; - font-style: italic; - color: #000044; -} - -.customize { - font-family: Bitstream Vera Sans,Arial,Helvetica,sans-serif; - font-size: 8pt; - font-style: italic; - color: #000044; - background-color: #DDDDCC; -} - -.room_banner_room_name { - font-family: Bitstream Vera Sans,Arial,Helvetica,sans-serif; - font-size: 14pt; - font-weight: bold; - color: #FFFFEE; -} - -.room_banner_room_info { - font-family: Bitstream Vera Sans,Arial,Helvetica,sans-serif; - font-size: 10pt; - color: #FFFFEE; -} - -.room_banner_new_messages { - font-family: Bitstream Vera Sans,Arial,Helvetica,sans-serif; - font-size: 10pt; - color: #DDDDCC; -} - -.room_banner_start_page { - font-family: Bitstream Vera Sans,Arial,Helvetica,sans-serif; - font-size: 7pt; - color: #DDDDCC; -} - - -.menubar_bg { - background-color: #FF0000; -} - -.iconbar_link { - font-family: Bitstream Vera Sans,Tahoma,Arial,Helvetica,sans-serif; - font-size: 7pt; -} - -.powered_by { - font-family: Bitstream Vera Sans,Arial,Helvetica,sans-serif; - font-size: 6pt; -} - -.roomlist_floor { - font-family: Bitstream Vera Sans,Arial,Helvetica,sans-serif; - font-size: 12pt; - font-weight: bold; - color: #000000; -} - -.roomlist_new { - font-family: Bitstream Vera Sans,Arial,Helvetica,sans-serif; - font-size: 10pt; - color: #880000; - font-weight: bold; -} - -.roomlist_old { - font-family: Bitstream Vera Sans,Arial,Helvetica,sans-serif; - font-size: 10pt; - color: #000088; -} - - -body { - background: #aaaaaa; - color: #000000; - font-family: Bitstream Vera Sans,Arial,Helvetica,sans-serif; - font-weight: normal; - font-size: 10pt; -} - -h1 { - font-weight: bold; - text-align: center -} - -h2 { - font-weight: bold -} - -h3 { - font-weight: bold -} - -h4 { - font-weight: bold -} - -h5 { - margin-left: 6%; - margin-right: 6%; - font-weight: bold -} - -ul, ol, dl, p { - margin-left: 6%; - margin-right: 6% -} - -ul ul, table ol, table ul, dl ol, dl ul { - margin-left: 1.2em; - margin-right: 1%; - padding-left: 0 -} - -pre { - margin-left: 10%; - white-space: pre -} - -table caption { - font-size: larger; - font-weight: bolder -} - -table p, table dl, ol p, ul p, dl p, blockquote p, .note p, .note ul, .note ol, .note dl, li pre, dd pre { - margin-left: 0; - margin-right: 0 -} - -p.top { - margin-left: 1%; - margin-right: 1% -} - -blockquote { - margin-left: 8%; - margin-right: 8%; - border: thin ridge #dc143c -} - -blockquote pre { - margin-left: 1%; - margin-right: 1% -} - -dt a { - font-weight: bold; - margin-top: .8em -} - - -.html { - color: #000080; - background: none -} - -.css { - color: #800000; - background: none -} - -.javascript { - color: #008000; - background: none -} - -dfn { - font-style: normal; - font-weight: bolder -} - -var sub { font-style: normal } - -.note { - font-size: 85%; - margin-left: 10% -} - -.toolbar { - text-align: center -} - -.toolbar IMG { - float: right -} - -.errormsg { - color: #AA0000; - background: none; - font-style: italic; -} - -.warning { - color: #FF4500; - background: none; - text-decoration: none -} - -.error strong { - color: #DC143C; - background: #FFD700; - text-decoration: none -} - -.warning strong { - color: #FF4500; - background: #FFD700; - text-decoration: none -} - -.warning a:link, .warning a:visited, .warning a:active { - color: #FF4500; - background: none; - text-decoration: underline -} - -.error a:link, .error a:visited, .error a:active { - color: #DC143C; - background: none; - text-decoration: underline -} - -.error strong a:link, .error strong a:visited, .error strong a:active { - color: #DC143C; - background: #FFD700 -} - -.warning strong a:link, .warning strong a:visited, .warning strong a:active { - color: #FF4500; - background: #FFD700 -} - -colgroup.entity { text-align: center } - -.default { text-decoration: underline; font-style: normal } -.required { font-weight: bold } -td li.transitional, .elements li.transitional { - font-weight: lighter; - color: #696969; - background: none -} - -td li.frameset, .elements li.frameset { - font-weight: lighter; - color: #808080; - background: none -} - -.footer, .checkedDocument { - margin-top: 2em; - padding-top: 1em; - border-top: solid thin black -} - -strong.legal { - font-weight: normal; - text-transform: uppercase -} - -@media print { - input#toggler, .toolbar { display: none } -} - - - -#mainMenu { - background-color: #EEE; - border: 1px solid #CCC; - color: #000; - width: 203px; -} - -#menuList { - margin: 0px; - padding: 10px 0px 10px 15px; -} - -li.menubar { - background: url(/static/plus.gif) no-repeat 0em 0.3em; - font-size: 12px; - line-height: 1.5em; - list-style: none outside; -} - -.menu, .submenu { - display: none; - margin-left: 15px; - padding: 0px; -} - -.menu li, .submenu li { - background: url(/static/square.gif) no-repeat 0em 0.3em; - list-style: none outside; -} - -a.actuator { - background-color: transparent; - color: #000; - font-size: 12px; - padding-left: 15px; - text-decoration: none; -} - -a.actuator:hover { - text-decoration: underline; -} - -.menu li a, .submenu li a { - background-color: transparent; - color: #000; - font-size: 12px; - padding-left: 15px; - text-decoration: none; -} - -.menu li a:hover, submenu li a:hover { - /*border-bottom: 1px dashed #000;*/ - text-decoration: underline; -} - -span.key { - text-decoration: underline; -} - - diff --git a/webcit/static/trailing.html b/webcit/static/trailing.html index e04310fdd..308b1d01b 100644 --- a/webcit/static/trailing.html +++ b/webcit/static/trailing.html @@ -1,2 +1,2 @@ - - + + diff --git a/webcit/static/upload.html b/webcit/static/upload.html deleted file mode 100644 index 9cb169a7b..000000000 --- a/webcit/static/upload.html +++ /dev/null @@ -1,30 +0,0 @@ - -Uploading test - -
    - - - - - - - - - - - - -
    - File 1: - - -
     
    - - - -
    -
    - - - - diff --git a/webcit/static/upperleftcorner.gif b/webcit/static/upperleftcorner.gif deleted file mode 100644 index e8ac24b25..000000000 Binary files a/webcit/static/upperleftcorner.gif and /dev/null differ diff --git a/webcit/static/upperleftcorner_nt.gif b/webcit/static/upperleftcorner_nt.gif deleted file mode 100644 index 389e8d858..000000000 Binary files a/webcit/static/upperleftcorner_nt.gif and /dev/null differ diff --git a/webcit/static/upperrightcorner.gif b/webcit/static/upperrightcorner.gif deleted file mode 100644 index edd9d79b7..000000000 Binary files a/webcit/static/upperrightcorner.gif and /dev/null differ diff --git a/webcit/static/upperrightcorner_nt.gif b/webcit/static/upperrightcorner_nt.gif deleted file mode 100644 index 9da6b54af..000000000 Binary files a/webcit/static/upperrightcorner_nt.gif and /dev/null differ diff --git a/webcit/static/whoframeset.html b/webcit/static/whoframeset.html deleted file mode 100644 index 3166b914e..000000000 --- a/webcit/static/whoframeset.html +++ /dev/null @@ -1,20 +0,0 @@ - - - - WebCit - - - - - - - - - - - -You can't do this because you're using a browser that doesn't support frames. - - - - diff --git a/webcit/subst.c b/webcit/subst.c index 38f147b67..9392cffee 100644 --- a/webcit/subst.c +++ b/webcit/subst.c @@ -223,7 +223,7 @@ void do_template(void *templatename) { fp = fopen(filename, "r"); if (fp == NULL) { wprintf("ERROR - could not open template "); - wprintf("'%s' - %s
    \n", + wprintf("'%s' - %s
    \n", templatename, strerror(errno)); return; } diff --git a/webcit/summary.c b/webcit/summary.c index f287534a7..7141e72f4 100644 --- a/webcit/summary.c +++ b/webcit/summary.c @@ -117,7 +117,7 @@ void wholist_section(void) { if (buf[0] == '1') while(serv_gets(buf), strcmp(buf, "000")) { extract(user, buf, 1); escputs(user); - wprintf("
    \n"); + wprintf("
    \n"); } do_template("endbox"); } @@ -144,7 +144,7 @@ void tasks_section(void) { } if (num_msgs < 1) { - wprintf("(None)
    \n"); + wprintf("(None)
    \n"); } else { for (i=0; i(Nothing)
    \n"); + wprintf("(Nothing)
    \n"); } else { for (i=0; i\nYour system administrator is "); + wprintf(".
    \nYour system administrator is "); escputs(serv_info.serv_sysadm); wprintf(".\n"); do_template("endbox"); @@ -219,8 +219,9 @@ void server_info_section(void) { * Display this user's summary page */ void summary(void) { - output_headers(7); + output_headers(1, 1, 2, 0, 1, 0, 0); + wprintf("
    \n"); wprintf("" "
    " "" @@ -229,9 +230,10 @@ void summary(void) { wprintf("\n"); wprintf(""); output_date(); - wprintf("
    "); + wprintf("
    "); offer_start_page(); wprintf("
    \n"); + wprintf("
    \n"); /* * Now let's do three columns of crap. All portals and all groupware @@ -254,7 +256,7 @@ void summary(void) { */ wprintf(""); server_info_section(); - wprintf("
    "); + wprintf("
    "); tasks_section(); /* @@ -262,7 +264,7 @@ void summary(void) { */ wprintf(""); new_messages_section(); - wprintf("
    "); + wprintf("
    "); calendar_section(); /* diff --git a/webcit/sysmsgs.c b/webcit/sysmsgs.c index 0aa9e75f9..00b3ff1fa 100644 --- a/webcit/sysmsgs.c +++ b/webcit/sysmsgs.c @@ -32,7 +32,7 @@ * display the form for editing something (room info, bio, etc) */ void display_edit(char *description, char *check_cmd, - char *read_cmd, char *save_cmd, int headers_type) + char *read_cmd, char *save_cmd, int with_room_banner) { char buf[SIZ]; @@ -44,7 +44,12 @@ void display_edit(char *description, char *check_cmd, display_main_menu(); return; } - output_headers(headers_type); + if (with_room_banner) { + output_headers(1, 1, 1, 0, 0, 0, 0); + } + else { + output_headers(1, 1, 0, 0, 0, 0, 0); + } svprintf("BOXTITLE", WCS_STRING, "Edit %s", description); do_template("beginbox"); @@ -52,7 +57,7 @@ void display_edit(char *description, char *check_cmd, wprintf("
    Enter %s below. Text is formatted to\n", description); wprintf("the reader's screen width. To defeat the\n"); wprintf("formatting, indent a line at least one space. \n"); - wprintf("
    "); + wprintf("
    "); wprintf("
    \n", save_cmd); wprintf("

    \n"); wprintf(""); wprintf(" "); - wprintf("
    \n"); + wprintf("
    \n"); wprintf("
    \n"); do_template("endbox"); diff --git a/webcit/useredit.c b/webcit/useredit.c index a4f55ef0a..8aa73c19d 100644 --- a/webcit/useredit.c +++ b/webcit/useredit.c @@ -35,7 +35,7 @@ void select_user_to_edit(char *message, char *preselect) char buf[SIZ]; char username[SIZ]; - output_headers(3); /* No room banner on this screen */ + output_headers(1, 1, 0, 0, 0, 0, 0); /* No room banner on this screen */ if (message != NULL) wprintf(message); @@ -45,7 +45,7 @@ void select_user_to_edit(char *message, char *preselect) do_template("beginbox"); wprintf("To edit an existing user account, select the user " - "name from the list and click 'Edit'.

    "); + "name from the list and click 'Edit'.

    "); wprintf("
    " "
    \n"); @@ -64,7 +64,7 @@ void select_user_to_edit(char *message, char *preselect) wprintf("\n"); } } - wprintf("
    \n"); + wprintf("
    \n"); wprintf(""); wprintf(""); @@ -77,11 +77,11 @@ void select_user_to_edit(char *message, char *preselect) do_template("beginbox"); wprintf("To create a new user account, enter the desired " - "user name in the box below and click 'Create'.

    "); + "user name in the box below and click 'Create'.

    "); wprintf("
    \n"); wprintf("New user: "); - wprintf("
    \n" + wprintf("
    \n" "" "
    \n"); @@ -184,7 +184,7 @@ void display_edit_address_book_entry(char *username, long usernum) { if (buf[0] != '2') { sprintf(error_message, "" - "%s

    \n", &buf[4]); + "%s

    \n", &buf[4]); select_user_to_edit(error_message, username); return; } @@ -196,7 +196,7 @@ void display_edit_address_book_entry(char *username, long usernum) { sprintf(error_message, "" "Could not create/edit vCard" - "

    \n" + "

    \n" ); select_user_to_edit(error_message, username); return; @@ -243,7 +243,7 @@ void display_edituser(char *supplied_username, int is_new) { if (buf[0] != '2') { sprintf(error_message, "" - "%s

    \n", &buf[4]); + "%s

    \n", &buf[4]); select_user_to_edit(error_message, username); return; } @@ -263,12 +263,14 @@ void display_edituser(char *supplied_username, int is_new) { return; } - output_headers(3); /* No room banner on this screen */ + output_headers(1, 1, 2, 0, 0, 0, 0); + wprintf("
    \n"); wprintf("
    "); wprintf("" "Edit user account: "); escputs(username); wprintf("
    \n"); + wprintf("
    \n"); do_template("beginbox_nt"); wprintf("
    \n" @@ -339,7 +341,7 @@ void display_edituser(char *supplied_username, int is_new) { wprintf("\n" " " "\n" - "

    \n"); + "

    \n"); wprintf("
    \n"); do_template("endbox"); @@ -378,7 +380,7 @@ void edituser(void) { if (buf[0] != '2') { sprintf(message, "" - "%s

    \n", &buf[4]); + "%s

    \n", &buf[4]); } else { strcpy(message, ""); @@ -417,7 +419,7 @@ void create_user(void) { else { sprintf(error_message, "" - "%s

    \n", &buf[4]); + "%s

    \n", &buf[4]); select_user_to_edit(error_message, NULL); } diff --git a/webcit/userlist.c b/webcit/userlist.c index d05e635a4..f291247eb 100644 --- a/webcit/userlist.c +++ b/webcit/userlist.c @@ -50,12 +50,12 @@ void userlist(void) strcpy(bptr->name, buf); bio = bptr; } - output_headers(3); + output_headers(1, 1, 0, 0, 0, 0, 0); serv_puts("LIST"); serv_gets(buf); if (buf[0] != '1') { - wprintf("%s
    \n", &buf[4]); + wprintf("%s
    \n", &buf[4]); goto DONE; } @@ -119,7 +119,7 @@ void showuser(void) char buf[SIZ]; int have_pic; - output_headers(3); + output_headers(1, 1, 0, 0, 0, 0, 0); svprintf("BOXTITLE", WCS_STRING, "User profile"); do_template("beginbox"); @@ -147,7 +147,7 @@ void showuser(void) if (buf[0] == '1') { fmout(NULL, "JUSTIFY"); } - wprintf("
    " "" diff --git a/webcit/vcard_edit.c b/webcit/vcard_edit.c index e20d29673..ee51e4b75 100644 --- a/webcit/vcard_edit.c +++ b/webcit/vcard_edit.c @@ -78,7 +78,7 @@ void do_edit_vcard(long msgnum, char *partnum, char *return_to) { other_inetemail[0] = 0; extrafields[0] = 0; - output_headers(3); + output_headers(1, 1, 0, 0, 0, 0, 0); strcpy(whatuser, ""); @@ -243,17 +243,17 @@ void do_edit_vcard(long msgnum, char *partnum, char *return_to) { "VALUE=\"%s\" MAXLENGTH=\"29\">\n", worktel); - wprintf("
    " - "
    Primary Internet e-mail address
    " + wprintf("
    " + "
    Primary Internet e-mail address
    " "
    " + wprintf("\">
    " "
    " - "Other Internet e-mail addresses
    " + "Other Internet e-mail addresses
    " "

    \n"); + wprintf("

    \n"); wprintf("\n"); /* end of "text" div */ + + /* NAVBAR + wprintf("
    "); + wprintf("FIXME the navbar should go here, dude...\n"); + wprintf("
    \n"); + */ + do_template("trailing"); } - } @@ -338,41 +345,28 @@ void msgescputs(char *strbuf) { /* * Output all that important stuff that the browser will want to see - * - * control codes: - * - * Bits 0 and 1: - * 0 = Nothing. Do not display any leading HTTP or HTML. - * 1 = HTTP headers plus the room banner - * 2 = HTTP headers required to terminate the session (unset cookies) - * 3 = HTTP and HTML headers, but no room banner - * - * Bit 2: Set to 1 to auto-refresh page every 30 seconds - * Bit 3: suppress check for express messages - * Bit 4: Allow browser to cache this document - * */ -void output_headers(int controlcode) -{ +void output_headers( int do_httpheaders, /* 1 = output HTTP headers */ + int do_htmlhead, /* 1 = output HTML section and opener */ + + int do_room_banner, /* 0=no, 1=yes, */ + /* 2 = I'm going to embed my own, so don't open the */ + /*
    either. */ + + int unset_cookies, /* 1 = session is terminating, so unset the cookies */ + int refresh30, /* 1 = automatically refresh page every 30 seconds */ + int suppress_check, /* 1 = suppress check for instant messages */ + int cache /* 1 = allow browser to cache this page */ +) { char cookie[SIZ]; - int print_standard_html_head = 0; - int refresh30 = 0; - int suppress_check = 0; - int cache = 0; char httpnow[SIZ]; char onload_fcn[SIZ]; static int pageseq = 0; - print_standard_html_head = controlcode & 0x03; - refresh30 = ((controlcode & 0x04) >> 2); - suppress_check = ((controlcode & 0x08) >> 3); - cache = ((controlcode & 0x10) >> 4); - wprintf("HTTP/1.0 200 OK\n"); - httpdate(httpnow, time(NULL)); - if (print_standard_html_head > 0) { + if (do_httpheaders) { wprintf("Content-type: text/html\n" "Server: %s\n", SERVER ); @@ -386,7 +380,7 @@ void output_headers(int controlcode) stuff_to_cookie(cookie, WC->wc_session, WC->wc_username, WC->wc_password, WC->wc_roomname); - if (print_standard_html_head == 2) { + if (unset_cookies) { wprintf("Set-cookie: webcit=%s; path=/\n", unset); } else { wprintf("Set-cookie: webcit=%s; path=/\n", cookie); @@ -395,44 +389,37 @@ void output_headers(int controlcode) } } - if (print_standard_html_head > 0) { + if (do_htmlhead) { wprintf("\n"); if (refresh30) { svprintf("REFRESHTAG", WCS_STRING, "%s", - "\n"); + "\n"); } else { svprintf("REFRESHTAG", WCS_STRING, "%s", - "\n"); + "\n"); } /* script for checking for pages (not always launched) */ sprintf(onload_fcn, "function onload_fcn() { \n"); - if (!WC->outside_frameset_allowed) { - strcat(onload_fcn, " force_frameset(); \n"); - } if (!suppress_check) if (WC->HaveExpressMessages) { strcat(onload_fcn, " launch_page_popup(); \n"); WC->HaveExpressMessages = 0; } strcat(onload_fcn, "} \n"); - svprintf("PAGERSCRIPT", WCS_STRING, - "\n", + "\n", ++pageseq, onload_fcn ); @@ -446,18 +433,31 @@ void output_headers(int controlcode) do_template("background"); } - if (print_standard_html_head == 1) { - wprintf(""); - embed_room_banner(NULL); + /* ICONBAR */ + if (do_htmlhead) { + if ( (WC->logged_in) && (!unset_cookies) ) { + wprintf("
    "); + do_iconbar(); + wprintf("
    \n"); + } + if (do_room_banner == 1) { + wprintf("
    \n"); + embed_room_banner(NULL); + wprintf("
    \n"); + } + } + + if (do_room_banner != 2) { + wprintf("
    \n"); } if (strlen(WC->ImportantMessage) > 0) { do_template("beginbox_nt"); wprintf("" - "%s
    \n", WC->ImportantMessage); + "%s
    \n", WC->ImportantMessage); do_template("endbox"); strcpy(WC->ImportantMessage, ""); - } + } } @@ -494,7 +494,12 @@ void check_for_express_messages() */ void http_transmit_thing(char *thing, size_t length, char *content_type, int is_static) { - output_headers(is_static ? 0x10 : 0x00); + if (is_static) { + output_headers(0, 0, 0, 0, 0, 0, 1); + } + else { + output_headers(0, 0, 0, 0, 0, 0, 0); + } wprintf("Content-type: %s\n" "Content-length: %ld\n" "Server: %s\n" @@ -608,7 +613,7 @@ void output_image() /* wprintf("HTTP/1.0 404 %s\n", &buf[4]); - output_headers(0); + output_headers(0, 0, 0, 0, 0, 0, 0); wprintf("Content-Type: text/plain\n" "\n" "Error retrieving image: %s\n", @@ -637,7 +642,7 @@ void output_mimepart() bytes = extract_long(&buf[4], 0); content = malloc(bytes + 2); extract(content_type, &buf[4], 3); - output_headers(0); + output_headers(0, 0, 0, 0, 0, 0, 0); read_server_binary(content, bytes); serv_puts("CLOS"); serv_gets(buf); @@ -645,7 +650,7 @@ void output_mimepart() free(content); } else { wprintf("HTTP/1.0 404 %s\n", &buf[4]); - output_headers(0); + output_headers(0, 0, 0, 0, 0, 0, 0); wprintf("Content-Type: text/plain\n"); wprintf("\n"); wprintf("Error retrieving part: %s\n", &buf[4]); @@ -690,13 +695,15 @@ char *load_mimepart(long msgnum, char *partnum) void convenience_page(char *titlebarcolor, char *titlebarmsg, char *messagetext) { wprintf("HTTP/1.0 200 OK\n"); - output_headers(1); + output_headers(1, 1, 2, 0, 0, 0, 0); + wprintf("
    \n"); wprintf("
    ", titlebarcolor); wprintf("%s\n", titlebarmsg); - wprintf("

    \n"); + wprintf("\n"); + wprintf("
    \n"); escputs(messagetext); - wprintf("
    \n"); + wprintf("
    \n"); wDumpContent(1); } @@ -705,7 +712,7 @@ void convenience_page(char *titlebarcolor, char *titlebarmsg, char *messagetext) * Display a blank page. */ void blank_page(void) { - output_headers(7); + output_headers(1, 1, 0, 0, 1, 0, 0); wDumpContent(2); } @@ -746,7 +753,7 @@ void change_start_page(void) { set_preference("startpage", bstr("startpage")); - output_headers(3); + output_headers(1, 1, 0, 0, 0, 0, 0); do_template("newstartpage"); wDumpContent(1); } @@ -1274,15 +1281,15 @@ void session_loop(struct httprequest *req) } else if (!strcasecmp(action, "save_inetconf")) { save_inetconf(); } else if (!strcasecmp(action, "diagnostics")) { - output_headers(1); + output_headers(1, 1, 1, 0, 0, 0, 0); - wprintf("You're in session %d
    \n", WC->wc_session); - wprintf("Command:
    \n");
    +		wprintf("You're in session %d
    \n", WC->wc_session); + wprintf("Command:
    \n");
     		escputs(cmd);
    -		wprintf("

    \n"); - wprintf("Variables:
    \n");
    +		wprintf("

    \n"); + wprintf("Variables:
    \n");
     		dump_vars();
    -		wprintf("

    \n"); + wprintf("

    \n"); wDumpContent(1); } /* When all else fais, display the main menu. */ diff --git a/webcit/webcit.h b/webcit/webcit.h index f3a1e1a85..5584880af 100644 --- a/webcit/webcit.h +++ b/webcit/webcit.h @@ -57,18 +57,18 @@ * * bucket one... */ -#define QR_PERMANENT 1 /* Room does not purge */ +#define QR_PERMANENT 1 /* Room does not purge */ #define QR_INUSE 2 /* Set if in use, clear if avail */ #define QR_PRIVATE 4 /* Set for any type of private room */ #define QR_PASSWORDED 8 /* Set if there's a password too */ #define QR_GUESSNAME 16 /* Set if it's a guessname room */ -#define QR_DIRECTORY 32 /* Directory room */ -#define QR_UPLOAD 64 /* Allowed to upload */ -#define QR_DOWNLOAD 128 /* Allowed to download */ -#define QR_VISDIR 256 /* Visible directory */ -#define QR_ANONONLY 512 /* Anonymous-Only room */ -#define QR_ANONOPT 1024 /* Anonymous-Option room */ -#define QR_NETWORK 2048 /* Shared network room */ +#define QR_DIRECTORY 32 /* Directory room */ +#define QR_UPLOAD 64 /* Allowed to upload */ +#define QR_DOWNLOAD 128 /* Allowed to download */ +#define QR_VISDIR 256 /* Visible directory */ +#define QR_ANONONLY 512 /* Anonymous-Only room */ +#define QR_ANONOPT 1024 /* Anonymous-Option room */ +#define QR_NETWORK 2048 /* Shared network room */ #define QR_PREFONLY 4096 /* Preferred status needed to enter */ #define QR_READONLY 8192 /* Aide status required to post */ #define QR_MAILBOX 16384 /* Set if this is a private mailbox */ @@ -80,10 +80,10 @@ #define QR2_SELFLIST 2 /* Self-service mailing list mgmt */ -#define UA_KNOWN 2 -#define UA_GOTOALLOWED 4 -#define UA_HASNEWMSGS 8 -#define UA_ZAPPED 16 +#define UA_KNOWN 2 +#define UA_GOTOALLOWED 4 +#define UA_HASNEWMSGS 8 +#define UA_ZAPPED 16 @@ -176,7 +176,7 @@ struct wc_attachment { * HTTP transactions are bound to one at a time. */ struct wcsession { - struct wcsession *next; /* Linked list */ + struct wcsession *next; /* Linked list */ int wc_session; /* WebCit session ID */ char wc_username[SIZ]; char wc_password[SIZ]; @@ -204,13 +204,12 @@ struct wcsession { int need_regi; /* This user needs to register. */ int need_vali; /* New users require validation. */ char cs_inet_email[SIZ]; /* User's preferred Internet addr. */ - pthread_mutex_t SessionMutex; /* mutex for exclusive access */ - time_t lastreq; /* Timestamp of most recent HTTP */ + pthread_mutex_t SessionMutex; /* mutex for exclusive access */ + time_t lastreq; /* Timestamp of most recent HTTP */ int killthis; /* Nonzero == purge this session */ struct march *march; /* march mode room list */ char reply_to[SIZ]; /* reply-to address */ long msgarr[4096]; /* for read operations */ - int fake_frames; int is_wap; /* Client is a WAP gateway */ struct urlcontent *urlstrings; int HaveExpressMessages; /* Nonzero if incoming msgs exist */ @@ -227,8 +226,6 @@ struct wcsession { #endif struct wc_attachment *first_attachment; char ImportantMessage[SIZ]; - int outside_frameset_allowed; /* nonzero if current req is allowed - * outside of the main frameset */ char last_chat_user[SIZ]; int ctdl_pid; /* Session ID on the Citadel server */ }; @@ -283,7 +280,13 @@ void urlesc(char *, char *); void urlescputs(char *); void jsesc(char *, char *); void jsescputs(char *); -void output_headers(int); +void output_headers( int do_httpheaders, + int do_htmlhead, + int do_room_banner, + int unset_cookies, + int refresh30, + int suppress_check, + int cache); void wprintf(const char *format,...); void output_static(char *what); void stresc(char *target, char *strbuf, int nbsp, int nolinebreaks); @@ -328,7 +331,7 @@ void display_whok(void); void server_to_text(void); void save_edit(char *description, char *enter_cmd, int regoto); void display_edit(char *description, char *check_cmd, - char *read_cmd, char *save_cmd, int headers_type); + char *read_cmd, char *save_cmd, int with_room_banner); void gotoroom(char *gname); void confirm_delete_room(void); void delete_room(void); diff --git a/webcit/who.c b/webcit/who.c index 0ccad321f..2bd73bc7f 100644 --- a/webcit/who.c +++ b/webcit/who.c @@ -37,22 +37,25 @@ void whobbs(void) time_t now; int bg = 0; - output_headers(7); + output_headers(1, 1, 2, 0, 1, 0, 0); - wprintf("\n" + "\n" ); + wprintf("
    \n"); wprintf("
    "); wprintf("\""); wprintf(" Users currently on "); escputs(serv_info.serv_humannode); wprintf(""); offer_start_page(); - wprintf("

    \n"); + wprintf("\n"); + wprintf("
    \n" + "
    \n"); do_template("beginbox_nt"); wprintf("
    " @@ -136,7 +139,7 @@ void whobbs(void) wprintf("\n\t"); escputs(room); if (strlen(realroom) > 0) { - wprintf("
    "); + wprintf("
    "); escputs(realroom); wprintf(""); } @@ -145,7 +148,7 @@ void whobbs(void) /* hostname */ escputs(host); if (strlen(realhost) > 0) { - wprintf("
    "); + wprintf("
    "); escputs(realhost); wprintf(""); } @@ -156,7 +159,7 @@ void whobbs(void) "Click on a name to read user info. Click on " "\"(p)\" to send " - "a page (instant message) to that user.
    \n"); + "a page (instant message) to that user.
    \n"); do_template("endbox"); wDumpContent(1); } @@ -195,18 +198,21 @@ void edit_me(void) http_redirect("/whobbs"); } else { - output_headers(3); + output_headers(1, 1, 0, 0, 0, 0, 0); + wprintf("
    \n"); wprintf("
    "); wprintf(""); wprintf("Edit your session display"); wprintf("
    \n"); + wprintf("
    \n
    \n"); + wprintf("This screen allows you to change the way your\n"); wprintf("session appears in the 'Who is online' listing.\n"); wprintf("To turn off any 'fake' name you've previously\n"); wprintf("set, simply click the appropriate 'change' button\n"); wprintf("without typing anything in the corresponding box.\n"); - wprintf("
    \n"); + wprintf("
    \n"); wprintf("
    \n");