case 'afficherTutoriel': $idTutoriel = intval($_GET['idTutoriel']); $cours = new Cours($idTutoriel); break; } tpl_begin(); switch ($action) { case 'voirArborescence': $cours = new Cours(); $cours->racine()->elements_enfants_arborescence(); break; case 'afficherTutoriel': $cours->affiche_cours(); break; case 'voirListeTous': $dataCours = $cours->recupere_cours(); ?> <table> <tr> <th>Nom</th> <th>Actions</th> </tr> <?php foreach ($dataCours as $v) { echo '<tr><td>'; echo '<a href="?action=afficherTutoriel&idTutoriel=' . $v->getId() . '">' . $v->affiche_inline() . '</a>'; echo '</td>'; echo '<td><a href="?action=deplacerTutoriel&idTutoriel=' . $v->getId() . '">Déplacer</a>, <a href="?action=modifierTutoriel&idTutoriel=' . $v->getId() . '">Modifier</a>, <a href="?action=supprimerTutoriel&idTutoriel=' . $v->getId() . '">Supprimer</a></td></tr>'; } ?> </table>