<?php
if(!isset($_SESSION["etudiant_i"]) OR !isset($_SESSION["eta_i"])){
	header("Location:index.php");
}
include_once('Library/Identite.php');
$DB_DATABASE = $_SESSION["DB_DATABASE"];
$idetudiant=$_SESSION["etudiant_i"];
$idEtablissement = $_SESSION['eta_i'];

$identite= new Identite($DB_DATABASE);
$infoEtudiant= $identite->getEtudiant($idetudiant,$idEtablissement);
$cheminPhoto = $infoEtudiant['cheminPhoto'];

	echo('<a class="dropdown-toggle profile-pic" data-toggle="dropdown" href="javascript:void(0)"> <img src="'.$cheminPhoto.'" alt="user-img" width="36" class="img-circle"><b class="hidden-xs">'.$infoEtudiant['prenom'].'</b><span class="caret"></span> </a>
	<ul class="dropdown-menu dropdown-user animated flipInY">
					<li>
							<div class="dw-user-box">
									<div class="u-img"><img src="'.$cheminPhoto.'" alt="user"  class="img-circle" /></div>
									<div class="u-text">
											<h4>'.$infoEtudiant['nom'].'  '.$infoEtudiant['prenom'].'</h4> 
											<h5 class="text-info">'.$infoEtudiant['groupe_academique'].'</h5>
											<p class="text-muted">'.$email1.'</p><a href="profile.php" class="btn btn-rounded btn-danger btn-sm">View Profile</a></div>
							</div>
							
					</li>
					<li role="separator" class="divider"></li>
					<li><a href="deconnexion.php"><i class="fa fa-power-off"></i> Déconnexion</a></li>;

	</ul>');
?>
