Browse Source

adding promo order form to productive branch

svn path=/trunk/; revision=24282
pull/8/head
paul 8 years ago
parent
commit
8effb92583
5 changed files with 163 additions and 15 deletions
  1. +64
    -0
      cgi-bin/orderpromo.pl
  2. +24
    -0
      look/generic.css
  3. +23
    -0
      order/orderpromo-error.en.xhtml
  4. +23
    -0
      order/orderpromo-thanks.en.xhtml
  5. +29
    -15
      order/promopack.en.xhtml

+ 64
- 0
cgi-bin/orderpromo.pl View File

@ -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";
}

+ 24
- 0
look/generic.css View File

@ -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 */


+ 23
- 0
order/orderpromo-error.en.xhtml View File

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8" ?>
<html>
<head>
<title>Free Software Foundation Europe - Ooops, there is something wrong with your input!</title>
</head>
<body>
<h1>Ooops, there is something wrong with your input!</h1>
<p>
Please make sure you entered your name, email, address, and the order itself. Comments are optional.
</p>
</body>
<timestamp>$Date$ $Author$</timestamp>
</html>
<!--
Local Variables: ***
mode: xml ***
End: ***
-->

+ 23
- 0
order/orderpromo-thanks.en.xhtml View File

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8" ?>
<html>
<head>
<title>Free Software Foundation Europe - Thank you for your order!</title>
</head>
<body>
<h1>Thank you for your order!</h1>
<p>
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.
</p>
</body>
<timestamp>$Date$ $Author$</timestamp>
</html>
<!--
Local Variables: ***
mode: xml ***
End: ***
-->

+ 29
- 15
order/promopack.en.xhtml View File

@ -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.</p>
<p><em>*This should be a highlighted box by using a div=class* Our default promotion package consists of:</em></p>
<form class="highlight" id="orderpromo" method="post" action="/cgi-bin/orderpromo.pl" accept-charset="utf-8">
<!-- Translators: please set the value for the language to your language code -->
<input type="hidden" name="language" value="en" />
<h3>Please send promotional material to:</h3>
<span class="formlabel">First name, Last name:</span>
<input type="text" name="firstname" placeholder="First Name" size="20" />
<input type="text" name="lastname" placeholder="Last Name" size="20" /><br/>
<span class="formlabel">Email:</span>
<input type="text" name="email" placeholder="Email" size="40" /><br/>
<span class="formlabel">Address:</span>
<textarea name="address" rows="4" cols="40"></textarea><br/>
<span class="formlabel">I would like the promotion package to focus on:</span>
<textarea name="specifics" rows="6" cols="40">
No focus, just send me the default package, containing:
3 FreeYourAndroid poster
2 Join the Fellowship poster
1 PDFreaders poster
3 cm FreeYourAndroid flyer
20 FSFE folder and Fellowship leaflets (A5)
Some stickers:
"I cannot read your documents", GNU-Sticker, Plussy-Sticker ...
</textarea><br/>
<span class="formlabel">Any comment:</span>
<textarea name="comment" rows="4" cols="40"></textarea><br/>
<input type="submit" name="url" value="I am a spam robot" style="display:none;" />
<!-- Translators: please translate the label of this button (the value field) -->
<input type="submit" name="dothis" value="Order now!"/>
<input type="submit" name="url" value="I am a spam robot" style="display:none;" /><br/>
</form>
<ul>
<li>3 FreeYourAndroid-Poster, 2 Join the Fellowship-Poster, 1 PDFreaders-Poster</li>
<li>3 cm FreeYourAndroid-Flyer</li> [3 cm]
<li>20 FSFE folder and Fellowship leaflets (A5)</li> [50]
<li>some Stickers: "I cannot read your documents", GNU-Sticker, Plussy-Sticker ...</li>
</ul>
<p>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!"</p>
<p><em>*This should be a form to fill out*<br/>
Please send promotion to:<br/>Name, Lastname: [field]<br/>Address: [field]<br/>Email: [field]<br/>I would like to have the default promotion package: Yes | No<br/>Instead of sending me the default package, I would like the promotion package to focus on: [comment field]<br/>Any comment:
[comment field]</em></p>
<h2 id="id-available-promotion-material">Available promotion material</h2>
<h3 id="id-general-fsfe-and-fellowship-material" class="left break">General FSFE and Fellowship material</h3>


Loading…
Cancel
Save