<?php
$sus_suppr = mysqli_query($bdd,"SELECT * FROM ".$prefix."_freqresref resref INNER JOIN ".$prefix."_eleves eleve ON eleve.eleves_id = resref.eleves_id WHERE resref.todate != '0000-00-00' AND resref.todate < '".date('Y-m-d')."'");
if(mysqli_num_rows($sus_suppr)>0) {
	echo '<p class="signal">'.FREQ_RESA3.'<ul> ';
	foreach ($sus_suppr as $sus_suppr_ele) {
		echo '<li> '.$sus_suppr_ele['prenom'].' '.$sus_suppr_ele['nom'].' ('.$sus_suppr_ele['division'].')</li>';
	}
	echo '</ul></p>';
	mysqli_query($bdd,"DELETE FROM ".$prefix."_freqresref WHERE todate != '0000-00-00' AND todate < '".date('Y-m-d')."'");
}
?>