values.php 1.05 KB
<div class="row">
	<div class="col-6 col-md-6 offset-md-3 offset-3">
		<br/>
		<h1 style="margin-bottom:20px; margin-top:60px; border-bottom:1px solid #CCC; padding-bottom:20px;"><i class="fas fa-database"></i> Valeurs des capteurs</h1>
		<table class="table table-striped table-bordered">
			<thead class="thead-dark">
				<th>Nom</th>
				<th>Raspberry</th>
				<th>Type</th>
				<th>Valeur</th>
				<th>Unité</th>
				<th>Arrêt</th>
			</thead>
			<tbody>
				<?php 
				$sensors = getSensors();
				foreach($sensors as $sensor){
					?>
					<tr>
						<td><?php echo $sensor['nom'];?></td>
						<td><?php echo $sensor['raspberry'];?></td>
						<td><?php echo $sensor['type'];?></td>
						<td><?php echo $sensor['value'];?></td>
						<td><?php echo $sensor['unite'];?></td>
						<td>
							<form action="stop.php" method="POST">
								<input type="hidden" name="nom" value="<?php echo $sensor['nom'];?>">
								<input type="submit" name="stop" value="Arrêter">
							</form>
						</td>
					</tr>
					<?php
				}
				?>
			</tbody>
		</table>
	</div>
</div>