<?php
if($ccr_info['valeur']=="niveau") {
	if($deb_diveval=="5") { 
		//on regarde si 6è
		$eval6e = mysqli_query($bdd,"SELECT * FROM ".$prefix."_savele WHERE eleves_id = '$eleve_id' AND (s_id LIKE 'APD6%' OR s_id LIKE 'EMI6%' OR s_id LIKE 'PER6%')");
		$eval6e_nb = mysqli_num_rows($eval6e);
		if($eval6e_nb!=0) {
			// Récupération des données :
			$divpast=6;
			$float='left';
			include('eval_select_elepast_savchoix.php');
			include('eval_select_elepast_table.php');
		}
	}
	else if($deb_diveval=="4") { 
		//on regarde si 5è
		$eval5e = mysqli_query($bdd,"SELECT * FROM ".$prefix."_savele WHERE eleves_id = '$eleve_id' AND (s_id LIKE 'APD5%' OR s_id LIKE 'EMI5%' OR s_id LIKE 'PER5%')");
		$eval5e_nb = mysqli_num_rows($eval5e);
		if($eval5e_nb!=0) {
			// Récupération des données :
			$divpast=5;
			$float='left';
			include('eval_select_elepast_savchoix.php');
			include('eval_select_elepast_table.php');
		}
		//on regarde si 6è
		$eval6e = mysqli_query($bdd,"SELECT * FROM ".$prefix."_savele WHERE eleves_id = '$eleve_id' AND (s_id LIKE 'APD6%' OR s_id LIKE 'EMI6%' OR s_id LIKE 'PER6%')");
		$eval6e_nb = mysqli_num_rows($eval6e);
		if($eval6e_nb!=0) {
			// Récupération des données :
			$divpast=6;
			$float='right';
			include('eval_select_elepast_savchoix.php');
			include('eval_select_elepast_table.php');
		}
	}
	else if($deb_diveval=="3") { 
		//on regarde si 4è
		$eval4e = mysqli_query($bdd,"SELECT * FROM ".$prefix."_savele WHERE eleves_id = '$eleve_id' AND (s_id LIKE 'APD4%' OR s_id LIKE 'EMI4%' OR s_id LIKE 'PER4%')");
		$eval4e_nb = mysqli_num_rows($eval4e);
		if($eval4e_nb!=0) {
			// Récupération des données :
			$divpast=4;
			$float='left';
			include('eval_select_elepast_savchoix.php');
			include('eval_select_elepast_table.php');
		}
		//on regarde si 5è
		$eval5e = mysqli_query($bdd,"SELECT * FROM ".$prefix."_savele WHERE eleves_id = '$eleve_id' AND (s_id LIKE 'APD5%' OR s_id LIKE 'EMI5%' OR s_id LIKE 'PER5%')");
		$eval5e_nb = mysqli_num_rows($eval5e);
		if($eval5e_nb!=0) {
			// Récupération des données :
			$divpast=5;
			$float='right';
			include('eval_select_elepast_savchoix.php');
			include('eval_select_elepast_table.php');
		}
	}
	else if($deb_diveval=="2") { 
		//on regarde si 3è
		$eval3e = mysqli_query($bdd,"SELECT * FROM ".$prefix."_savele WHERE eleves_id = '$eleve_id' AND (s_id LIKE 'APD3%' OR s_id LIKE 'EMI3%' OR s_id LIKE 'PER3%')");
		$eval3e_nb = mysqli_num_rows($eval3e);
		if($eval3e_nb!=0) {
			// Récupération des données :
			$divpast=3;
			$float='left';
			include('eval_select_elepast_savchoix.php');
			include('eval_select_elepast_table.php');
		}
		//on regarde si 4è
		$eval4e = mysqli_query($bdd,"SELECT * FROM ".$prefix."_savele WHERE eleves_id = '$eleve_id' AND (s_id LIKE 'APD4%' OR s_id LIKE 'EMI4%' OR s_id LIKE 'PER4%')");
		$eval4e_nb = mysqli_num_rows($eval4e);
		if($eval4e_nb!=0) {
			// Récupération des données :
			$divpast=4;
			$float='right';
			include('eval_select_elepast_savchoix.php');
			include('eval_select_elepast_table.php');
		}
	}
	else if($deb_diveval=="1") { 
		//on regarde si 2nde
		$eval2e = mysqli_query($bdd,"SELECT * FROM ".$prefix."_savele WHERE eleves_id = '$eleve_id' AND (s_id LIKE 'APD2%' OR s_id LIKE 'EMI2%' OR s_id LIKE 'PER2%')");
		$eval2e_nb = mysqli_num_rows($eval2e);
		if($eval2e_nb!=0) {
			// Récupération des données :
			$divpast=2;
			$float='left';
			include('eval_select_elepast_savchoix.php');
			include('eval_select_elepast_table.php');
		}
		//on regarde si 3è
		$eval3e = mysqli_query($bdd,"SELECT * FROM ".$prefix."_savele WHERE eleves_id = '$eleve_id' AND (s_id LIKE 'APD3%' OR s_id LIKE 'EMI3%' OR s_id LIKE 'PER3%')");
		$eval3e_nb = mysqli_num_rows($eval3e);
		if($eval3e_nb!=0) {
			// Récupération des données :
			$divpast=3;
			$float='right';
			include('eval_select_elepast_savchoix.php');
			include('eval_select_elepast_table.php');
		}
	}
	else { 
		//on regarde si 1re
		$eval1e = mysqli_query($bdd,"SELECT * FROM ".$prefix."_savele WHERE eleves_id = '$eleve_id' AND (s_id LIKE 'APD1%' OR s_id LIKE 'EMI1%' OR s_id LIKE 'PER1%')");
		$eval1e_nb = mysqli_num_rows($eval1e);
		if($eval1e_nb!=0) {
			// Récupération des données :
			$divpast=1;
			$float='left';
			include('eval_select_elepast_savchoix.php');
			include('eval_select_elepast_table.php');
		}
		//on regarde si 2nde
		$eval2e = mysqli_query($bdd,"SELECT * FROM ".$prefix."_savele WHERE eleves_id = '$eleve_id' AND (s_id LIKE 'APD2%' OR s_id LIKE 'EMI2%' OR s_id LIKE 'PER2%')");
		$eval2e_nb = mysqli_num_rows($eval2e);
		if($eval2e_nb!=0) {
			// Récupération des données :
			$divpast=2;
			$float='right';
			include('eval_select_elepast_savchoix.php');
			include('eval_select_elepast_table.php');
		}
	}
}
?>
