<?php
if(isset($_SESSION['user_droits'])) {
	if(isset($bdd)) {
		$imenu = mysqli_query($bdd,"SELECT valeur FROM ".$prefix."_parametres WHERE param_nom = 'info_menu'");
		$imenu_info = mysqli_fetch_assoc($imenu);
	}
	$droits = $_SESSION['user_droits'];
	$verif_droits_grey = strtolower($droits);
	$verif_droits_eval = substr($verif_droits_grey, 0, 1);
		if ($verif_droits_eval=="2") {
			echo '<td id="td_eval" class="'.$smart.'"><a href="eval.php" class="'.$smart.'"><img '; 
				if(@$imenu_info['valeur']==1) { echo 'title="'.EVALT.'" '; } 
				echo 'src="img/nav/ok.png" alt="eval" /></a></td>';
		}
	$verif_droits_edit = substr($verif_droits_grey, 1, 1);
		if ($verif_droits_edit=="2") {
			echo '<td id="td_edit" class="'.$smart.'"><a href="edit.php" class="'.$smart.'"><img '; 
				if(@$imenu_info['valeur']==1) { echo 'title="'.SEQUT.'" '; } 
				echo 'src="img/nav/edit.png" alt="edit" /></a></td>';
		}
	$verif_droits_edt = substr($verif_droits_grey, 2, 1);
		if ($verif_droits_edt>1) {
			echo '<td id="td_edt" class="'.$smart.'"><a href="edt.php" class="'.$smart.'"><img '; 
				if(@$imenu_info['valeur']==1) { echo 'title="'.EDTT.'" '; } 
				echo 'src="img/nav/edt.png" alt="edt" /></a></td>';
		}
	$verif_droits_freq = substr($verif_droits_grey, 3, 1);
		if ($verif_droits_freq!=1) {
			echo '<td id="td_freq" class="'.$smart.'"><a href="freq.php" class="'.$smart.'"><img '; 
				if(@$imenu_info['valeur']==1) { echo 'title="'.FREQT.'" '; } 
				echo 'src="img/nav/freq.png" alt="freq" /></a></td>';
		}
	$verif_droits_data = substr($verif_droits_grey, 5, 1);
		if ($verif_droits_data>1) {
			echo '<td id="td_data" class="'.$smart.'"><a href="database.php" class="'.$smart.'"><img '; 
				if(@$imenu_info['valeur']==1) { echo 'title="'.DATAT.'" '; } 
				echo 'src="img/nav/eleves.png" alt="data" /></a></td>';
		}
	$verif_droits_param = substr($verif_droits_grey, 4, 1);
		if ($verif_droits_param=="2") {
			echo '<td id="td_param" class="'.$smart.'"><a href="param.php" class="'.$smart.'"><img '; 
				if(@$imenu_info['valeur']==1) { echo 'title="'.PARAT.'" '; } 
				echo 'src="img/nav/misc.png" alt="param" /></a></td>';
		}
	echo '<td id="td_aide" class="'.$smart.'"><a href="aide.php" class="'.$smart.'"><img '; 
		if(isset($imenu_info['valeur'])) { if($imenu_info['valeur']==1) { echo 'title="'.TUTOT.'" '; } }
		echo 'src="img/nav/help.png" alt="aide" /></a></td>';
}
else if(@$reserv_could['valeur']==2&&isset($_SESSION['userres_droits'])) {
	if($seqsvisu['valeur']=='1') {
		echo '<td id="td_eval" class="'.$smart.'"><a href="reserver.php?page=evals" class="'.$smart.'"><img '; 
		if(@$imenu_info['valeur']==1) { echo 'title="'.EVALT.' & '.SEQUT.'" '; } 
		echo 'src="img/nav/ok.png" alt="eval" /></a></td>';
		echo '<td id="td_freq" class="'.$smart.'"><a href="reserver.php" class="'.$smart.'"><img '; 
		if(@$imenu_info['valeur']==1) { echo 'title="'.RESA6.'" '; } 
		echo 'src="img/nav/freq.png" alt="freq" /></a></td>';
	}
}
echo '<td id="td_exit" class="'.$smart.'"><a href="db/deconnect.php" class="'.$smart.'"><img '; 
if(isset($imenu_info['valeur'])) { if($imenu_info['valeur']==1) { echo 'title="'.DECONNECT.'" '; } }
echo 'src="img/nav/exit.png" alt="deconnexion" /></a></td>';;
?>