]> code.citadel.org Git - citadel.git/commitdiff
* Correct generated window name in pop up pages
authorArt Cancro <ajc@citadel.org>
Wed, 27 Jun 2001 06:16:02 +0000 (06:16 +0000)
committerArt Cancro <ajc@citadel.org>
Wed, 27 Jun 2001 06:16:02 +0000 (06:16 +0000)
* Added handling of MIME inline images (not tested)

webcit/ChangeLog
webcit/auth.c
webcit/messages.c
webcit/webcit.c

index 71a561ed98d89726a9fee25f35d149fc7387bf3c..192de5aae433a480ca45fb9bd2a59201cf4629e6 100644 (file)
@@ -1,4 +1,8 @@
 $Log$
+Revision 213.24  2001/06/27 06:16:01  ajc
+* Correct generated window name in pop up pages
+* Added handling of MIME inline images (not tested)
+
 Revision 213.23  2001/06/22 17:58:20  ajc
 * A few performance and tuning cleanups.  Increased the size of the socket
   queue length to 100 for use on big systems.  Also, during startup, the
@@ -582,4 +586,3 @@ 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 31f258871110bc192ade82ca55ad757648a0b822..c7ab697b1c8d0f4cfbf77ec945daaf08a156e40e 100644 (file)
@@ -365,7 +365,7 @@ void register_user(void)
        if (atoi(bstr("during_login"))) {
                do_welcome();
        } else {
-               display_error("Registration information has been saved.");
+               display_success("Registration information has been saved.");
        }
 }
 
index ebb9e8ffca125c531e255748abcf5cdf65f45752..f2f5c1f838c0a826cdee2f2523308313b8788954 100644 (file)
@@ -171,7 +171,6 @@ void read_message(long msgnum, int is_summary) {
                        mime_length = extract_int(&buf[5], 5);
 
                        if (!strcasecmp(mime_disposition, "attachment")) {
-
                                if (mime_http == NULL) {
                                        mime_http = malloc(512);
                                        strcpy(mime_http, "");
@@ -180,7 +179,6 @@ void read_message(long msgnum, int is_summary) {
                                        mime_http = realloc(mime_http,
                                                strlen(mime_http) + 512);
                                }
-       
                                sprintf(&mime_http[strlen(mime_http)],
                                        "<A HREF=\"/output_mimepart?"
                                        "msgnum=%ld&partnum=%s\" "
@@ -193,6 +191,23 @@ void read_message(long msgnum, int is_summary) {
                                        mime_partnum, mime_filename,
                                        mime_content_type, mime_length);
                        }
+
+                       if ((!strcasecmp(mime_disposition, "inline"))
+                          && (!strncasecmp(mime_content_type, "image/", 6)) ){
+                               if (mime_http == NULL) {
+                                       mime_http = malloc(512);
+                                       strcpy(mime_http, "");
+                               }
+                               else {
+                                       mime_http = realloc(mime_http,
+                                               strlen(mime_http) + 512);
+                               }
+                               sprintf(&mime_http[strlen(mime_http)],
+                                       "<IMG SRC=\"/output_mimepart?"
+                                       "msgnum=%ld&partnum=%s\">",
+                                       msgnum, mime_partnum);
+                       }
+
                }
 
        }
index 6ee8e0847eba18b9e7285bdd0a9e76d39e181200..a957af4ae8dbcddc95d06ee284497e91ab4a0802 100644 (file)
@@ -328,17 +328,18 @@ void output_headers(int controlcode)
                        "<META HTTP-EQUIV=\"refresh\" CONTENT=\"30\">\n");
                wprintf("</HEAD>\n");
 
-               /* script for checking for express msgs (not always launch) */
+               /* script for checking for pages (not always launched) */
                wprintf("<SCRIPT LANGUAGE=\"JavaScript\">\n");
                wprintf("function launch_page_popup() {\n");
-               wprintf("pwin = window.open('/page_popup', 'CitaPage%d', 'toolbar=no,location=no,copyhistory=no,status=no,scrollbars=yes,resizable=no,height=150,width=400');\n");
+               wprintf("pwin = window.open('/page_popup', 'CitaPage%d', "
+                       "'toolbar=no,location=no,copyhistory=no,status=no,"
+                       "scrollbars=yes,resizable=no,height=150,width=400');\n",
+                       ++pageseq);
                wprintf("}\n");
-               wprintf("</SCRIPT>\n", ++pageseq);
+               wprintf("</SCRIPT>\n");
                /* end script */
 
-               /* JavaScript keyboard-based navigation would go here if it
-                * were finished
-                */
+               /* (JavaScript keyboard-based navigation would go here) */
 
                if (!suppress_check) if (WC->HaveExpressMessages) {
                        svprintf("extrabodyparms", WCS_STRING, "%s",