& header, name=>'ticketpurchase', title=>'Online Ticket Purchase' &>
BRATTLEBORO
%### To adjust for a different year,
%## 1. change the dates at the bottom of the page, including
%## i. the strings in the $descriptions string, and
%## ii. the s/../../ stuff in the "if(length()>127)" block.
%## 2. fix the prices in the %prices hash
%## and make sure they match those displayed in online-tickets.html
%### To turn this off, the simpliest thing is to just
%### change the filename to ticketpurchase.html_DISABLED
%### To do something more complicated (but more user friendl),
%### i. remove the comments from this first "if (1) " line,
%### ii. remove the %# from the "Online tickets are..." text, and
%#### iii. change "if (not $nTicks)" to "} elsif (not $nTicks)"
%#
% if (1) {
|
|
You have selected <% $description %> Total price = $ <% $price %>.00 |
|
What happens next? After you click the "Purchase Tickets" button you'll be able to use a credit card to purchase the tickets through PayPal. You can read more about why we chose this system here. Your tickets will be held at the door. You should get an email from PayPal confirming your ticket purchase. Just come to the dance with some ID, and we'll give you your tickets then. If you wish, you may print out your email receipt and bring it with you as proof of purchase. If you use a business credit card to pay for the tickets, please let us know what your name is by leaving a note in the "add special instructions" field on the PayPal site. If you have any questions or concerns, please email us at info@dawndance.org |
<& footer &> %# ==================================================================== <%args> $md_eng => 0 $md_dd => 0 $md_combo => 0 $md_engsen => 0 $md_ddsen => 0 $ld_eng => 0 $ld_dd => 0 $ld_combo => 0 $ld_engsen => 0 $ld_ddsen => 0 %args> <%init> my @md = qw( md_eng md_dd md_combo md_engsen md_ddsen); my @ld = qw( ld_eng ld_dd ld_combo ld_engsen ld_ddsen); my %count; my %params = ( md_eng => $md_eng, md_dd => $md_dd , md_combo => $md_combo, md_engsen => $md_engsen, md_ddsen => $md_ddsen, ld_eng => $ld_eng, ld_dd => $ld_dd , ld_combo => $ld_combo, ld_engsen => $ld_engsen, ld_ddsen => $ld_ddsen, ); my %prices = ( md_eng => 10, md_dd => 20, md_combo => 25, md_engsen => 7, md_ddsen => 15, ld_eng => 10, ld_dd => 20, ld_combo => 25, ld_engsen => 7, ld_ddsen => 15, ); my %strings = ( md_eng => "English", md_dd => "DawnDance", md_combo => "Eng/DD Combo", md_engsen => "English Senior/Student", md_ddsen => "DawnDance Senior/Student", ld_eng => "English", ld_dd => "DawnDance", ld_combo => "Eng/DD Combo", ld_engsen => "English Senior/Student", ld_ddsen => "DawnDance Senior/Student", ); my ($nTicks, $price) = (0,0); my @mdDescriptions = (); my @ldDescriptions = (); foreach my $tick (@md) { $count{$tick} = $params{$tick} || 0; $nTicks += $count{$tick}; $price += $count{$tick} * $prices{$tick}; push @mdDescriptions, "$count{$tick} $strings{$tick}" if $count{$tick}; } foreach my $tick (@ld) { $count{$tick} = $params{$tick} || 0; $nTicks += $count{$tick}; $price += $count{$tick} * $prices{$tick}; push @ldDescriptions, "$count{$tick} $strings{$tick}" if $count{$tick}; } my $S = $nTicks > 1 ? 'S' : ''; my $description = "$nTicks TICKET$S - "; $description .= "May 30 '10 : " . join(", ",@mdDescriptions) if @mdDescriptions; $description .= "; " if (@mdDescriptions and @ldDescriptions); $description .= "Sep 5 '10 : " . join(", ",@ldDescriptions) if @ldDescriptions; if (length($description)>127) { for ($description) { s/English/Eng/g; s{Senior/Student}{Sen/Stud}g; s{Eng/DD }{}g; s{DawnDance}{DD}g; s{May 30 '10}{5/30/10}; s{Sep 5 '10}{9/5/10}; s{TICKETS - }{TIX- }; } } %init>