From e894d1ba28ee9aa8638af06024b45f6e420b77b8 Mon Sep 17 00:00:00 2001
From: Martina Maggio <maggio.martina@gmail.com>
Date: Wed, 27 Apr 2016 01:45:23 +0200
Subject: [PATCH] registration 2016

---
 processdata2016.php   | 38 ++++++++++++++++++++++++++++++++++
 registration2016.html | 48 +++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 86 insertions(+)
 create mode 100644 processdata2016.php
 create mode 100644 registration2016.html

diff --git a/processdata2016.php b/processdata2016.php
new file mode 100644
index 0000000..1d58741
--- /dev/null
+++ b/processdata2016.php
@@ -0,0 +1,38 @@
+<?php
+
+	$name = $_POST['name'];
+	$surname = $_POST['surname'];
+	$email = $_POST['email'];
+	$newcomer = 'No';
+	$dietary = $_POST['dietary'];
+	if (isset($_POST['newcomer'])) { $newcomer = 'Yes'; }
+
+	$not_processable = (empty($name) || empty($surname) || empty ($email));
+
+	if ($not_processable) {
+		die('First Name, Last Name and E-mail are required, please 
+			<a href="http://control.lth.se/ecrts2015/registration2016.html">try again</a>.');
+	}
+	else {
+		$filename = '/home/WWW/public/ECRTS2015/data2016/' . $surname . '-' . $name . '.txt';
+		$data = '--------------------------------------------------------------------------------' . "\n" .
+		        'First Name: ' . $name . "\n" .
+		        'Last Name: ' . $surname . "\n" .
+		        'E-mail: ' . $email . "\n" .
+		        'IP: ' . $_SERVER[REMOTE_ADDR] . "\n" .
+		        'Date: ' . date('Y-m-d H:i:s') . "\n" .
+		        'Dietary: ' . $dietary . "\n" .
+		        'First ECRTS: ' . $newcomer . "\n" .
+		        '--------------------------------------------------------------------------------' . "\n";
+		$ret = file_put_contents($filename, $data, FILE_APPEND | LOCK_EX);
+		if ($ret === false) {
+			die('An error occurred, please 
+				<a href="http://control.lth.se/ecrts2015/registration2016.html">try again later</a>.');
+		}
+		else {
+			header("Location: http://www.euromicro.org/registration/registration.php?event=ECRTS2016");
+	    exit;
+		}
+	}
+
+?>
diff --git a/registration2016.html b/registration2016.html
new file mode 100644
index 0000000..918722e
--- /dev/null
+++ b/registration2016.html
@@ -0,0 +1,48 @@
+<html>
+<head>
+<meta charset="UTF-8">
+<title>ECRTS 2016 registration</title>
+<link rel="stylesheet" href="css/style.css" type="text/css">
+ 
+<!-- Analytics: START -->
+<script>
+  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
+  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+
+  ga('create', 'UA-55862227-1', 'auto');
+  ga('send', 'pageview');
+</script>
+<!-- Analytics: END -->
+
+</head>
+
+<body>
+
+
+			<img src="img/logo.png">
+
+			<h4>Registration</h4>
+			
+			The registration process is divided in two parts. We collect some information
+			necessary for the organization (dietary constraints and first timers). If
+			you click continue, the form will send you to the Euromicro registration page,
+			where you are supposed to fill in your data and process the payment of the
+			registration fee. <b>You need to complete the registration with Euromicro and
+			the payment in order to be registered for the conference.</b><br><br>
+
+
+<form action="processdata2016.php" method="POST">
+First Name:<br><input type="text" name="name"/><br>
+Last Name:<br><input type="text" name="surname"/><br>
+E-mail:<br><input type="text" name="email"/><br>
+Dietary Constraints:<br><textarea name="dietary" rows="5" cols="40"></textarea><br>
+Is it your first ECRTS: <input type="checkbox" name="newcomer" value='2' id='checkbox'/><br>
+<input type="submit" name="submit" value="Continue to Euromicro" style="float: right;">
+</form>	
+
+</div>
+</body>
+</html>
+
-- 
GitLab