You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

73 lines
1.9 KiB

  1. <!DOCTYPE html>
  2. <html lang="fr">
  3. <head>
  4. <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  5. <meta charset="utf-8">
  6. <title>Allo-GG</title>
  7. <meta name="viewport" content="width=device-width, initial-scale=1">
  8. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  9. <link rel="stylesheet" href="bootstrap.css" media="screen">
  10. </head>
  11. <?php
  12. $etat_status[0]='success';
  13. $etat_status[1]='light';
  14. $porte_status[0]='info';
  15. $porte_status[1]='light';
  16. $sonette_status[0]='danger';
  17. $sonette_status[1]='light';
  18. ?>
  19. <body>
  20. <div class="container" style="text-align:center;">
  21. <?php echo $message[$_GET["msg"]]; ?>
  22. <hr/>
  23. <div class="page-header">
  24. <div class="row">
  25. <div class="col-lg-12">
  26. <a href="index.php"><img src="../logo/allo-gg-logo.png" class="img-fluid" alt="Responsive image"></a>
  27. <br/><br/>
  28. </div>
  29. </div>
  30. </div>
  31. <h2 class="text-primary">Journal d'activité du module</h2>
  32. <?php $etat = exec("/usr/local/bin/gpio -g read 18"); ?>
  33. <?php $sonette = exec("/usr/local/bin/gpio -g read 17"); ?>
  34. <?php $porte = exec("/usr/local/bin/gpio -g read 4"); ?>
  35. <span class="badge badge-pill badge-<?php echo $etat_status[$etat]; ?>">&nbsp;</span>
  36. &nbsp;
  37. <span class="badge badge-pill badge-<?php echo $porte_status[$porte]; ?>">&nbsp;</span>
  38. &nbsp;
  39. <span class="badge badge-pill badge-<?php echo $sonette_status[$sonette]; ?>">&nbsp;</span>
  40. <hr/>
  41. <div class="row">
  42. <div class="col-lg-3"></div>
  43. <div class="col-lg-9">
  44. <p class="bs-component">
  45. <?php
  46. $log=file_get_contents('allo-gg.log');
  47. echo '<pre style="text-align:left;">'.$log.'</pre>';
  48. ?>
  49. </p>
  50. </div>
  51. </div>
  52. <hr/>
  53. </div>
  54. <script src="jquery.js"></script>
  55. <script src="bootstrap.js"></script>
  56. </body>
  57. </html>