]> code.citadel.org Git - citadel.git/blobdiff - webcit/listsub.c
* Added missing HTTP headers for /listsub
[citadel.git] / webcit / listsub.c
index cbcf5af772d762a18a4e19405e5816b10c7051c2..28300597317bd9501d49ee207622154f8aaddc2d 100644 (file)
@@ -30,7 +30,14 @@ void do_listsub(void)
        strcpy(WC->wc_password, "");
        strcpy(WC->wc_roomname, "");
 
-       wprintf("<HTML><HEAD><TITLE>");
+       output_headers(1, 0, 0, 1, 1, 0);
+       begin_burst();
+
+       wprintf("<HTML><HEAD>\n"
+               "<meta name=\"MSSmartTagsPreventParsing\" content=\"TRUE\" />\n"
+               "<link href=\"static/webcit.css\" rel=\"stylesheet\" type=\"text/css\">\n"
+               "<TITLE>\n"
+       );
        wprintf(_("List subscription"));
        wprintf("</TITLE></HEAD><BODY>\n");
 
@@ -50,10 +57,11 @@ void do_listsub(void)
         * Subscribe command
         */
        if (!strcasecmp(cmd, "subscribe")) {
-               serv_printf("SUBS subscribe|%s|%s|%s|%s/listsub",
+               serv_printf("SUBS subscribe|%s|%s|%s|%s://%s/listsub",
                        room,
                        email,
                        subtype,
+                       (is_https ? "https" : "http"),
                        WC->http_host
                );
                serv_getln(buf, sizeof buf);
@@ -77,7 +85,7 @@ void do_listsub(void)
                                "e-mailed to you and your subscription will "
                                "be confirmed.<br />\n"),
                                escaped_email, escaped_room);
-                       wprintf("<A HREF=\"/listsub\">%s</A></CENTER>\n", _("Go back..."));
+                       wprintf("<a href=\"listsub\">%s</A></CENTER>\n", _("Go back..."));
                }
                else {
                        wprintf("<FONT SIZE=+1><B>ERROR: %s</B>"
@@ -91,9 +99,10 @@ void do_listsub(void)
         * Unsubscribe command
         */
        else if (!strcasecmp(cmd, "unsubscribe")) {
-               serv_printf("SUBS unsubscribe|%s|%s|%s/listsub",
+               serv_printf("SUBS unsubscribe|%s|%s|%s://%s/listsub",
                        room,
                        email,
+                       (is_https ? "https" : "http"),
                        WC->http_host
                );
                serv_getln(buf, sizeof buf);
@@ -113,7 +122,7 @@ void do_listsub(void)
                                "Please click on the link which is being "
                                "e-mailed to you and your unsubscription will "
                                "be confirmed.<br />\n"
-                               "<A HREF=\"/listsub\">Back...</A></CENTER>\n"
+                               "<a href=\"listsub\">Back...</A></CENTER>\n"
                        );
                }
                else {
@@ -156,7 +165,7 @@ void do_listsub(void)
         * Any other (invalid) command causes the form to be displayed
         */
        else {
-FORM:          wprintf("<FORM METHOD=\"POST\" ACTION=\"/listsub\">\n"
+FORM:          wprintf("<FORM METHOD=\"POST\" action=\"listsub\">\n"
                        "<TABLE BORDER=0>\n"
                );
 
@@ -212,11 +221,7 @@ FORM:              wprintf("<FORM METHOD=\"POST\" ACTION=\"/listsub\">\n"
 
        }
 
-       /*
-        * Since this isn't part of a normal Citadel session, we bail right
-        * out without maintaining any state.
-        */
-       /* wDumpContent(2); */
        wprintf("</BODY></HTML>\n");
+       wDumpContent(0);
        end_webcit_session();
 }