<?php 
	if(!isset($_POST['psw'])){
?>

<!DOCTYPE html>
<html>
    <head>
        <title>Connexion administration</title>
        <meta charset="utf-8" />
		<link rel="stylesheet" href="bibliotheque.css" />	
		<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>	
    </head>
    <body>
	    
		<div class="administration">
		<p>
			Identifiez vous pour avoir accès à la page
		</p>
	
		<form method="post" action="connexion.php">
			<label>Mot de passe : </label>
			<input type="password" name="psw" />
			<br /> 
			<input name="valider" type="submit" value="valider" id="valider" />
		</form>
		</div>
	
    </body>
</html>

<?php		
	}elseif($_POST['psw'] != "maude"){
?>
<html>
    <head>
        <title>Connexion administration</title>
        <meta charset="utf-8" />
		<link rel="stylesheet" href="bibliotheque.css" />	
		<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>	
    </head>
    <body>
	
	    <div class="administration">
			<p>
				Mauvais mot de passe !
				<br />
				<a href="connexion.php">Retenter</a> ou <a href="page_accueil.php">revenir à la page d'accueil</a>
			</p>
		</div>
    </body>
</html>	


<?php		
	}
	else{
		header('Location: administration.php');
		exit();
	}
?>