/*
- * $Id$
- *
* Web forms for handling mailing list subscribe/unsubscribe requests.
+ *
+ * Copyright (c) 1996-2011 by the citadel.org team
+ *
+ * This program is open source software. You can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "webcit.h"
FlushStrBuf(WC->wc_fullname);
FlushStrBuf(WC->wc_username);
FlushStrBuf(WC->wc_password);
- FlushStrBuf(WC->wc_roomname);
+ FlushStrBuf(WC->CurRoom.name);
output_headers(1, 0, 0, 1, 1, 0);
begin_burst();
wc_printf("<HTML><HEAD>\n"
"<meta name=\"MSSmartTagsPreventParsing\" content=\"TRUE\" />\n"
- "<link href=\"static/webcit.css\" rel=\"stylesheet\" type=\"text/css\">\n"
+ "<link href=\"static/styles/webcit.css\" rel=\"stylesheet\" type=\"text/css\">\n"
"<TITLE>\n"
);
wc_printf(_("List subscription"));
wc_printf("<div align=center>");
wc_printf("<table border=0 width=75%%><tr><td>");
- svput("BOXTITLE", WCS_STRING, _("List subscribe/unsubscribe"));
- do_template("beginboxx", NULL);
+ do_template("beginbox_1");
+ StrBufAppendBufPlain(WC->WBuf, _("List subscribe/unsubscribe"), -1, 0);
+ do_template("beginbox_2");
wc_printf("<div align=center><br>");
/*
* Subscribe command
*/
if (!strcasecmp(cmd, "subscribe")) {
- serv_printf("SUBS subscribe|%s|%s|%s|%s://%s/listsub",
+ serv_printf("SUBS subscribe|%s|%s|%s|%s/listsub",
room,
email,
subtype,
- (is_https ? "https" : "http"),
- ChrPtr(WC->Hdr->HR.http_host)
+ ChrPtr(site_prefix)
);
serv_getln(buf, sizeof buf);
if (buf[0] == '2') {
"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 />"
+ "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"),
+ "be confirmed.<br>\n"),
escaped_email, escaped_room);
wc_printf("<a href=\"listsub\">%s</A></CENTER>\n", _("Go back..."));
}
else {
wc_printf("<FONT SIZE=+1><B>ERROR: %s</B>"
- "</FONT><br /><br />\n",
+ "</FONT><br><br>\n",
&buf[4]);
goto FORM;
}
* Unsubscribe command
*/
else if (!strcasecmp(cmd, "unsubscribe")) {
- serv_printf("SUBS unsubscribe|%s|%s|%s://%s/listsub",
- room,
- email,
- (is_https ? "https" : "http"),
- ChrPtr(WC->Hdr->HR.http_host)
+ serv_printf("SUBS unsubscribe|%s|%s|%s/listsub",
+ room,
+ email,
+ ChrPtr(site_prefix)
);
serv_getln(buf, sizeof buf);
if (buf[0] == '2') {
"your unsubscription. This extra step is for "
"your protection, as it prevents others from "
"being able to unsubscribe you from "
- "lists without your consent.<br /><br />"
+ "lists without your consent.<br><br>"
"Please click on the link which is being "
"e-mailed to you and your unsubscription will "
- "be confirmed.<br />\n"
+ "be confirmed.<br>\n"
"<a href=\"listsub\">Back...</A></CENTER>\n"
);
}
else {
wc_printf("<FONT SIZE=+1><B>ERROR: %s</B>"
- "</FONT><br /><br />\n",
+ "</FONT><br><br>\n",
&buf[4]);
goto FORM;
}
"The error returned by the server was: "
);
}
- wc_printf("%s</CENTER><br />\n", &buf[4]);
+ wc_printf("%s</CENTER><br>\n", &buf[4]);
}
/*
" 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.<br />\n"
+ "subscribe or unsubscribe you to lists.<br>\n"
);
}
wc_printf("</div>");
- do_template("endbox", NULL);
+ do_template("endbox");
wc_printf("</td></tr></table></div>");
wc_printf("</BODY></HTML>\n");