'CEVITTS 2012, Day 1 (March 27)',
'cevitts_day2' => 'CEVITTS 2012, Day 2 (March 28)' ,
);
// Form data
$formdata = array(
"captcha" => isset($_POST['captcha']) ? strtolower(trim($_POST['captcha'])) : "",
"promocode" => isset($_POST['promocode']) ? trim(strtolower($_POST['promocode'])) : "",
"company" => isset($_POST['company']) ? trim($_POST['company']) : "",
"country" => isset($_POST['country']) ? trim($_POST['country']) : "",
"address" => isset($_POST['address']) ? trim($_POST['address']) : "",
"city" => isset($_POST['city']) ? trim($_POST['city']) : "",
"postalcode" => isset($_POST['postalcode']) ? trim(strtoupper($_POST['postalcode'])) : "",
"phone" => isset($_POST['phone']) ? trim(strtolower($_POST['phone'])) : "",
"mobile" => isset($_POST['mobile']) ? trim(strtolower($_POST['mobile'])) : "",
"invoice" => isset($_POST['invoice']) ? trim($_POST['invoice']) : "",
"payment" => isset($_POST['payment']) ? trim($_POST['payment']) : "online",
"date" => isset($_POST['date']) ? trim($_POST['date']) : "",
"participants" => array(),
);
$errors = array();
if (isset($_POST['captcha']) && $captcha != $formdata['captcha']) {
$errors[] = 'VUL A.U.B. HET WOORD IN ZOALS AANGEGEVEN OM TE BEWIJZEN DAT U GEEN SPAMBOT BENT.';
}
// Participants
for ($i = 0; $i < $participants; $i++) {
$participant = array(
"firstname" => "",
"lastname" => "",
"email" => "",
"jobrole" => "",
"twitter" => "",
);
// Fields
foreach ($participant as $field => &$value) {
if (isset($_POST[$field][$i])) {
$value = $_POST[$field][$i];
}
}
$formdata['participants'][] = $participant;
}
// If the form was submitted
if (isset($_POST['action']) && empty($errors)) {
// Example code: Adjust price if the first participant has filled in a first name
if (!empty($formdata['participants'][0]['lastname'])) {
$price += 0.00;
}
// The same for the second participant
if (!empty($formdata['participants'][1]['lastname'])) {
$price += 5057.50;
}
// The same for the third participant
if (!empty($formdata['participants'][2]['lastname'])) {
$price += 5057.50;
}
// The same for the fourth participant
if (!empty($formdata['participants'][3]['lastname'])) {
$price += 5057.50;
}
// The same for the fifth participant
if (!empty($formdata['participants'][4]['lastname'])) {
$price += 5057.50;
}
// Apply promotion codes
if ($formdata['promocode'] == 'bitaaaa') {
$price = $price * 0.50;
}
// Order data
$price = round($price, 2);
$orderid = uniqid();
$email = $formdata['participants'][0]['email'];
// Write result to CSV
$csvfile = '/home/bita/csv/registraties-techtrend2018.csv'; // Make sure this file can be written to
if (!file_exists($csvfile) || filesize($csvfile) == 0) {
// New file, create and add headers
$csv = fopen($csvfile, 'a');
$headers = array('Date', 'Order id', 'Price', 'Promotion code', 'Company', 'Address', 'City', 'Postal code', 'Phone number', 'Mobile number', 'Payment method', 'Invoice', );
for ($i = 0; $i < $participants; $i++) {
$headers[] = 'First name';
$headers[] = 'Last name';
$headers[] = 'Email';
$headers[] = 'Role';
}
$headers[] = 'White Papers Computable';
fputcsv($csv, $headers);
fclose($csv);
}
$csv = fopen($csvfile, 'a');
$fields = array();
$fields[] = date('d-m-Y H:i:s');
$fields[] = $orderid;
$fields[] = $price;
$fields[] = $formdata["promocode"];
$fields[] = $formdata["company"];
$fields[] = $formdata["address"];
$fields[] = $formdata["city"];
$fields[] = $formdata["postalcode"];
$fields[] = $formdata["phone"];
$fields[] = $formdata["mobile"];
$fields[] = $formdata["payment"];
$fields[] = $formdata["invoice"];
foreach ($formdata['participants'] as $participant) {
$fields[] = $participant["firstname"];
$fields[] = $participant["lastname"];
$fields[] = $participant["email"];
$fields[] = $participant["jobrole"];
}
fputcsv($csv, $fields);
fclose($csv);
// Create email
$subject = "Registratie Masterclass Beyond Trends";
$body = "";
$body .= "Order id: ". $orderid ."\n";
$body .= "Price: ". $price ."\n";
$body .= "\n";
$body .= "Promotion code: ". $formdata["promocode"] ."\n";
$body .= "Company: ". $formdata["company"] ."\n";
$body .= "Country: ". $formdata["country"] ."\n";
$body .= "Address: ". $formdata["address"] ."\n";
$body .= "City: ". $formdata["city"] ."\n";
$body .= "Country: ". $formdata["country"] ."\n";
$body .= "Postal code: ". $formdata["postalcode"] ."\n";
$body .= "Phone number: ". $formdata["phone"] ."\n";
$body .= "Mobile number: ". $formdata["mobile"] ."\n";
$body .= "Payment method: ". $formdata["payment"] ."\n";
$body .= "Date: ". $formdata["date"] ."\n";
$body .= "Invoice:\n";
$body .= $formdata["invoice"] ."\n\n";
$body .= "Participants:\n\n";
foreach ($formdata['participants'] as $participant) {
$body .= " First name: ". $participant["firstname"] ."\n";
$body .= " Last name: ". $participant["lastname"] ."\n";
$body .= " Email: ". $participant["email"] ."\n";
$body .= " Job role: ". $participant["jobrole"] ."\n";
$body .= " Twitter: ". $participant["twitter"] ."\n";
$body .= "\n";
$body .= $participant["firstname"] ."\n";
$body .= $participant["lastname"] ."\n";
$body .= $participant["email"] ."\n";
$body .= $participant["jobrole"] ."\n";
$body .= $participant["twitter"] ."\n";
$body .= "\n";
$body .= $formdata["company"] ."\n";
$body .= $formdata["country"] ."\n";
$body .= $formdata["address"] ."\n";
$body .= $formdata["city"] ."\n";
$body .= $formdata["country"] ."\n";
$body .= $formdata["postalcode"] ."\n";
$body .= $formdata["phone"] ."\n";
$body .= $formdata["mobile"] ."\n";
}
$headers = "Content-Type: text/plain\r\n";
$headers .= "From: Masterclass Institute Online Payment Number Subscription fee: €
'. $error .'
'; } } ?>Kortingscode: | |
---|---|
Bedrijf: | |
Land: |
|
Adres: | |
Stad: | |
Poscode: | |
Telefoonr: | |
Mobiel: | |
CAPTCHA: | Vul hier boven het woord "" in om aan te tonen dat u geen spambot bent. |
$participant) { ?>
Voornaam:* | |
---|---|
Achternaam:* | |
Functie:* | |
Emailadres:* | |
Twitter: |
In het geval dat u een factuur wilt ontvangen en uw bedrijf heeft hier specifieke informatie voor nodig (ordernummer, kostenplaats, etc) vul die dan hierN onder in:
Creditcards zullen via de Secure Server worden verwerkt. Na het verzenden van uw informatie zult u naar de Secure Server worden doorgeleid. (De prijs die u ziet is inclusief BTW).
Wij accepteren:
/>
(€ 20,- administratie kosten zullen in rekening worden gebracht)
Tot 15 werkdagen voor de conferentie kunt u tegen de annuleringskosten van € 99,- annuleren. Als u na deze dag annuleert, dan bent u het volledige factuurbedrag verschuldigd. Annuleren kan alléén schriftelijk (per post of per fax). Vervanging door een collega is altijd toegestaan.
Door op de "Registreer" knop te drukken gaat u tevens akkoord met opname in ons mailbestand. Daarmee informeren we u in de toekomst over volgende edities van dit event en vergelijkbare activiteiten. Ten alle tijden kunt u zich bij een volgend emailbericht afmelden bij de lijst.
Neem contact op voor meer informatie of vragen