diff --git a/cgi-bin/orderpromo.pl b/cgi-bin/orderpromo.pl new file mode 100755 index 0000000000..e70266de9f --- /dev/null +++ b/cgi-bin/orderpromo.pl @@ -0,0 +1,64 @@ +#!/usr/bin/perl + +use CGI; +use POSIX qw(strftime); + +my $query = new CGI; + +my $date = strftime "%Y-%m-%d", localtime; +my $time = strftime "%s", localtime; +my $reference = "order.$date." . substr $time, -5; + +my $firstname = $query->param("firstname"); +my $lastname = $query->param("lastname"); +my $email = $query->param("email"); +my $address = $query->param("address"); +my $specifics = $query->param("specifics"); +my $comment = $query->param("comment"); +my $lang = $query->param("language"); + +if ( + # validate input (more or less) + ($firstname or $lastname) + and $email + and $address + and $specifics + and not $query->param("url") +) { + + #send mail + open(MAIL, "|/usr/lib/sendmail -t -f promoorder\@fsfe.org"); + print MAIL +"From: promoorder\@fsfe.org +To: assist\@fsfe.org +Cc: paul\@fsfe.org +Subject: $reference $firstname $lastname + +Hey, someone ordered promotional material: +First Name: $firstname +Last Name: $lastname +EMail: $email + +Address: +$address + +Specifics of the Order: +$specifics + +Comments: +$comments + +Preferred language was: $lang + +KTHXBYE +Your friendly automatic web order program. +"; + close MAIL; + + print "Location: /order/orderpromo-thanks.$lang.html\n\n"; +} else { + + #something was wrong with the input + print "Location: /order/orderpromo-error.$lang.html\n\n"; + +} diff --git a/look/generic.css b/look/generic.css index e104a54518..120c0d6b50 100644 --- a/look/generic.css +++ b/look/generic.css @@ -465,6 +465,15 @@ p.right { margin: 0 0 .3em; } +#content .highlight { + /* Used in: order/promopack.*.xhtml*/ + border-width: 2px; + border-style: dotted; + border-color: rgb(107,200,0); + background-color: rgb(194,255,128); + padding: .5em; +} + h1, h2, h3 { @@ -649,6 +658,21 @@ p#introduction { text-align: right; } +/* ------------------------------------------------------------------------- */ +/* Promopack order form */ +/* ------------------------------------------------------------------------- */ + +/* Used in: orders/promopack.*.xhtml */ +#orderpromo .formlabel { + font-weight: bold; + display: inline-block; + text-align: right; + vertical-align: top; + width: 30%; +} +#orderpromo textarea { + display: inline-block; +} /* ------------------------------------------------------------------------- */ /* Subpages menu */ diff --git a/order/orderpromo-error.en.xhtml b/order/orderpromo-error.en.xhtml new file mode 100644 index 0000000000..52749f5284 --- /dev/null +++ b/order/orderpromo-error.en.xhtml @@ -0,0 +1,23 @@ + + + + + Free Software Foundation Europe - Ooops, there is something wrong with your input! + + + +

Ooops, there is something wrong with your input!

+ +

+ Please make sure you entered your name, email, address, and the order itself. Comments are optional. +

+ + + + $Date$ $Author$ + + diff --git a/order/orderpromo-thanks.en.xhtml b/order/orderpromo-thanks.en.xhtml new file mode 100644 index 0000000000..2fa329eba6 --- /dev/null +++ b/order/orderpromo-thanks.en.xhtml @@ -0,0 +1,23 @@ + + + + + Free Software Foundation Europe - Thank you for your order! + + + +

Thank you for your order!

+ +

+ Our team will see to it that the promotional material is sent to you. You may receive further questions and querys in this matter via mail. +

+ + + + $Date$ $Author$ + + diff --git a/order/promopack.en.xhtml b/order/promopack.en.xhtml index 7bcb001b02..15d68e43b1 100644 --- a/order/promopack.en.xhtml +++ b/order/promopack.en.xhtml @@ -30,23 +30,37 @@ order our default package or tell us explicitly what kind of promotion material you need or prefer. For example, if you plan to support a special FSFE`s campaign. Please keep in mind, that for postal reasons, in general we just send packages up to 1kg. If you need more, please ask.

- -

*This should be a highlighted box by using a div=class* Our default promotion package consists of:

+
+ + +

Please send promotional material to:

+ First name, Last name: + +
+ Email: +
+ Address: +
+ I would like the promotion package to focus on: +
+ Any comment: +
+ + + +
+
- -

Please be aware that these are rough numbers and they will vary from order to order. They might also vary from your location, as we do have promotion material which is not yet available in English, for example the Flyer "Freiheit!"

- -

*This should be a form to fill out*
- Please send promotion to:
Name, Lastname: [field]
Address: [field]
Email: [field]
I would like to have the default promotion package: Yes | No
Instead of sending me the default package, I would like the promotion package to focus on: [comment field]
Any comment: -[comment field]

- -

Available promotion material

General FSFE and Fellowship material