<?php
include('include/entete.php');

//Acces admin
if(isset($_SESSION['adm_co']) && $_SESSION['adm_co']==1){
	header('location:index-adm.php');
		  exit();
}
//Acces consultation (uniquement la boite à outils)
if(isset($_SESSION['adm_autre']) && $_SESSION['adm_autre']==1){
	header('location:bao-all.php');
		  exit();
}


?>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>FAFIH - DECIDAY</title>
<script type="text/javascript" src="js/jquery-3.2.1.min.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<script type="text/javascript" src="js/fonctions.js"></script>
<link href="css/bootstrap.min.css" rel="stylesheet" type="text/css">
<link href="css/style.css" rel="stylesheet" type="text/css">
<script>
function valid_co(){
	if(document.frmCo.identifiant.value==""){
		alert('Merci de renseigner votre identifiant.');
		document.frmCo.identifiant.focus();
		return false;
	}
	if(document.frmCo.mdp.value==""){
		alert('Merci de renseigner votre mot de passe.');
		document.frmCo.mdp.focus();
		return false;
	}
	return true;
}	
jQuery(document).ready(function(){
	document.frmCo.identifiant.focus();
});
</script>
																			
</head>

<body>
	<?php include('include/header.php');?>
	
	
	<div class="container contentPage">
		<div class="col-lg-2 col-md-2 col-sm-1 hidden-xs bgTitrePage"></div>
		<div class="col-lg-8 col-md-8 col-sm-10 col-xs-12 titreContenuPage">Identification</div>
		<div class="col-lg-2 col-md-2 col-sm-1 hidden-xs bgTitrePage"></div>
		<div class="clearfix"></div>
	</div>
	
	<div class="container contentPage">

		<form name="frmCo" id="frmCo" method="post" action="actions-adm.php" onSubmit="return valid_co();">
			<div class="labFrm">Identifiant :</div>
			<input type="text" name="identifiant" id="identifiant" /><br />
			<div class="labFrm">Mot de passe : </div>
			<input type="password" name="mdp" id="mdp" /><br />
			<input type="hidden" name="action" value="go_co" />
			<input type="submit" value="Connexion">

		</form>
		
	</div>
	
	<?php include('include/footer.php');?>
</body>
</html>