<?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:20px; margin-top:60px; border-bottom:1px solid #CCC; padding-bottom:20px;"><i class="fas fa-history"></i> Suppression d'une Raspberry</h1>
					<?php
						if(removeRpi($_POST['ip']))
					{
						?>
						<div class="alert alert-success" role="alert">
					     		La Raspberry a bien été supprimée !
						</div>
						<?php
					}
					else
					{
						?>
						<div class="alert alert-danger" role="alert">
					     		Echec lors de la suppression.
						</div>
						<meta http-equiv="Refresh" content="3;url=gestionRaspberry.php" />
						<?php
					}
					?>
        			</div>
			</div>
			<?php
                }
                else
                {
                        include("formConnexion.php");
                }
                ?>
        </body>
</html>

