* Fixed an HTTP output error for static data which was causing images
authorArt Cancro <ajc@citadel.org>
Tue, 15 Feb 2005 05:20:45 +0000 (05:20 +0000)
committerArt Cancro <ajc@citadel.org>
Tue, 15 Feb 2005 05:20:45 +0000 (05:20 +0000)
  to display improperly in Konqueror
* Changed most of the beginbox_nt boxes to centered tables with 99%
  width, to avoid the mysterious horizontal scrollbar

webcit/ChangeLog
webcit/calendar.c
webcit/calendar_view.c
webcit/event.c
webcit/iconbar.c
webcit/siteconfig.c
webcit/useredit.c
webcit/vcard_edit.c
webcit/webcit.c
webcit/webcit.h

index 325d4952d0ed693814cd30647cf1936f0c9f5bc5..8ed520c491c67897ce4b42ad3a0002b7e06c36c6 100644 (file)
@@ -1,4 +1,10 @@
 $Log$
+Revision 601.3  2005/02/15 05:20:44  ajc
+* Fixed an HTTP output error for static data which was causing images
+  to display improperly in Konqueror
+* Changed most of the beginbox_nt boxes to centered tables with 99%
+  width, to avoid the mysterious horizontal scrollbar
+
 Revision 601.2  2005/02/14 04:57:23  ajc
 * Started changing some of the top-level tables from 100% width to 99%
   width in order to keep the b0rken CSS box-model from displaying a
@@ -2349,3 +2355,4 @@ Sun Dec  6 19:50:55 EST 1998 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
 
 1998-12-03 Nathan Bryant <bryant@cs.usm.maine.edu>
        * webserver.c: warning fix
+
index 46e00bdadc99751c59ac873a4a46a3f446a63380..3702758604a990db85ca34d349165a7f25c5fb4b 100644 (file)
@@ -528,9 +528,9 @@ void display_edit_individual_task(icalcomponent *supplied_vtodo, long msgnum) {
                "</TD></TR></TABLE>\n"
                "</div>\n<div id=\"content\">\n"
        );
-       
-       do_template("beginbox_nt");
 
+       wprintf("<center><table border=0 width=99%% bgcolor=\"#ffffff\"><tr><td>");
+       
        wprintf("<FORM METHOD=\"POST\" ACTION=\"/save_task\">\n");
        wprintf("<INPUT TYPE=\"hidden\" NAME=\"msgnum\" VALUE=\"%ld\">\n",
                msgnum);
@@ -588,7 +588,7 @@ void display_edit_individual_task(icalcomponent *supplied_vtodo, long msgnum) {
 
        wprintf("</FORM>\n");
 
-       do_template("endbox");
+       wprintf("</td></tr></table></center>\n");
        wDumpContent(1);
 
        if (created_new_vtodo) {
index 1dfbf351d1629edac0b5e67aa07f44be110e2bcb..93a7d4059091624fe83107507b50692a720a069f 100644 (file)
@@ -623,9 +623,7 @@ void do_tasks_view(void) {
        char buf[SIZ];
        icalproperty *p;
 
-       do_template("beginbox_nt");
-
-       wprintf("<TABLE BORDER=0 CELLSPACING=0 WIDTH=100%%>\n<TR>\n"
+       wprintf("<center><table border=0 cellspacing=0 width=99%% bgcolor=\"#FFFFFF\">\n<tr>\n"
                "<TH>Name of task</TH>\n"
                "<TH>Date due</TH></TR>\n"
        );
@@ -667,10 +665,7 @@ void do_tasks_view(void) {
                wprintf(">%s</FONT></TD></TR>\n", buf);
        }
 
-       wprintf("</TABLE>\n");
-
-       do_template("endbox");
-
+       wprintf("</table></center>\n");
 
        /* Free the list */
        free_calendar_buffer();
index 819cf6210f5486ce7ea26ac7df7fc9a5e4d1bd9d..832bac7a48b916840001667e104cc8550af62b4f 100644 (file)
@@ -92,7 +92,7 @@ void display_edit_individual_event(icalcomponent *supplied_vevent, long msgnum)
                "</div>\n<div id=\"content\">\n"
        );
 
-       do_template("beginbox_nt");
+       wprintf("<center><table border=0 width=99%% bgcolor=\"#ffffff\"><tr><td>\n");
 
        /************************************************************
         * Uncomment this to see the UID in calendar events for debugging
@@ -401,7 +401,7 @@ void display_edit_individual_event(icalcomponent *supplied_vevent, long msgnum)
                "</script>\n"
        );
 
-       do_template("endbox");
+       wprintf("</td></tr></table></center>\n");
        wDumpContent(1);
 
        if (created_new_vevent) {
index 8c762f857078d20eeaf55052ddcadf3bc63187ad..293e62d440ff6590c848619f736f7119e2dd9e21 100644 (file)
@@ -347,9 +347,15 @@ void display_customize_iconbar(void) {
                if (!strcasecmp(key, "ib_citadel")) ib_citadel = atoi(value);
        }
 
-       output_headers(1, 1, 0, 0, 0, 0, 0);
-       svprintf("BOXTITLE", WCS_STRING, "Customize the icon bar");
-       do_template("beginbox");
+       output_headers(1, 1, 2, 0, 0, 0, 0);
+       wprintf("<div id=\"banner\">\n"
+               "<TABLE WIDTH=100%% BORDER=0 BGCOLOR=\"#444455\"><TR><TD>"
+               "<SPAN CLASS=\"titlebar\">Customize the icon bar</SPAN>"
+               "</TD></TR></TABLE>\n"
+               "</div>\n<div id=\"content\">\n"
+       );
+
+       wprintf("<center><table border=0 width=99%% bgcolor=\"#ffffff\"><tr><td>");
 
        wprintf("<FORM METHOD=\"POST\" ACTION=\"/commit_iconbar\">\n");
 
@@ -548,7 +554,7 @@ void display_customize_iconbar(void) {
                "</CENTER></FORM>\n"
        );
 
-       do_template("endbox");
+       wprintf("</td></tr></table></center>\n");
        wDumpContent(2);
 }
 
@@ -593,13 +599,13 @@ void commit_iconbar(void) {
        set_preference("iconbar", iconbar);
 
        output_headers(1, 1, 0, 0, 0, 0, 0);
-       do_template("beginbox_nt");
        wprintf(
+               "<center><table border=1 bgcolor=\"#ffffff\"><tr><td>"
                "<IMG SRC=\"/static/advanced-icon.gif\">"
                "&nbsp;"
                "Your icon bar has been updated.  Please select any of its "
-               "choices to continue.\n"
+               "choices to continue."
+               "</td></tr></table>\n"
        );
-       do_template("endbox");
        wDumpContent(2);
 }
index 1e3e1479c8ed0012a1457552d3703ed94775bdf2..25bc8bebf71002288daf0e99c59643d20f6f86d2 100644 (file)
@@ -43,12 +43,17 @@ void display_siteconfig(void)
        int mboxpolicy = 0;
        int mboxvalue = 0;
 
-       output_headers(1, 1, 0, 0, 0, 0, 0);
+       output_headers(1, 1, 2, 0, 0, 0, 0);
+       wprintf("<div id=\"banner\">\n"
+               "<TABLE WIDTH=100%% BORDER=0 BGCOLOR=\"#444455\"><TR><TD>"
+               "<SPAN CLASS=\"titlebar\">Site configuration</SPAN>"
+               "</TD></TR></TABLE>\n"
+               "</div>\n<div id=\"content\">\n"
+       );
 
-       whichmenu = bstr("whichmenu");
+       wprintf("<center><table border=0 width=99%% bgcolor=\"#ffffff\"><tr><td>");
 
-       svprintf("BOXTITLE", WCS_STRING, "Site configuration");
-       do_template("beginbox_nt");
+       whichmenu = bstr("whichmenu");
 
        if (!strcmp(whichmenu, "")) {
                wprintf("<TABLE border=0 cellspacing=0 cellpadding=3 width=100%%>\n");
@@ -120,8 +125,7 @@ void display_siteconfig(void)
                );
 
                wprintf("</TABLE>");
-
-               do_template("endbox");
+               wprintf("</td></tr></table></center>\n");
                wDumpContent(1);
                return;
        }
@@ -659,7 +663,7 @@ void display_siteconfig(void)
        wprintf("&nbsp;");
        wprintf("<INPUT TYPE=\"submit\" NAME=\"sc\" VALUE=\"Cancel\">\n");
        wprintf("</CENTER></FORM>\n");
-       do_template("endbox");
+       wprintf("</td></tr></table></center>\n");
        wDumpContent(1);
 }
 
index 38a1d5c2dd98285c869476efa88539a67f6ce103..46fb4d28a4b25711e17cc0cd09edaf00d3635049 100644 (file)
@@ -290,7 +290,7 @@ void display_edituser(char *supplied_username, int is_new) {
        wprintf("</SPAN></TD></TR></TABLE>\n");
        wprintf("</div>\n<div id=\"content\">\n");
 
-       do_template("beginbox_nt");
+       wprintf("<center><table border=0 width=99%% bgcolor=\"#ffffff\"><tr><td>\n");
        wprintf("<FORM METHOD=\"POST\" ACTION=\"/edituser\">\n"
                "<INPUT TYPE=\"hidden\" NAME=\"username\" VALUE=\"");
        escputs(username);
@@ -362,7 +362,7 @@ void display_edituser(char *supplied_username, int is_new) {
                "<br /><br /></FORM>\n");
 
        wprintf("</CENTER>\n");
-       do_template("endbox");
+       wprintf("</td></tr></table></center>\n");
 
        wDumpContent(1);
 
index 9397082a832261e7cf2ef264f641bd9300a42137..f8be5b9a1c95ee813dd55c33feb77c2472b31262 100644 (file)
@@ -77,8 +77,6 @@ void do_edit_vcard(long msgnum, char *partnum, char *return_to) {
        other_inetemail[0] = 0;
        extrafields[0] = 0;
 
-       output_headers(1, 1, 0, 0, 0, 0, 0);
-
        strcpy(whatuser, "");
 
        if (msgnum >= 0) {
@@ -86,7 +84,7 @@ void do_edit_vcard(long msgnum, char *partnum, char *return_to) {
                serv_puts(buf);
                serv_gets(buf);
                if (buf[0] != '1') {
-                       wDumpContent(1);
+                       convenience_page("770000", "Error", &buf[4]);
                        return;
                }
                while (serv_gets(buf), strcmp(buf, "000")) {
@@ -103,7 +101,7 @@ void do_edit_vcard(long msgnum, char *partnum, char *return_to) {
                serv_puts(buf);
                serv_gets(buf);
                if (buf[0] != '2') {
-                       wDumpContent(1);
+                       convenience_page("770000", "Error", &buf[4]);
                        return;
                }
        
@@ -175,12 +173,21 @@ void do_edit_vcard(long msgnum, char *partnum, char *return_to) {
        }
 
        /* Display the form */
-       do_template("beginbox_nt");
-       wprintf("<FORM METHOD=\"POST\" ACTION=\"/submit_vcard\">\n");
-       wprintf("<H2><IMG ALIGN=CENTER SRC=\"/static/vcard.gif\">"
-               "Contact information for ");
+       output_headers(1, 1, 2, 0, 0, 0, 0);
+       wprintf("<div id=\"banner\">\n"
+               "<TABLE WIDTH=100%% BORDER=0 BGCOLOR=\"#444455\"><TR><TD>"
+               "<SPAN CLASS=\"titlebar\">"
+               "<img src=\"/static/vcard.gif\">"
+               "Contact information for "
+       );
        escputs(whatuser);
-       wprintf("</H2>\n");
+       wprintf("</SPAN>"
+               "</TD></TR></TABLE>\n"
+               "</div>\n<div id=\"content\">\n"
+       );
+
+       wprintf("<FORM METHOD=\"POST\" ACTION=\"/submit_vcard\">\n");
+       wprintf("<center><table border=0 width=99%% bgcolor=\"#ffffff\"><tr><td>\n");
 
        wprintf("<TABLE border=0><TR>"
                "<TD>Prefix</TD>"
@@ -269,7 +276,7 @@ void do_edit_vcard(long msgnum, char *partnum, char *return_to) {
                "</CENTER></FORM>\n"
        );
        
-       do_template("endbox");
+       wprintf("</td></tr></table></center>\n");
        wDumpContent(1);
 }
 
index 7fdf3a8a7ec732e3d5cc3c1694dda058ba2fbb1b..b96104fdd56acfd91289d09ccb79f07a7d951f35 100644 (file)
@@ -345,7 +345,7 @@ void output_headers(        int do_httpheaders,     /* 1 = output HTTP headers
 
                        int do_room_banner,     /* 0=no, 1=yes,                                     */
                                                /* 2 = I'm going to embed my own, so don't open the */
-                                               /*     <div id="text"> either.                      */
+                                               /*     <div id="content"> either.                   */
 
                        int unset_cookies,      /* 1 = session is terminating, so unset the cookies */
                        int refresh30,          /* 1 = automatically refresh page every 30 seconds  */
@@ -416,7 +416,7 @@ void output_headers(        int do_httpheaders,     /* 1 = output HTTP headers
                }
        }
 
-       if (do_room_banner != 2) {
+       if (do_room_banner == 1) {
                wprintf("<div id=\"content\">\n");
 
 
index c89f5a59fe132ab67f05c4660b6561cdbef14950..7ebf6266bbf9d35f21cc5b4224af3ec7cb175338 100644 (file)
@@ -410,6 +410,7 @@ int is_msg_in_mset(char *mset, long msgnum);
 char *safestrncpy(char *dest, const char *src, size_t n);
 void display_addressbook(long msgnum, char alpha);
 void offer_start_page(void);
+void convenience_page(char *titlebarcolor, char *titlebarmsg, char *messagetext);
 void change_start_page(void);
 void output_html(void);
 void display_floorconfig(char *);