From 0bd8b7d65d7d320ac05f6c2c7d751fc30b68299f Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Thu, 15 Aug 2002 03:49:47 +0000 Subject: [PATCH] * Fleshed out the list subscription page a bit --- webcit/ChangeLog | 4 +++ webcit/listsub.c | 77 ++++++++++++++++++++++++++++++++++++++++-------- 2 files changed, 68 insertions(+), 13 deletions(-) diff --git a/webcit/ChangeLog b/webcit/ChangeLog index bca847901..b779ed599 100644 --- a/webcit/ChangeLog +++ b/webcit/ChangeLog @@ -1,4 +1,7 @@ $Log$ +Revision 323.57 2002/08/15 03:49:47 ajc +* Fleshed out the list subscription page a bit + Revision 323.56 2002/08/13 19:55:12 ajc * Keep track of the HTTP "Host:" header being sent by the browser. (We're going to need this in the near future) @@ -894,3 +897,4 @@ Sun Dec 6 19:50:55 EST 1998 Art Cancro 1998-12-03 Nathan Bryant * webserver.c: warning fix + diff --git a/webcit/listsub.c b/webcit/listsub.c index 2ff32b762..f26625ddb 100644 --- a/webcit/listsub.c +++ b/webcit/listsub.c @@ -32,6 +32,8 @@ void do_listsub(void) char email[SIZ]; char subtype[SIZ]; + char buf[SIZ]; + strcpy(WC->wc_username, ""); strcpy(WC->wc_password, ""); strcpy(WC->wc_roomname, ""); @@ -44,36 +46,85 @@ void do_listsub(void) strcpy(email, bstr("email")); strcpy(subtype, bstr("subtype")); + wprintf("
" + "
" + "List subscribe/unsubscribe\n" + "

\n" + ); + /* * Subscribe command */ - if (!strcasecmp(cmd, "xx")) { + if (!strcasecmp(cmd, "subscribe")) { + serv_printf("SUBS subscribe|%s|%s|digest|%s/listsub", + room, + email, + WC->http_host + ); + serv_gets(buf); + if (buf[0] == '2') { + wprintf("

Confirmation request sent

" + "You are subscribing "); + escputs(email); + wprintf(" to the ""); + escputs(room); + wprintf("" 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.

" + "Please click on the link which is being " + "e-mailed to you and your subscription will " + "be confirmed.
\n" + ); + } + else { + wprintf("ERROR: %s

\n", + &buf[4]); + goto FORM; + } } /* * Any other (invalid) command causes the form to be displayed */ else { - wprintf("
" - "
" - "List subscribe/unsubscribe\n" - "

\n" +FORM: wprintf("
\n" + "\n" ); - wprintf("
\n" - "\n" + wprintf("\n"); - wprintf("" - "\n" + wprintf("\n"); wprintf("
Name of list" + "
Name of listxx
Your e-mail address" + "
" - "\n" - "
\n" + "\n" + "\n" + "\n" ); + + wprintf("
When you attempt to subscribe or unsubscribe to " + "a mailing list, you will receive an e-mail containing" + " one additional web link to click on for final " + "confirmation. This extra step is for your " + "protection, as it prevents others from being able to " + "subscribe or unsubscribe you to lists.
\n" + ); + } /* -- 2.30.2