<?php
echo '<form method="POST" name="briksup" action="edt.php?page=briques#listecla">';

echo DATAEXP1.' <div class="box"><select name="division" id="check1'.$briksup['brik_id'].'" value="">';
$liste_division = mysqli_query($bdd,"SELECT division FROM ".$prefix."_eleves GROUP BY division ORDER BY division ASC");
while($listed = mysqli_fetch_assoc($liste_division)) {
	echo '<option';
	if($briksup['division']==$listed['division']) { echo ' selected '; }
	echo '>'.$listed['division'].'</option>';
}
$liste_groupe = mysqli_query($bdd,"SELECT groupe_nom FROM ".$prefix."_groupes GROUP BY groupe_nom ORDER BY groupe_nom ASC");
while($listeg = mysqli_fetch_assoc($liste_groupe)) {
	echo '<option';
	if(@$briksup['division']==@$listeg['groupe_nom']) { echo ' selected '; }
	echo '>'.$listeg['groupe_nom'].'</option>';
}
echo '</select></div>

<br>'.CODE2.' <div class="box"><select name="code" id="check2'.$briksup['brik_id'].'" value=""><option></option>';
$liste_code = mysqli_query($bdd,"SELECT code, nom FROM ".$prefix."_edtcode ORDER BY code ASC");
while($listec = mysqli_fetch_assoc($liste_code)) {
	echo '<option value="'.$listec['code'].'"';
	if($briksup['code']==$listec['code']) { echo ' selected '; }
	echo '>'.$listec['code'].'</option>';
}
echo '</select></div>

<br>'.RESUME.' <textarea rows="3" cols="30" name="summary" id="check3'.$briksup['brik_id'].'" value="">'.$briksup['summary'].'</textarea>

<br>'.SEQU2.' <div class="box"><select name="sequence" id="check4'.$briksup['brik_id'].'" value="">';
$seq = mysqli_query($bdd,"SELECT seq_id, seq_nom, SUBSTR(seq_nom,1,20), SUBSTR(seq_nom,1,13), niveau FROM ".$prefix."_sequences WHERE seq_id ='".$briksup['seq_id']."'");
$seq_info = mysqli_fetch_assoc($seq);
$seq_nomaff = mb_ereg_replace("[?]","",mb_convert_encoding($seq_info['SUBSTR(seq_nom,1,13)'],"utf-8"));
$seq_nomaffopt = mb_ereg_replace("[?]","",mb_convert_encoding($seq_info['SUBSTR(seq_nom,1,20)'],"utf-8"));
echo '<option></option>';
$liste_sequence = mysqli_query($bdd,"SELECT seq_id, seq_nom, SUBSTR(seq_nom,1,20), SUBSTR(seq_nom,1,20), niveau FROM ".$prefix."_sequences ORDER BY niveau DESC, seq_nom ASC");
while($listes = mysqli_fetch_assoc($liste_sequence)) {
	echo '<option value="'.$listes['seq_id'].'"';
	if(@$seq_info['seq_id']==@$listes['seq_id']) { echo ' selected '; }
	echo '>';
	if($listes['niveau']=='6') { echo '6ème'; }
	else if($listes['niveau']=='5') { echo '5ème'; }
	else if($listes['niveau']=='4') { echo '4ème'; }
	else if($listes['niveau']=='3') { echo '3ème'; }
	else if($listes['niveau']=='2') { echo '2nde'; }
	else if($listes['niveau']=='1') { echo '1re'; }
	else if($listes['niveau']=='t') { echo 'Tale'; }
	else if($listes['niveau']=='a') { echo 'Autre'; }
	$listeseq_nomaff = mb_ereg_replace("[?]","",mb_convert_encoding($listes['SUBSTR(seq_nom,1,20)'],"utf-8"));
	echo ' : '.$listeseq_nomaff.'...</option>';
}
echo '</select></div>';
echo '<input type="hidden" value="'.$briksup['brik_id'].'" name="brikid" />';
echo '<input class="bouton boutedt" type="submit" value="'.VALID.'" name="brikmodif" />';
echo '</form>';
?>