Blame view

site/recherche.php 2.93 KB
19ae2416   jnduwamu   MAJ du site
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
  <?php
  session_start();
  ?>
  <!DOCTYPE html>
  
  <html>
          <head>
                  <?php include("head.php"); ?>
          </head>
  
          <!-- Contenu du site -->
          <body>
                  <?php 
                  include("header.php");
                  if(isset($_SESSION['Login'], $_SESSION['Password']))
                  {
                          ?>
  			<div class="row">
  			        <div class="col-6 col-md-6 offset-md-3 offset-3">
                  			<br/>
39579493   root   MAJ Site
21
                  			<h1 style="margin-bottom:20px; margin-top:60px; border-bottom:1px solid #CCC; padding-bottom:20px;"><i class="fas fa-history"></i> Historique</h1>
19ae2416   jnduwamu   MAJ du site
22
                  			<table class="table table-striped table-bordered">
49de50a9   grouille   MAJ
23
24
25
26
27
28
29
30
  						<thead class="thead-dark">
                          		        	<th>Nom</th>
                                  			<th>Raspberry</th>
                                  			<th>Type</th>
                                  			<th>Valeur</th>
                                  			<th>Unité</th>
                                  			<th>Date</th>
                          			</thead>
19ae2416   jnduwamu   MAJ du site
31
                          			<tbody>
19ae2416   jnduwamu   MAJ du site
32
33
34
35
36
37
38
39
40
41
                                  			<div id="sensors">
                                          			<?php
  								$name = $_POST['nom'];
  								$type = $_POST['type'];
  								$raspberry = $_POST['raspberry'];
  								$start = $_POST['start-date'];
  								$end = $_POST['end-date'];
  								if(($end == NULL) || ($end < $start)) {$e = date_max(); $end = $e['max'];}
  								else $end = $end." 23:59:59";
  								if($start == NULL) {$s = date_min(); $start = $s['min'];}
6b916214   Guillaume   Test Graphe
42
43
  								else $start = $start."  00:00:00";
  
19ae2416   jnduwamu   MAJ du site
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
  								$history = getHistory($name, $type, $raspberry, $start, $end, $_POST['nombre']);
                                          			foreach($history as $sensor){
                                                  			?>
                                                  			<tr>
                                                          			<td><?php echo $sensor['name'];?></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><?php echo $sensor['date'];?></td>
                                                  			</tr>
                                                  			<?php
                                          			}
                                          			?>
                                  			</div>
                          			</tbody>
                  			</table>
          			</div>
  			</div>
  			<?php
                  }
                  else
                  {
                          include("formConnexion.php");
                  }
                  ?>
          </body>
  </html>