From 855a4223aae0abbc91155b27fab82808635ddb06 Mon Sep 17 00:00:00 2001 From: Ceri Davies <ceri@FreeBSD.org> Date: Mon, 1 Apr 2002 13:39:05 +0000 Subject: [PATCH] - Stop asking people to enter their postal address when we do nothing with it - Offer to subscribe people to -announce and -security-notifications instead Approved by: murray PR: docs/35563 --- en/cgi/reg.cgi | 106 +++++++++++++++++++++++++---------------------- en/register.sgml | 90 +++++++--------------------------------- 2 files changed, 71 insertions(+), 125 deletions(-) diff --git a/en/cgi/reg.cgi b/en/cgi/reg.cgi index 93064cc8c0..3e8fe5724c 100755 --- a/en/cgi/reg.cgi +++ b/en/cgi/reg.cgi @@ -2,7 +2,10 @@ # # Perl program to send mail. # -# $FreeBSD$ +# $FreeBSD: www/en/cgi/reg.cgi,v 1.7 2000/04/03 08:45:51 phantom Exp $ + +sub do_header; +sub close_body; $mailprog = '/usr/sbin/sendmail'; @@ -45,63 +48,66 @@ format MAIL = $value . -# Open the mail file and write to it -open (MAIL, "|$mailprog $recipient") || die "$mailprog not available.\n"; -print MAIL "From: $FORM{'emaila'}\n"; -print MAIL "Subject: FreeBSD Registration from $FORM{'emaila'}\n\n"; - -print MAIL "<entry>\n"; -print MAIL "<first>$FORM{'First'}</first>\n"; -print MAIL "<last>$FORM{'Last'}</last>\n"; -print MAIL "<email>$FORM{'emaila'}</email>\n"; -print MAIL "<address>$FORM{'Address'}</address>\n"; -print MAIL "<city>$FORM{'City'}</city>\n"; -print MAIL "<state>$FORM{'State'}</state>\n"; -print MAIL "<zip>$FORM{'Zip'}</zip>\n"; -print MAIL "<options commerce_email=$FORM{'commerce_email'}"; -print MAIL " announce=$FORM{'announce'} newsletter=$FORM{'newsletter'}>"; -print MAIL " </options>\n"; -print MAIL "<version>$FORM{'version'}</version>\n"; -print MAIL "</entry>\n"; -print MAIL "\n"; -close (MAIL); +my ($sub_announce, $sub_security, $unsub_announce, $unsub_security) = (); +$sub_announce = 1 if $FORM{"announce"} eq "yes"; +$unsub_announce = 1 if $FORM{"announce"} eq "no"; +$sub_security = 1 if $FORM{"security-notifications"} eq "yes"; +$unsub_security = 1 if $FORM{"security-notifications"} eq "no"; # Open the mail file and write to it # if user is subscribing to maillist -if ($FORM{"announce"} eq "yes") { +# which they should be, otherwise why did they hit submit ? +if ( $sub_announce || $sub_security || $unsub_announce || $unsub_security ) { open (MAIL, "|$mailprog $sub_recipient") || die "$mailprog not available.\n"; print MAIL "From: $FORM{'emaila'}\n"; -print MAIL "Subject: subscribe freebsd-announce $FORM{'emaila'}\n\n"; +print MAIL "Subject: \n\n"; -print MAIL "subscribe freebsd-announce $FORM{'emaila'}\n"; +$sub_announce and print MAIL "subscribe freebsd-announce $FORM{'emaila'}\n"; +$unsub_announce and print MAIL "unsubscribe freebsd-announce $FORM{'emaila'}\n"; +$sub_security and print MAIL "subscribe freebsd-security-notifications $FORM{'emaila'}\n"; +$unsub_security and print MAIL "unsubscribe freebsd-security-notifications $FORM{'emaila'}\n"; close (MAIL); +} else { + &do_header("No action"); + print "<P>No action chosen, hence no action taken.</p>"; + &close_body; + exit; } -print "<HTML>\n"; -print "<HEAD>\n"; -print "<TITLE>Mail Sent</TITLE>\n"; -print "</HEAD>\n"; -print "<BODY BGCOLOR=\"\#FFFFFF\" TEXT=\"\#660000\">\n"; -print "<FONT SIZE=4> \n"; -print "<CENTER>\n"; -print "<IMG SRC=\"..\/gifs\/bar.gif\" BORDER=0 USEMAP=\"\#bar\">\n"; -print "<MAP NAME=\"bar\">\n"; -print "<AREA SHAPE=\"RECT\" COORDS=\"1,1,111,31\" HREF=\"../index.html\">\n"; -print "<AREA SHAPE=\"RECT\" COORDS=\"112,11,196,31\" HREF=\"../ports/index.html\">\n"; -print "<AREA SHAPE=\"RECT\" COORDS=\"196,12,257,33\" HREF=\"../support.html\">\n"; -print "<AREA SHAPE=\"RECT\" COORDS=\"256,12,365,33\" HREF=\"../docs.html\">\n"; -print "<AREA SHAPE=\"RECT\" COORDS=\"366,13,424,32\" HREF=\"../commercial.html\">\n"; -print "<AREA SHAPE=\"RECT\" COORDS=\"425,16,475,32\" HREF=\"../search/search.html\">\n"; -print "<AREA SHAPE=\"RECT\" COORDS=\"477,16,516,33\" HREF=\"../search/index-site.html\">\n"; -print "<AREA SHAPE=\"RECT\" COORDS=\"516,15,562,33\" HREF=\"../index.html\">\n"; -print "<AREA SHAPE=\"RECT\" COORDS=\"0,0,564,32\" HREF=\"../index.html\">\n"; -print "</MAP>\n"; -print "<P>Thank you, $FORM{'First'} $FORM{'Last'}, for your registration.\n"; -print "<BR>It has been submitted.\n"; -if ($FORM{"announce"} eq "yes") { -print "<BR>As you requested, you have also been subscribed to announce\@FreeBSD.org.\n"; -} -print "</CENTER>\n"; -print "</BODY>\n"; +&do_header("Subscription processed"); +print "<P>Thank you, $FORM{'emaila'}, for your submission.\n"; +print "<BR>The request will need to be authenticated; check your mailbox "; +print "for instructions on how to do this.\n"; +&close_body; + +sub do_header { + my $title = @_; + print "<HTML>\n"; + print "<HEAD>\n"; + print "<TITLE>$title</TITLE>\n"; + print "</HEAD>\n"; + print "<BODY BGCOLOR=\"\#FFFFFF\" TEXT=\"\#660000\">\n"; + print "<FONT SIZE=4> \n"; + print "<CENTER>\n"; + print "<IMG SRC=\"..\/gifs\/bar.gif\" BORDER=0 USEMAP=\"\#bar\">\n"; + print "<MAP NAME=\"bar\">\n"; + print "<AREA SHAPE=\"RECT\" COORDS=\"1,1,111,31\" HREF=\"../index.html\">\n"; + print "<AREA SHAPE=\"RECT\" COORDS=\"112,11,196,31\" HREF=\"../ports/index.html\">\n"; + print "<AREA SHAPE=\"RECT\" COORDS=\"196,12,257,33\" HREF=\"../support.html\">\n"; + print "<AREA SHAPE=\"RECT\" COORDS=\"256,12,365,33\" HREF=\"../docs.html\">\n"; + print "<AREA SHAPE=\"RECT\" COORDS=\"366,13,424,32\" HREF=\"../commercial.html\">\n"; + print "<AREA SHAPE=\"RECT\" COORDS=\"425,16,475,32\" HREF=\"../search/search.html\">\n"; + print "<AREA SHAPE=\"RECT\" COORDS=\"477,16,516,33\" HREF=\"../search/index-site.html\">\n"; + print "<AREA SHAPE=\"RECT\" COORDS=\"516,15,562,33\" HREF=\"../index.html\">\n"; + print "<AREA SHAPE=\"RECT\" COORDS=\"0,0,564,32\" HREF=\"../index.html\">\n"; + print "</MAP>\n"; +} + +sub close_body { + print "</CENTER>\n"; + print "</BODY>\n"; + print "</HTML>\n"; +} 1; + diff --git a/en/register.sgml b/en/register.sgml index a5d358d0f6..a2e448882f 100644 --- a/en/register.sgml +++ b/en/register.sgml @@ -1,5 +1,5 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" [ -<!ENTITY date "$FreeBSD: www/en/register.sgml,v 1.18 2001/07/13 12:52:11 dd Exp $"> +<!ENTITY date "$FreeBSD: www/en/register.sgml,v 1.19 2002/03/16 08:17:58 murray Exp $"> <!ENTITY title "Register"> <!ENTITY % includes SYSTEM "includes.sgml"> %includes; ]> @@ -7,89 +7,36 @@ <html> &header; - <center><font size="4">Register to receive the FreeBSD Newsletter and - subscribe to the announce@FreeBSD.org mailing list.</font></center> + <center><font size="4">Subscribe to the announce@FreeBSD.org and + security-announce@FreeBSD.org mailing lists.</font></center> <form action="http://www.FreeBSD.org/cgi/reg.cgi" method="post"> - <input type="hidden" name="recipient" value="register@FreeBSD.org"><br> + <input type="hidden" name="recipient" value="majordomo@FreeBSD.org"><br> <input type="hidden" name="version" value="Web-Registration"> <center> - <table width="95%" border="0"> - - <tr valign="top"> - <td>First Name: </td> - - <td colspan="3" align="left"><input type="text" name="First" - size="30"></td> - </tr> - - <tr valign="top"> - <td align="left">Last Name: </td> - - <td colspan="3" align="left"><input type="text" name="Last" - size="30"></td> - </tr> - + <table width="75%" border="0"> <tr> <td>Email Address: </td> - <td colspan="3" align="left"><input type="text" name="emaila" + <td align="left"><input type="text" name="emaila" size="30"></td> </tr> - <tr valign="top"> - <td align="left">Address: </td> - - <td colspan="3" align="left"><input type="text" name="Address" - size="30"></td> - </tr> - - <tr valign="top"> - <td align="left">City: </td> - - <td colspan="3" align="left"><input type="text" name="City" - size="30"></td> - </tr> - - <tr valign="top"> - <td align="left">Country/U.S. State: </td> - - <td align="left"><input type="text" name="State" size="10"></td> - - <td align="left">Country/Zip Code: </td> - - <td align="left"><input type="text" name="Zip" size="12"></td> - </tr> - <tr> - <td></td> - </tr> - - <tr> - <td colspan="4">Do you wish to receive FreeBSD related - commercial email? - - <input type="checkbox" name="commerce_email" value="yes"></td> + <td>Options for the + announce@FreeBSD.org mailing list: </td> + + <td><input type="radio" name="announce" value="yes"> Subscribe<br> + <input type="radio" name="announce" value="no"> Unsubscribe</td> </tr> <tr> - <td colspan="4">Subscribe listed email address to the - announce@FreeBSD.org mailing list? + <td>Options for the + security-notifications@FreeBSD.org mailing list: </td> - <input type="checkbox" name="announce" value="yes"></td> - </tr> - - <tr> - <td colspan="4">Sign up for FreeBSD Newsletter? - - <select name="newsletter" size="1"> - <option>Postal Copy</option> - <option>E-mail</option> - <option>No Thanks</option> - <option></option> - </select> - </td> + <td><input type="radio" name="security-notifications" value="yes"> Subscribe<br> + <input type="radio" name="security-notications" value="no"> Unsubscribe</td> </tr> </table> @@ -98,13 +45,6 @@ </center> </form> - <p>Preview a copy of the newsletter in <a - href="ftp://ftp.FreeBSD.org/pub/FreeBSD/doc/newsletter/issue2.pdf">Adobe - PDF format</a>. A <a - href="ftp://ftp.FreeBSD.org/pub/FreeBSD/doc/newsletter/README.TXT">help - file</a> is available to assist you in selecting and using a PDF - viewer.</p> - &footer; </body> </html>