% use Mail::Internet; % my $msg = ""; % my $showform = 1; % if ($ARGS{'action'} eq 'submit') { % if($ARGS{'email'} =~ m/bham.ac.uk/) % { % open TICKET, "; % close TICKET; % open OUTFILE, ">>/home/infection/BPAG/Dub/Baba/people.csv"; % print OUTFILE '"' . $ARGS{'name'} . '","' . $ARGS{'email'} . '"'; % if($num > 120) { % print OUTFILE ',"reserve"'; % } % else { % print OUTFILE ',"sent"'; % } % print OUTFILE "\n"; % close OUTFILE; % $msg = "Thank you for your interest!"; % $showform = 0; % % if($num > 120) % { % $msg = "Thank you - unfortunately we are now fully booked for this event. Your name has been added to our reservation list. Should any places become available we will email you."; % } % else % { % close TICKET; % open TICKET, ">/home/infection/BPAG/Dub/Baba/ticket.num"; % print TICKET $num + 1; % close TICKET; % % $msg = $msg . "

An email has been sent with your unique ticket. Please print and bring to the event."; % % my $mail = Mail::Internet->new; % $mail->head->add("To", $ARGS{'email'}); % $mail->head->add("Sender", 'Rap Canterbury Tales '); % $mail->head->add("Subject", 'Your ticket to Rap Canterbury Tales'); % $mail->head->add('From', 'm.pallen@bham.ac.uk'); % $mail->body("Dear " . $ARGS{'name'} . "\n\nThank you for reserving your ticket to The Rap Canterbury Tales by Baba Brinkman.\n\nPlease print this email and bring on the day.\n\nYour unique ticket number is: W00" . $num . "\n\nLocation: The IRB Common Room, Medical School, University of Birmingham\nDate: May 23rd 2007 5.30pm\nPay on the door: 5 pounds (3 pounds students)."); % $mail->send; % } % } % else % { % $msg = "You must submit a bham.ac.uk email address!"; % } % } The Rap Canterbury Tales by Baba Brinkman
Header Graphic
Footer Graphic
X
<% $msg %> % if ($showform == 1) { Tickets are limited to staff and students of the University of Birmingham only. To reserve your place, please enter your name and e-mail address.

name

email address (must end @bham.ac.uk)

% }
Header Graphic
Footer Graphic