query($query); // Display all documents information // Fini le div et met le bouton uniquement // quand on finit d'itérer un ensemble donné $ens_id = -1; while($row = $result->fetch_assoc()) { if (($row["ensemble_id"] != $ens_id) && ($ens_id != -1) ) { echo "

Valider l'ensemble

"; echo "

Supprimer l'ensemble

"; echo ""; $ens_id = $row["ensemble_id"]; } // initialisation pour la première itération if ($ens_id == -1){ $ens_id = $row["ensemble_id"]; } echo "
"; echo "

{$row['titre']}

"; echo "

Type: {$row['type']}

"; echo "

Upload Path: {$row['upload_path']}

"; echo "

Ensemble ID: {$row['ensemble_id']}

"; $extension = pathinfo($row['upload_path'], PATHINFO_EXTENSION); if (strtolower($extension) === 'pdf'): echo ""; elseif (in_array(strtolower($extension), ['jpg', 'jpeg', 'png', 'gif'])): echo ""; elseif (strtolower($extension) == "html"): echo(""); else: echo "

Unsupported file type

".$row['upload_path']; endif; echo "

Theme ID: {$row['theme_id']}

"; } // complète le formulaire du dernier ensemble itéré echo "

Valider l'ensemble

"; echo "

Supprimer l'ensemble

"; echo "
"; } ?>

Validation des documents

script($context='supprimer_ensemble', $name='jeton_supprimer_ensemble', $declaration='var', $time2Live=-1, $max_hashes=5); echo $csrf->script($context='valider_ensemble', $name='jeton_valider_ensemble', $declaration='var', $time2Live=-1, $max_hashes=5); include "_partials/_footer.php"; ?>