#!/usr/local/bin/perl
#ticket script Antimatter
use warnings; 
use strict;
use CGI qw(:standard);
use CGI::Carp qw(warningsToBrowser fatalsToBrowser);
my $name = param("n");
my $email = param("e");
my $amount = param("a");
my $remarks = param ("r");

print header (), start_html("Presales EVE OF GRIEF :: Onrust Tribute pt. I An Acoustic Evening w/ ANTIMATTER (Mick Moss & Vic Anselmo), CHURCH OF RA (acoustic show - Mathieu VDK/Lennart Bossu/CHVE) @ Sint-Autbertus Kerk, Gent"), h1 ("presales Antimatter, Church Of Ra (Acoustic show) 10 March");
print '<body style="background-color: rgb(1, 1, 1); color: rgb(0, 0, 0); text-align: center"
 alink="#ee0000" link="#0000ee" vlink="#551a8b">
<div style="text-align: center; width: 960px; display: inline-block"><a
 name="banner"></a><img
 style="width: 960px; height: 200px;"
 src="http://www.niflheimpromotions.be/banner960x200.jpg" alt=""><br>
<div><span style="color: white;"><span
 style="font-family: Calibri;"><a style="color: white;"
 href="http://www.niflheimpromotions.be/news.htm">HOME ::
NIFLHEIM PROMOTIONS</a>
&nbsp; | &nbsp;&nbsp;&nbsp;
<a style="color: white;"
 href="http://www.niflheimpromotions.be/naturmystikk.htm">NATURMYSTIKK</a>&nbsp;&nbsp;
| &nbsp;&nbsp;&nbsp;<a style="color: white;"
 href="http://www.niflheimpromotions.be/eve_of_grief.htm">EVE OF GRIEF</a></span></span><span
 style="color: white;"></span><br>
<div>
<div style="text-align: center;">
<div style="text-align: center; height: 659px;"><br>
<div style="height: 612px; margin-left: 65px; width: 822px;"
 class="#frame1"><span
 style="color: white; font-family: Calibri;">Presale Form</span><br>
<br>
<p
 style="margin-top: 0pt; margin-bottom: 0pt; font-family: Calibri; margin-left: 12px; height: 37px; width: 804px;"
 align="justify"> <font color="#c0c0c0" size="2"> Order your tickets for Presales EVE OF GRIEF :: Onrust Tribute pt. I An Acoustic Evening w/ ANTIMATTER (Mick Moss & Vic Anselmo), CHURCH OF RA (acoustic show - Mathieu VDK/Lennart Bossu/CHVE) @ Sint-Autbertus Kerk, Gent:<br>
Any questions, please contact presales@niflheimpromotions.be</font></p>
<p
 style="margin-top: 0pt; margin-bottom: 0pt; font-family: Calibri; margin-left: 12px; height: 37px; width: 804px;"
 align="justify"><font color="#c0c0c0" size="2">
';
if ($name, $email, $amount)
    {   my $payment = $amount * 12;
        my $text = "Beste $name,
        
Het evenement is bijna of helemaal uitverkocht. We noteerden uw naam en aantal tickets ($amount) op de wachtlijst en laten u zo spoedig mogelijk iets weten als er weer enkele tickets beschikbaar zouden zijn. 
Je gaf volgende opmerking: \'$remarks\'. Zonder tegenbericht komt dit in orde.
Bedankt om dit optreden mee mogelijk te maken!

The event is almost or completely sold out. We noted name and amount of tickets ($amount) on the waiting list, we update you as soon as possible if tickets are still available. 
You gave the following remark: \'$remarks\'. Without further notice this will be taken into account.
Thanks for making this concert possible!

Niflheim Promotions";
        my $texthtml = "<br><br>Beste $name, <br><br>
        
Het evenement is bijna of helemaal uitverkocht. We noteerden uw naam en aantal tickets ($amount) op de wachtlijst en laten u zo spoedig mogelijk iets weten als er weer enkele tickets beschikbaar zouden zijn. 
Je gaf volgende opmerking: \'$remarks\'. Zonder tegenbericht komt dit in orde.
Bedankt om dit optreden mee mogelijk te maken! <br><br>

The event is almost or completely sold out. We noted name and amount of tickets ($amount) on the waiting list, we update you as soon as possible if tickets are still available. 
You gave the following remark: \'$remarks\'. Without further notice this will be taken into account.
Thanks for making this concert possible!
<br><br>
Niflheim Promotions";
        open (MAIL, "|/usr/sbin/sendmail -t -oi") or 
        die "Can't fork for sendmail: $!\n";
        print MAIL "From: presales\@niflheimpromotions.be\n";
        print MAIL "To: $email\n";
        print MAIL "cc: niflheim.contact\@gmail.com, presales\@niflheimpromotions.be\n";
        print MAIL "Subject: Your presale for Eve of Grief :: Onrust Tribute pt. I An Acoustic Evening w/ ANTIMATTER (Mick Moss & Vic Anselmo), CHURCH OF RA (acoustic show - Mathieu VDK/Lennart Bossu/CHVE) @ Sint-Autbertus Kerk, Gent \n\n";
        print MAIL $text;
        close(MAIL);
        print $texthtml;
    }
    else {
        print hr, start_form, "Please enter your full name, email adress and amount of tickets you want to order. If you have any remarks you can mention these (for example the names of the other visitors, in case they might not arrive at the same time)", br, 
        "Your name (e.g. John Doe)\: ", textfield ("n", ""), br,
        "Your e-mail adres (e.g. account\@gmail.com)\: ", textfield ("e",""), br,
        "Amount of tickets (e.g. 2)\: ", textfield (-name => "a", -size => 2, -maxlenght =>2), br,
        "Remarks\: ", textfield (-name => "r", -value => 'I have no remarks', -size => 100), br;
        print submit(-name=>"post",-value=>"Order Tickets");
        print end_form, hr; 
        }
print '</font></p>
<p
 style="margin-top: 0pt; margin-bottom: 0pt; font-family: Calibri; margin-left: 12px; width: 450px; height: 37px;"
 align="justify"></p>
<p
 style="margin-top: 0pt; margin-bottom: 0pt; font-family: Calibri; margin-left: 12px; width: 450px; height: 400px;"
 align="justify"></p>
</div>
</div>
</div>
<div style="text-align: left;"><font color="#808080"
 face="Verdana" size="1"><big><span
 style="font-family: Calibri;">Site Copyright © 2012</span><span
 style="font-family: Calibri;"> Niflheim Promotions</span><span
 style="font-family: Calibri;"><br>
Website designed, owned and maintained by Niflheim Promotions</span></big></font></div>
</div>
</div>
</div>
</body>';
print end_html (); 

