Index: webapp/webclient/root/inc/footer.php
===================================================================
--- webapp/webclient/root/inc/footer.php	(revision 6f3864327ba7f42b140863d71396704ad632e21a)
+++ webapp/webclient/root/inc/footer.php	(revision 6f3864327ba7f42b140863d71396704ad632e21a)
@@ -0,0 +1,20 @@
+<?php
+/*
+    Copyright (C) 2016 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+?>
+	</body>
+</html>
Index: webapp/webclient/root/inc/header.php
===================================================================
--- webapp/webclient/root/inc/header.php	(revision 6f3864327ba7f42b140863d71396704ad632e21a)
+++ webapp/webclient/root/inc/header.php	(revision 6f3864327ba7f42b140863d71396704ad632e21a)
@@ -0,0 +1,59 @@
+<?php
+/*
+    Copyright (C) 2016 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+// error_reporting(E_WARNING & E_ERROR);
+error_reporting(E_ALL);
+ini_set('display_errors', true);
+
+if(!isset($headerStylesheetLinks)){
+	$headerStylesheetLinks = Array();
+}
+if(!isset($headerJavascriptLinks)){
+	$headerJavascriptLinks = Array();
+}
+if(!isset($headerTitle)){
+	$headerTitle = "";
+}
+if(!isset($headerJavascript)){
+	$headerJavascript = "";
+}
+
+?>
+	<!DOCTYPE HTML>
+	<html>
+		<head>
+			<meta charset="utf-8"/>
+			<title>GNUBoat <?php echo (empty($headerTitle)) ? "" : " - ". $headerTitle; ?></title>
+			<link rel="stylesheet" href="css/main.css" type="text/css"/>
+<?php
+	foreach ($headerStylesheetLinks as $cssFile){
+		echo "			<link rel=\"stylesheet\" content=\"text/css\" href=\"". $cssFile ."\"/>\n";
+	}
+?>
+			<script language="javascript" src="javascript/jquery-2.2.4.min.js" type="text/javascript"></script>
+			<script language="javascript" src="javascript/main.js" type="text/javascript"></script>
+<?php
+	foreach ($headerJavascriptLinks as $headerJavascriptLinks){
+		echo "			<script language=\"javascript\" src=\"". $headerJavascriptLinks ."\" type=\"text/javascript\"></script>\n";
+	}
+	if(!empty($headerJavascript)){
+		echo "		<script language=\"javascript\" type=\"text/javascript\">". $headerJavascript ."</script>\n";
+	}
+?>
+	</head>
+		<body>
Index: webapp/webclient/root/index.php
===================================================================
--- webapp/webclient/root/index.php	(revision 6f3864327ba7f42b140863d71396704ad632e21a)
+++ webapp/webclient/root/index.php	(revision 6f3864327ba7f42b140863d71396704ad632e21a)
@@ -0,0 +1,104 @@
+<?php
+/*
+    Copyright (C) 2016 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+$title = "Web Application";
+$headerJavascriptLinks = array("javascript/leaflet.js");
+$headerStylesheetLinks = array("css/leaflet.css");
+
+if(array_key_exists("mapFile", $_POST)){
+	// upload new map to webservice
+	if($_FILES["mapFile"]["error"] != UPLOAD_ERR_NO_FILE){
+		// do some checks before using the uploaded file
+		$error = false;
+		switch($_FILES["mapFile"]["error"]){
+			case UPLOAD_ERR_OK:
+				break;
+			case UPLOAD_ERR_NO_FILE:
+				$errorToDisplay["title"] = "No file sent.";
+				$error = true;
+				break;
+			case UPLOAD_ERR_INI_SIZE:
+			case UPLOAD_ERR_FORM_SIZE:
+				$errorToDisplay["title"] = "Exceeded filesize limit.";
+				$error = true;
+			default:
+				$errorToDisplay["title"] = "Unknown errors.";
+				$error = true;
+		}
+		$mapFile = sys_get_temp_dir() ."/map.mbtiles";
+		if(!move_uploaded_file($_FILES["mapFile"]["tmp_name"], $mapFile)){
+			$errorToDisplay["title"] = "Upload failed";
+		}
+		else{
+			// send file to the webservice
+			$upload_url = '../webservice/';
+			$params = array(
+				'map'=>"@$mapFile"
+			);  
+
+			$ch = curl_init();
+			curl_setopt($ch, CURLOPT_VERBOSE, 1);
+			curl_setopt($ch, CURLOPT_URL, $upload_url);
+			curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
+			curl_setopt($ch, CURLOPT_POSTFIELDS, $params);
+			$response = curl_exec($ch);
+			curl_close($ch);
+		}
+	}
+}
+
+require_once("inc/header.php");
+?>
+	<h2 id="title" class="backgroundblue">GNUBoat</h2>
+	<div id="display">
+		<div id="speedthroughwater">
+			<h2>STW</h2>
+			<span id="value" class="important">-</span> kts
+		</div>
+		<div id="speedoverground">
+			<h2>SOG</h2>
+			<span id="value" class="important">-</span> kts
+		</div>
+		<div id="waterdepth">
+			<h2>Depth</h2>
+			<span id="value">-</span> m
+		</div>
+		<div id="watertemperature">
+			<h2>Water</h2>
+			<span id="value">-</span>&#176;C
+		</div>
+		<div id="gps">
+			<h2>Fix</h2>
+			<span id="value">-</span>
+		</div>
+	</div>
+	<div id="map"></div>
+	<form method="post" action="./" enctype="multipart/form-data">
+		<div class="formTable">
+			<p>
+				<label>Upload Map (mbtiles format):</label><br/>
+				<input class="file" type="file" name="mapFile" value=""/>
+			</p>
+		</div>
+		<div class="formButtons">
+			<input type="submit" class="button buttonSubmit" name="buttonSendMap" value="Upload"/>
+		</div>
+	</form>
+<?php
+require_once("inc/footer.php");
+?>
