<?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>
