|
Lines 4-9
Link Here
|
| 4 |
# |
4 |
# |
| 5 |
# $FreeBSD: www/en/cgi/reg.cgi,v 1.7 2000/04/03 08:45:51 phantom Exp $ |
5 |
# $FreeBSD: www/en/cgi/reg.cgi,v 1.7 2000/04/03 08:45:51 phantom Exp $ |
| 6 |
|
6 |
|
|
|
7 |
sub do_header; |
| 8 |
sub close_body; |
| 9 |
|
| 7 |
$mailprog = '/usr/sbin/sendmail'; |
10 |
$mailprog = '/usr/sbin/sendmail'; |
| 8 |
|
11 |
|
| 9 |
print "Content-type: text/html\n\n"; |
12 |
print "Content-type: text/html\n\n"; |
|
Lines 45-107
Link Here
|
| 45 |
$value |
48 |
$value |
| 46 |
. |
49 |
. |
| 47 |
|
50 |
|
| 48 |
# Open the mail file and write to it |
51 |
my ($sub_announce, $sub_security, $unsub_announce, $unsub_security) = (); |
| 49 |
open (MAIL, "|$mailprog $recipient") || die "$mailprog not available.\n"; |
52 |
$sub_announce = 1 if $FORM{"announce"} eq "yes"; |
| 50 |
print MAIL "From: $FORM{'emaila'}\n"; |
53 |
$unsub_announce = 1 if $FORM{"announce"} eq "no"; |
| 51 |
print MAIL "Subject: FreeBSD Registration from $FORM{'emaila'}\n\n"; |
54 |
$sub_security = 1 if $FORM{"security-notifications"} eq "yes"; |
| 52 |
|
55 |
$unsub_security = 1 if $FORM{"security-notifications"} eq "no"; |
| 53 |
print MAIL "<entry>\n"; |
|
|
| 54 |
print MAIL "<first>$FORM{'First'}</first>\n"; |
| 55 |
print MAIL "<last>$FORM{'Last'}</last>\n"; |
| 56 |
print MAIL "<email>$FORM{'emaila'}</email>\n"; |
| 57 |
print MAIL "<address>$FORM{'Address'}</address>\n"; |
| 58 |
print MAIL "<city>$FORM{'City'}</city>\n"; |
| 59 |
print MAIL "<state>$FORM{'State'}</state>\n"; |
| 60 |
print MAIL "<zip>$FORM{'Zip'}</zip>\n"; |
| 61 |
print MAIL "<options commerce_email=$FORM{'commerce_email'}"; |
| 62 |
print MAIL " announce=$FORM{'announce'} newsletter=$FORM{'newsletter'}>"; |
| 63 |
print MAIL " </options>\n"; |
| 64 |
print MAIL "<version>$FORM{'version'}</version>\n"; |
| 65 |
print MAIL "</entry>\n"; |
| 66 |
print MAIL "\n"; |
| 67 |
close (MAIL); |
| 68 |
|
56 |
|
| 69 |
# Open the mail file and write to it |
57 |
# Open the mail file and write to it |
| 70 |
# if user is subscribing to maillist |
58 |
# if user is subscribing to maillist |
| 71 |
if ($FORM{"announce"} eq "yes") { |
59 |
# which they should be, otherwise why did they hit submit ? |
|
|
60 |
if ( $sub_announce || $sub_security || $unsub_announce || $unsub_security ) { |
| 72 |
open (MAIL, "|$mailprog $sub_recipient") || die "$mailprog not available.\n"; |
61 |
open (MAIL, "|$mailprog $sub_recipient") || die "$mailprog not available.\n"; |
| 73 |
print MAIL "From: $FORM{'emaila'}\n"; |
62 |
print MAIL "From: $FORM{'emaila'}\n"; |
| 74 |
print MAIL "Subject: subscribe freebsd-announce $FORM{'emaila'}\n\n"; |
63 |
print MAIL "Subject: \n\n"; |
| 75 |
|
64 |
|
| 76 |
print MAIL "subscribe freebsd-announce $FORM{'emaila'}\n"; |
65 |
$sub_announce and print MAIL "subscribe freebsd-announce $FORM{'emaila'}\n"; |
|
|
66 |
$unsub_announce and print MAIL "unsubscribe freebsd-announce $FORM{'emaila'}\n"; |
| 67 |
$sub_security and print MAIL "subscribe freebsd-security-notifications $FORM{'emaila'}\n"; |
| 68 |
$unsub_security and print MAIL "unsubscribe freebsd-security-notifications $FORM{'emaila'}\n"; |
| 77 |
|
69 |
|
| 78 |
close (MAIL); |
70 |
close (MAIL); |
|
|
71 |
} else { |
| 72 |
&do_header("No action"); |
| 73 |
print "<P>No action chosen, hence no action taken.</p>"; |
| 74 |
&close_body; |
| 75 |
exit; |
| 79 |
} |
76 |
} |
| 80 |
print "<HTML>\n"; |
77 |
|
| 81 |
print "<HEAD>\n"; |
78 |
&do_header("Subscription processed"); |
| 82 |
print "<TITLE>Mail Sent</TITLE>\n"; |
79 |
print "<P>Thank you, $FORM{'emaila'}, for your submission.\n"; |
| 83 |
print "</HEAD>\n"; |
80 |
print "<BR>The request will need to be authenticated; check your mailbox "; |
| 84 |
print "<BODY BGCOLOR=\"\#FFFFFF\" TEXT=\"\#660000\">\n"; |
81 |
print "for instructions on how to do this.\n"; |
| 85 |
print "<FONT SIZE=4> \n"; |
82 |
&close_body; |
| 86 |
print "<CENTER>\n"; |
83 |
|
| 87 |
print "<IMG SRC=\"..\/gifs\/bar.gif\" BORDER=0 USEMAP=\"\#bar\">\n"; |
84 |
sub do_header { |
| 88 |
print "<MAP NAME=\"bar\">\n"; |
85 |
my $title = @_; |
| 89 |
print "<AREA SHAPE=\"RECT\" COORDS=\"1,1,111,31\" HREF=\"../index.html\">\n"; |
86 |
print "<HTML>\n"; |
| 90 |
print "<AREA SHAPE=\"RECT\" COORDS=\"112,11,196,31\" HREF=\"../ports/index.html\">\n"; |
87 |
print "<HEAD>\n"; |
| 91 |
print "<AREA SHAPE=\"RECT\" COORDS=\"196,12,257,33\" HREF=\"../support.html\">\n"; |
88 |
print "<TITLE>$title</TITLE>\n"; |
| 92 |
print "<AREA SHAPE=\"RECT\" COORDS=\"256,12,365,33\" HREF=\"../docs.html\">\n"; |
89 |
print "</HEAD>\n"; |
| 93 |
print "<AREA SHAPE=\"RECT\" COORDS=\"366,13,424,32\" HREF=\"../commercial.html\">\n"; |
90 |
print "<BODY BGCOLOR=\"\#FFFFFF\" TEXT=\"\#660000\">\n"; |
| 94 |
print "<AREA SHAPE=\"RECT\" COORDS=\"425,16,475,32\" HREF=\"../search/search.html\">\n"; |
91 |
print "<FONT SIZE=4> \n"; |
| 95 |
print "<AREA SHAPE=\"RECT\" COORDS=\"477,16,516,33\" HREF=\"../search/index-site.html\">\n"; |
92 |
print "<CENTER>\n"; |
| 96 |
print "<AREA SHAPE=\"RECT\" COORDS=\"516,15,562,33\" HREF=\"../index.html\">\n"; |
93 |
print "<IMG SRC=\"..\/gifs\/bar.gif\" BORDER=0 USEMAP=\"\#bar\">\n"; |
| 97 |
print "<AREA SHAPE=\"RECT\" COORDS=\"0,0,564,32\" HREF=\"../index.html\">\n"; |
94 |
print "<MAP NAME=\"bar\">\n"; |
| 98 |
print "</MAP>\n"; |
95 |
print "<AREA SHAPE=\"RECT\" COORDS=\"1,1,111,31\" HREF=\"../index.html\">\n"; |
| 99 |
print "<P>Thank you, $FORM{'First'} $FORM{'Last'}, for your registration.\n"; |
96 |
print "<AREA SHAPE=\"RECT\" COORDS=\"112,11,196,31\" HREF=\"../ports/index.html\">\n"; |
| 100 |
print "<BR>It has been submitted.\n"; |
97 |
print "<AREA SHAPE=\"RECT\" COORDS=\"196,12,257,33\" HREF=\"../support.html\">\n"; |
| 101 |
if ($FORM{"announce"} eq "yes") { |
98 |
print "<AREA SHAPE=\"RECT\" COORDS=\"256,12,365,33\" HREF=\"../docs.html\">\n"; |
| 102 |
print "<BR>As you requested, you have also been subscribed to announce\@FreeBSD.org.\n"; |
99 |
print "<AREA SHAPE=\"RECT\" COORDS=\"366,13,424,32\" HREF=\"../commercial.html\">\n"; |
|
|
100 |
print "<AREA SHAPE=\"RECT\" COORDS=\"425,16,475,32\" HREF=\"../search/search.html\">\n"; |
| 101 |
print "<AREA SHAPE=\"RECT\" COORDS=\"477,16,516,33\" HREF=\"../search/index-site.html\">\n"; |
| 102 |
print "<AREA SHAPE=\"RECT\" COORDS=\"516,15,562,33\" HREF=\"../index.html\">\n"; |
| 103 |
print "<AREA SHAPE=\"RECT\" COORDS=\"0,0,564,32\" HREF=\"../index.html\">\n"; |
| 104 |
print "</MAP>\n"; |
| 103 |
} |
105 |
} |
| 104 |
print "</CENTER>\n"; |
|
|
| 105 |
print "</BODY>\n"; |
| 106 |
|
106 |
|
|
|
107 |
sub close_body { |
| 108 |
print "</CENTER>\n"; |
| 109 |
print "</BODY>\n"; |
| 110 |
print "</HTML>\n"; |
| 111 |
} |
| 107 |
1; |
112 |
1; |
|
|
113 |
|