- char cmd[256];
- char room[256];
- char token[256];
- char email[256];
- char subtype[256];
- char escaped_email[256];
- char escaped_room[256];
-
- char buf[SIZ];
- int self;
- char sroom[SIZ];
-
- strcpy(WC->wc_fullname, "");
- strcpy(WC->wc_username, "");
- strcpy(WC->wc_password, "");
- strcpy(WC->wc_roomname, "");
-
- 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");
-
- strcpy(cmd, bstr("cmd"));
- strcpy(room, bstr("room"));
- strcpy(token, bstr("token"));
- strcpy(email, bstr("email"));
- strcpy(subtype, bstr("subtype"));
-
- wprintf("<div align=center>");
- wprintf("<table border=0 width=75%%><tr><td>");
-
- svprintf("BOXTITLE", WCS_STRING, _("List subscribe/unsubscribe"));
- do_template("beginbox");
- wprintf("<div align=center><br>");
-
- /*
- * Subscribe command
- */
- if (!strcasecmp(cmd, "subscribe")) {
- 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);
- if (buf[0] == '2') {
- stresc(escaped_email, 256, email, 0, 0);
- stresc(escaped_room, 256, room, 0, 0);
-
- wprintf("<CENTER><H1>");
- wprintf(_("Confirmation request sent"));
- wprintf("</H1>");
- wprintf(_("You are subscribing <TT>%s"
- "</TT> to the <b>%s</b> mailing list. "
- "The listserver has "
- "sent you an e-mail with one additional "
- "Web link for you to click on to confirm "
- "your subscription. This extra step is for "
- "your protection, as it prevents others from "
- "being able to subscribe you to lists "
- "without your consent.<br /><br />"
- "Please click on the link which is being "
- "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..."));
- }
- else {
- wprintf("<FONT SIZE=+1><B>ERROR: %s</B>"
- "</FONT><br /><br />\n",
- &buf[4]);
- goto FORM;
- }