$row = mysqli_fetch_array($result);
 //elements
 $titresession = getTitreSession($row["nom_session"]);
 //test de validation en cours des dates de la session pour permettre ou non la suppression
 $testvalidation = getSessionvalidees($row["id_session"]);
 $salle = mysqli_fetch_array(getSalle($row["id_salle"]));
 $lieu = $salle["nom_salle"] . " <br>(" . $espaces[$salle["id_espace"]] . ")";
 if ($row["date_session"] < date('Y-m-d')) {
     $statutaffiche = $row["nbre_dates_sessions"] . "&nbsp;&nbsp;<small class=\"badge bg-blue\" data-toggle=\"tooltip\" title=\"Des dates de la session n'ont pas encore été validées !\"><i class=\"fa fa-info\"></i></small>";
     $class = "text-red";
 } else {
     $class = "";
     $statutaffiche = $row["nbre_dates_sessions"];
 }
 //affichage de toutes les dates de la session
 $datesarray = getDatesSession($row["id_session"]);
 $nbrdates = $row["nbre_dates_sessions"];
 $listedatess = '';
 for ($f = 0; $f < $nbrdates; $f++) {
     $rowdates = mysqli_fetch_array($datesarray);
     $dd = date_create($rowdates["date_session"]);
     $listedatess = $listedatess . date_format($dd, "Y/m/d H:i") . "</br>";
 }
 //nombre de places pour la session
 $placesoccupee = countPlaceSession($row["id_session"], 0);
 $nbplace = $row["nbplace_session"];
 $enattente = countPlaceSession($row["id_session"], 2);
 //$placesrestantes=$nbplace-$placesoccupee;
 //debug($datesSession);
 echo "<tr class=" . $class . "> \n\t\t\t\t\t <td><small>" . $listedatess . "</small></td>\n\t\t\t\t\t \n\t\t\t\t\t <td><a href=\"index.php?a=30&b=1&idsession=" . $row["id_session"] . "\">" . $titresession["session_titre"] . "</a>";
 if ($nbplace == $placesoccupee) {
            echo $row2['id_user'];
            ?>
&idsession=<?php 
            echo $idsession;
            ?>
" class="btn bg-red  btn-sm" data-toggle="tooltip" title="d&eacute;sinscrire"><i class="fa fa-trash-o"></i></a></td>
				 </tr>
             <?php 
        }
        ?>
		 
        </tbody></table></div>
		<!-- VALIDATION DES PRESENTS INSCRITS -->
		<div class="box-footer">
		<?php 
        $datesarray = getDatesSession($idsession);
        for ($z = 1; $z <= $nbrdates; $z++) {
            $rowd = mysqli_fetch_array($datesarray);
            if ($rowd["statut_datesession"] == 0) {
                echo '<p></p><a href="index.php?a=32&act=0&idsession=' . $idsession . '&dateid=' . $rowd["id_datesession"] . '&numerod=' . ($z - 1) . ' "><input type="submit" value="Valider les pr&eacute;sences pour le ' . getDayFr($rowd["date_session"]) . '" class="btn btn-block bg-olive"></a>';
            } else {
                if ($rowd["statut_datesession"] == 1) {
                    echo '<p></p><input type="submit" value="Atelier du ' . getDayFr($rowd["date_session"]) . ' clotur&eacute;" class="btn btn-block bg-maroon" disabled/>';
                } else {
                    if ($rowd["statut_datesession"] == 2) {
                        echo '<p></p><input type="submit" value="Atelier du ' . getDayFr($rowd["date_session"]) . ' Annul&eacute;" class="btn btn-block bg-orange" disabled/>';
                    }
                }
            }
        }
        ?>