'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 BIJ SPAMCHECK.'; } // 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 += 356.95; } // The same for the third participant if (!empty($formdata['participants'][2]['lastname'])) { $price += 356.95; } // The same for the fourth participant if (!empty($formdata['participants'][3]['lastname'])) { $price += 356.95; } // The same for the fifth participant if (!empty($formdata['participants'][4]['lastname'])) { $price += 356.95; } // Apply promotion codes if ($formdata['promocode'] == 'bitsaaa11a09') { $price = $price * 0.50; } if ($formdata['promocode'] == 'gosstudent09') { $price = $price - 59.00; } if ($formdata['promocode'] == 'interthefreedomjj') { $price = $price - 59.00; } if ($formdata['promocode'] == 'itt2017half') { $price = $price - 124.50; } // Order data $price = round($price, 2); $orderid = uniqid(); $email = $formdata['participants'][0]['email']; // Write result to CSV $csvfile = '/home/bita/csv/InterTheThings2017-standard.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', 'Promo code', 'Company', 'Country', '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'; } 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["country"]; $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 InterTheThings Eindgebruikers"; $body = ""; $body .= "Order id: ". $orderid ."\n"; $body .= "Price: ". $price ."\n"; $body .= "\n"; $body .= "Promo 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 .= "Postal code: ". $formdata["postalcode"] ."\n"; $body .= "Phone number: ". $formdata["phone"] ."\n"; $body .= "Mobile number: ". $formdata["mobile"] ."\n"; $body .= "Payment method: ". $formdata["payment"] ."\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 .= "\n"; } $headers = "Content-Type: text/plain\r\n"; $headers .= "From:InterTheThings\r\n"; mail("jv@bita-center.com, fa@bita-center.com, hvb@bita-center.com, marita.vleugel@cionet.com, info@interthethings.com", $subject, $body, $headers); mail($email, "Automatische bevestiging van uw registratie voor InterTheThings", $body, $headers); // Redirect if there was no price if ($price < 0.01) { header("Location: validation1.html"); exit(); } // Display payment form if ($formdata['payment'] == 'online') { ?>

Online Payment Number

Subscription fee:

 

 

Ja, ik wil mij graag registreren voor InterTheThings 2017 op 28 september 2017 in de 3D Makers Zone in Haarlem.


Registreren kost €249,- (inc. BTW
)



'. $error .'

'; } } ?>

   
Kortingscode:
Bedrijf:*
Land:*

Adres:*
Stad:*
Postcode:*
Telefoonnummer:*
Mobiel:
SPAM CHECK:*
Vul a.u.b. het woord "" in om te bewijzen dat je geen spambot bent.

$participant) { ?>

 

0 ? " ". ($i + 1) : ""; ?>

Voornaam:*
Achternaam:*
Functie:*
Zakelijk emailadres:*

Betaalmethode:  
/>

U kunt alleen online betalen d.mv. een secure server.

  • Heeft u een kortingscode ingevuld? Dan hoeft u slechts het resterende bedrag te betalen.
  • Heeft u een kortingscode ingevuld die recht geeft op GRATIS DEELNAME? U wordt dan direct doorverwezen naar de bevestiging.
  • Creditcard betalingen zullen direct op de Secure Server verwerkt worden. U zult nadat u op de knop 'Registreer nu' heeft gedrukt naar een Secure Server worden genomen voor verdere afhandeling.

We accepteren:

   
  


Neem contact op voor vragen of meer informatie

info@interthethings.com | +31 (0)23 201 02 04

* = verplicht veld