|
|
@@ -0,0 +1,73 @@ |
|
|
|
<!DOCTYPE html> |
|
|
|
<html lang="fr"> |
|
|
|
|
|
|
|
<head> |
|
|
|
<meta http-equiv="content-type" content="text/html; charset=UTF-8"> |
|
|
|
<meta charset="utf-8"> |
|
|
|
<title>Allo-GG</title> |
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1"> |
|
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge"> |
|
|
|
<link rel="stylesheet" href="bootstrap.css" media="screen"> |
|
|
|
</head> |
|
|
|
|
|
|
|
<?php |
|
|
|
|
|
|
|
$etat_status[0]='success'; |
|
|
|
$etat_status[1]='light'; |
|
|
|
|
|
|
|
$porte_status[0]='info'; |
|
|
|
$porte_status[1]='light'; |
|
|
|
|
|
|
|
$sonette_status[0]='danger'; |
|
|
|
$sonette_status[1]='light'; |
|
|
|
|
|
|
|
exec("../scripts/check_services.sh >> allogg.log &"); |
|
|
|
exec("sleep 3"); |
|
|
|
|
|
|
|
?> |
|
|
|
|
|
|
|
<body> |
|
|
|
<div class="container" style="text-align:center;"> |
|
|
|
|
|
|
|
<?php echo $message[$_GET["msg"]]; ?> |
|
|
|
|
|
|
|
<hr/> |
|
|
|
<div class="page-header"> |
|
|
|
<div class="row"> |
|
|
|
<div class="col-lg-12"> |
|
|
|
<a href="index.php"><img src="../logo/allo-gg-logo.png" class="img-fluid" alt="Responsive image"></a> |
|
|
|
<br/><br/> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<h2 class="text-primary">Interface de contrôle du module</h2> |
|
|
|
<?php $etat = exec("/usr/local/bin/gpio -g read 18"); ?> |
|
|
|
<?php $sonette = exec("/usr/local/bin/gpio -g read 17"); ?> |
|
|
|
<?php $porte = exec("/usr/local/bin/gpio -g read 4"); ?> |
|
|
|
|
|
|
|
<span class="badge badge-pill badge-<?php echo $etat_status[$etat]; ?>"> </span> |
|
|
|
|
|
|
|
<span class="badge badge-pill badge-<?php echo $porte_status[$porte]; ?>"> </span> |
|
|
|
|
|
|
|
<span class="badge badge-pill badge-<?php echo $sonette_status[$sonette]; ?>"> </span> |
|
|
|
<hr/> |
|
|
|
|
|
|
|
<div class="row"> |
|
|
|
<div class="col-lg-12"> |
|
|
|
<p class="bs-component"> |
|
|
|
|
|
|
|
<?php exec(" cat allogg.log &"); ?> |
|
|
|
|
|
|
|
</p> |
|
|
|
<hr/> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<script src="jquery.js"></script> |
|
|
|
<script src="bootstrap.js"></script> |
|
|
|
|
|
|
|
</body> |
|
|
|
</html> |