graphique.php
1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
session_start();
$nom = $_POST['nom'];
$nombre = $_POST['nombre'];
$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'];}
else $start = $start." 00:00:00";
?>
<!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-8 col-md-8 offset-md-2 offset-2">
<br/>
<h1 style="margin-bottom:20px; margin-top:30px; border-bottom:1px solid #CCC; padding-bottom:20px;"><i class="fas fa-chart-line"></i> Graphe du capteur</h1>
<br/>
<img src="graphe.php?nom=<?php echo $nom;?>&nombre=<?php echo $nombre;?>&start=<?php echo $start;?>&end=<?php echo $end;?>" alt="graphe">
</div>
</div>
<?php
}
else
{
include("formConnexion.php");
}
?>
</body>
</html>