<?php require_once(dirname(__DIR__, 1) . '/config.php');
require_once(BASE_PATH . '/db/idl_connect.php');
echo '<meta charset="utf-8" />';
if(isset($_SESSION['user_droits'])) {
	if($_SESSION['user_droits'][0]!="2")
	{
		echo '<p class="noaccess">'.NOMODULE.'<br><a href="./index.php">'.ACCUEIL.'</a></p>';
	}
	else {
		?><style type="text/css">
		#mev4 { background-color: #fff; }
		#mev4 td { border: 3px #089608 solid; }
		#mev3 td { border:0; }
		</style><?php
		echo '<h1>'.EVALC9.'</h1>
		<h2>'.EVALC10.'</h2>
		<form method="POST" action="./include/pdf_loaders/eval_lots.php" class="padd2">';
			$liste_division = mysqli_query($bdd,"SELECT division FROM ".$prefix."_eleves GROUP BY division ORDER BY division ASC");
			$liste_division_nb = mysqli_num_rows($liste_division);
			$liste_groupe = mysqli_query($bdd,"SELECT groupe_nom FROM ".$prefix."_groupes WHERE groupe_actif = 1 GROUP BY groupe_nom ORDER BY groupe_nom ASC");
			$liste_groupe_nb = mysqli_num_rows($liste_groupe);
			echo '<div class="navleft"><select class="inptxt" name="division[]" multiple size="'.($liste_division_nb+$liste_groupe_nb+1).'"><option></option>';
			while($listed = mysqli_fetch_assoc($liste_division)) {
				echo '<option>'.$listed['division'].'</option>';
			}
			while($listeg = mysqli_fetch_assoc($liste_groupe)) {
				echo '<option>'.$listeg['groupe_nom'].'</option>';
			}
			echo '</select></div>
			<div class="navright"><input class="bouton boutev ajax-load" type="submit" value="'.EVALC11.'" name="divsprint" id="ajax-load" />
			<br>&nbsp; <br><input class="bouton boutev" type="submit" value="'.EVALC12.'" name="elesprint" /></div>
		</form>';
	}
}
else {
	include('include/noaccess.php');
	echo '<br><a href="../index.php">'.ACCUEIL.'</a></p>';
}
?>
