Blame view

site/add.php 1.43 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
21
22
  <?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/>
                  			<h1 style="margin-bottom:50px; margin-top:50px; border-bottom:1px solid #CCC; padding-bottom:20px;"><i class="fas fa-history"></i> Historique</h1>
  					<?php
36ef1f60   Guillaume   MAJ site
23
  						if(add($_POST['nom'], $_POST['type'], $_POST['raspberry'], $_POST['numero'], $_POST['unite'], $_POST['version']))
19ae2416   jnduwamu   MAJ du site
24
  					{
627c235b   Guillaume   MAJ site
25
  						include("ansibleSensor.php");
19ae2416   jnduwamu   MAJ du site
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
  						?>
  						<div class="alert alert-success" role="alert">
  					     		Le capteur a bien été ajouté !
  						</div>
  						<meta http-equiv="Refresh" content="3;url=accueil.php" />
  						<?php
  					}
  					else
  					{
  						?>
  						<div class="alert alert-danger" role="alert">
  					     		Echec lors de l'ajout. Vérifiez vos informations !
  						</div>
  						<meta http-equiv="Refresh" content="3;url=ajoutCapteur.php" />
  						<?php
  					}
  					?>
          			</div>
  			</div>
  			<?php
                  }
                  else
                  {
                          include("formConnexion.php");
                  }
                  ?>
          </body>
  </html>