<?php
error_reporting(E_ALL);
ini_set('display_errors', TRUE);
$_SESSION["webGUIversion"] = "V2.0.2-2";
$document_root = getenv('DOCUMENT_ROOT');
$home = "../index.php";
$title = "WLAN Thermometer";

?>

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
            "http://www.w3.org/TR/html4/loose.dtd">
<html>

<head>

    <script type="text/javascript" src="../js/jquery.min.js"></script>
	<script type="text/javascript" src="../js/jquery.session.js"></script>
	<script type="text/javascript" src="../js/jquery.fancybox.js"></script>
	<script type="text/javascript" src="../js/jquery.fancybox.script.js"></script>
	<script type="text/javascript" src="../js/jquery.div.slide.js"></script>
	<script type="text/javascript" src="../js/jquery.jeditable.js"></script>
	<script type="text/javascript" src="../js/function.js"></script>
	<script type="text/Javascript" src="../js/wifi_functions.js"></script>
	<script type="text/javascript" src="../js/jquery.image.reload.js"></script>
	<link rel="stylesheet" href="../css/jquery.fancybox.css" type="text/css" media="screen">
			
	<title><?php echo $title; ?> (<?php echo $_SESSION["webGUIversion"]; ?>)</title>
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
	<link rel="shortcut icon" type="image/x-icon" href="../images/icons16x16/thermo.png">
	<link rel="stylesheet" type="text/css" href="../css/style.css">
	
	<link rel="apple-touch-icon" href="images/apple-touch-icon-57x57-precomposed.png">
	

</head>

<body onload="bildreload();garden()">
	
	<div id="body">
	<div id="wrapper">
	<div id="header">
		<div id="header_logo"><div class="header_link"><a href="../index.php"></a></div></div>
	</div>
	<div id="header_title"></div>
	<div id="mainmenu">

	<table border="0" width="100%" cellspacing="0" cellpadding="0">
		<tr>
		<td align="left" width="50%">
		<table border="0" cellspacing="0" cellpadding="0">
			<tr>
				<td width="10">&nbsp;</td>
				<?php
					echo "<td><a href=\"../control/new_log_file.php\" class=\"mainmenu\" style=\"text-align:left;\"><b>NEUES LOGFILE ERSTELLEN</b></a></td>\n";
				
				if (file_exists("../control/watering.php")){?>
					<td width="10">&nbsp;</td>
					<?php
					echo "<td><a href=\"../control/watering.php\" class=\"mainmenu\" style=\"text-align:left;\"><font size=\"1\"><b>Bew&auml;ssern</b></font></a></td>\n";
				}?>
			</tr>
		</table>
		</td>

	<td align="right" width="83%">
	<table border="0" cellspacing="0" cellpadding="0">
	<tr>
<?php
	//#######################################################################################################################################################################
	//####### Icon's im Header anzeigen
	//#######################################################################################################################################################################

	if(strpos($_SERVER["PHP_SELF"], "index.php") === false){
		//
	}elseif ($_SESSION["plot_start"] == "True"){
		echo "<td><a href=\"#\" id=\"ThermoPlot_button\" class=\"mainmenu\"><img src=\"../images/icons32x32/chart.png\" border=\"0\" alt=\"TempGraph\" title=\"TempGraph\"></a></td>\n";
	}
	if(strpos($_SERVER["PHP_SELF"], "index.php") === false){
		//
	}elseif ($_SESSION["webcam_start"] == "True"){
		echo "<td><a href=\"#\" id=\"webcam_button\" class=\"mainmenu\"><img src=\"../images/icons32x32/webcam.png\" border=\"0\" alt=\"WebCam\" title=\"WebCam\"></a></td>\n";
	}
	if(strpos($_SERVER["PHP_SELF"], "index.php") === false){
		//
	}elseif ($_SESSION["raspicam_start"] == "True"){
		echo "<td><a href=\"#\" id=\"raspicam_button\" class=\"mainmenu\"><img src=\"../images/icons32x32/raspicam.png\" border=\"0\" alt=\"RaspiCam\" title=\"RaspiCam\"></a></td>\n";
	}
	echo "<td><a href=\"../thermolog.php\" class=\"mainmenu\"><img src=\"../images/icons32x32/log.png\" border=\"0\" alt=\"Log Datei\" title=\"Log Datei\"></a></td>\n";
	echo "<td><a href=\"../control/config.php\" class=\"mainmenu\"><img src=\"../images/icons32x32/thermo.png\" border=\"0\" alt=\"Temp Einstellen\" title=\"Einstellungen\"></a></td>\n";
	echo "<td><a href=\"../control/wifi.php\" class=\"mainmenu\"><img src=\"../images/icons32x32/wifi.png\" border=\"0\" alt=\"Home\" title=\"WiFi Einstellungen\"></a></td>\n";
	if (($_SESSION["updateAvailable"] == "True") AND ($_SESSION["checkUpdate"] == "True")){
		echo "<td><a href=\"../info.php\" class=\"mainmenu\"><img src=\"../images/icons32x32/infoupdate.png\" border=\"0\" alt=\"Info\" title=\"Info\"></a></td>\n";
	}else{
		echo "<td><a href=\"../info.php\" class=\"mainmenu\"><img src=\"../images/icons32x32/info.png\" border=\"0\" alt=\"Info\" title=\"Info\"></a></td>\n";
	}
	
	echo "<td><a href=\"../index.php\" class=\"mainmenu\"><img src=\"../images/icons32x32/home.png\" border=\"0\" alt=\"Home\" title=\"Home\"></a></td>\n";
	?>
	<td>
		<nav>
			<ul>
				<li class = "shutdown_menu">
					<a href="#" class="mainmenu"><img src="../images/icons32x32/shutdown.png" border="0" alt="Home" title="Shutdown"></a>
					<ul>
						<li><a href="../control/shutdown.php?id=reboot"><b>Neu starten</b></a></li>
						<li><a href="../control/shutdown.php?id=shutdown"><b>Herunterfahren</b></a></li>
					</ul>
				</li>
			</ul>
		</nav>
	</td>
	<?php
	//#######################################################################################################################################################################
?>

	<td width="10">&nbsp;</td>
	</tr>
	</table>
	</td>
	</tr>
	</table>
	</div>
	<div class="clear"></div>
	
		<div id="content">
			<div class="inner">
<?php
	error_reporting(E_ALL);
	ini_set('display_errors', TRUE);
?>