
<html>
	<head>
		<title>AQCM05</title>
		<meta name="AQCM05" content="">
		<meta name="viewport" content="width=device-width, initial-scale=0.80, maximum-scale=2.0, minimum-scale=0.10">
		<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
		
		<script type="text/javascript" src="../M0/jquery.min.js"></script>

		<script type="text/javascript" src="../chart_js/node_modules/chart.js/dist/chart.umd.js"></script>  
		<script type="text/javascript" src="../chart_js/node_modules/chartjs-plugin-annotation/dist/chartjs-plugin-annotation.min.js"></script>  
		<script type="text/javascript" src="../chart_js/node_modules/chart.js/downloads/luxon_2"></script>  
		<script type="text/javascript" src="../chart_js/node_modules/chart.js/downloads/chartjs-adapter-luxon_1"></script>  
		<script type="text/javascript" src="../chart_js/chartjs-plugin-watermark.js"></script>  

		<style>
		
			.a_button {
				display:inline-block;
				padding: 4px;
				width: 140px;
				font-size: 15px; 
				font-family: Arial;
				text-decoration: none;
				background-color: #cccccc;
				color: #000000; 
				text-align: center;
				cursor: pointer;
				outline: none;
				border:#000000 2px solid;
				border-radius: 6px;
			}
			.a_button:link {
				color: #FFFFFF; 
				background-color: #400040;
			}
			.a_button:hover {
				font-style:italic;
				color: #ffffff;
				background-color: #000000;
			}

			.nom_sonde {
				padding: 0px 0px 0px 0px;
				margin: 0px 0px 0px 0px;
				font-family: Arial;
				font-size: 26px;
				text-align: center;
				cursor: pointer;
				outline: none;
				color: #ffffff;
				border: none;
				border-radius: 3px;
			}
			.nom_sonde:hover {

			}

		</style>
		
		<script type="text/javascript" >
		
			screen.orientation.addEventListener("change", function(e) {
				window.location.href = "./index.php";//
			});
		
		</script>
		
	</head>

<?php
	include("../M0/get_parameters.php");
	include("./get_live_values.php"); 
	include("./gauge_communs.js");
?>

<body bgcolor="#000033" >

<table align="center" border="1" bordercolor="#000000" bgcolor="#ffffff">

	<tr align="center" >

		<td align="center" width="240" height="50"  bgcolor="#000000" >
			<font size="2" style="cursor:default;">
				<?php include "../dashboard_V2/code_couleur.html"; ?>
			</font>
		</td>
		<td align="center" width="240" bgcolor="#000000" >
			<label class="nom_sonde" style="cursor:default;" >			
				<?php 
					echo( $aqcm_NAME ); 
				?>
			</label>
		</td>
		<td align="center" width="240" bgcolor="#000000" >
		
			<a href="../dashboard_V2/index.php" title="mesures en temps réel&#013style «multimètre»" target="_blank" ><img src="../_styles/7_segments.jpg"  border="0"	height="35" align="center" /></a>				
			&nbsp;&nbsp;&nbsp;
			<a href="../M00/index.php"  title="accès aux configurations" target="_blank" ><img src="../_styles/clef.jpg"  border="0"	height="35" align="center" /></a>

		</td>
		
	</tr>

	<?php 
		//$aqcm_MESURES = "NNNNNNNNNN"; 
	?>

	<tr align="center" >
	
		<td align="center" width="240">
			<?php
				if ( $aqcm_MESURES[0] == "Y" ) {
					echo ( '<div align="center" ><canvas id="gauge_T" width="180" height="180"></canvas></div>' ) ;
					include("./gauge_T.js");
				}
				else {
					echo ( '<div align="center" ><img src="TEMP.jpg" width="170" height="180" /></div>' ) ;
				}
			?>
		</td>
		
		<td align="center" width="240">
			<?php
				if ( $aqcm_MESURES[1] == "Y" ) {
					echo ( '<div align="center" ><canvas id="gauge_HR" width="180" height="180"></canvas></div>' ) ;
					include("./gauge_HR.js");
				}
				else {
					echo ( '<div align="center" ><img src="HR.jpg" width="170" height="180" /></div>' ) ;
				}
			?>
		</td>

		<td align="center" width="240">
			<?php
				if ( $aqcm_MESURES[2] == "Y" ) {
					echo ( '<div align="center" ><canvas id="gauge_CO2" width="180" height="180"></canvas></div>' ) ;
					include("./gauge_CO2.js");
				}
				else {
					echo ( '<div align="center" ><img src="CO2.jpg" width="170" height="180" /></div>' ) ;
				}
			?>
		</td>

	</tr>

	<tr align="center" >
	
		<td align="center" width="240">
			<?php
				if ( $aqcm_MESURES[4] == "Y" ) {
					echo ( '<div align="center" ><canvas id="gauge_COV" width="180" height="180"></canvas></div>' ) ;
					include("./gauge_COV.js");
				}
				else {
					echo ( '<div align="center" ><img src="COV.jpg" width="194" height="180" /></div>' ) ;
				}
			?>
		</td>
	
		<td align="center" width="240">
			<?php
				if ( $aqcm_MESURES[6] == "Y" ) {
					echo ( '<div align="center" ><canvas id="gauge_HCHO" width="180" height="180"></canvas></div>' ) ;
					include("./gauge_HCHO.js");
				}
				else {
					echo ( '<div align="center" ><img src="HCHO.jpg" width="205" height="180" /></div>' ) ;
				}
			?>
		</td>
		
		<td align="center" width="240">
			<?php
				if ( $aqcm_MESURES[5] == "Y" ) {
					echo ( '<div align="center" ><canvas id="gauge_PM25" width="180" height="180"></canvas></div>' ) ;
					include("./gauge_PM25.js");
				}
				else {
					echo ( '<div align="center" ><img src="PM25.jpg" width="240" height="180" /></div>' ) ;
				}
			?>
		</td>

	</tr>

	<tr align="center" >
	
		<td align="center" width="240">
			<?php
				if ( $aqcm_MESURES[7] == "Y" ) {
					echo ( '<div align="center" ><canvas id="gauge_LUX" width="180" height="180"></canvas></div>' ) ;
					include("./gauge_LUX.js");
				}
				else {
					echo ( '<div align="center" ><img src="LUX.jpg" width="240" height="180" /></div>' ) ;
				}
			?>
		</td>
		
		<td align="center" width="240" >
			<?php
				if ( $aqcm_MESURES[8] == "Y" ) {
					echo ( '<div align="center" ><canvas id="gauge_SPL" width="180" height="180"></canvas></div>' ) ;
					include("./gauge_SPL.js");
				}
				else {
					echo ( '<div align="center" ><img src="SPL.jpg" width="170" height="180" /></div>' ) ;
				}
			?>
		</td>

		<td align="center" width="240" >
			<?php
				if ( $aqcm_MESURES[3] == "Y" ) {
					include ("./graphique_DELTA_P_script.php");
					if ( $error_P == 0 ) {
						echo ( '<div><canvas id="Chart_P" width="180" height="130" ></canvas></div>' ) ;
						include("./chart_P.js");
					}
					else {
						echo ( '<div align="center" ><canvas id="gauge_P" width="180" height="180"></canvas></div>' ) ;
						include("./gauge_P.js");
					}
				}
				else {
					echo ( '<div align="center" ><img src="P_gauge.jpg" width="240" height="180" /></div>' ) ;
				}
			?>
		</td>

	</tr>

</table>

</body>

</html>

