diff --git a/TP4/ex1/controller/ControleurAdherent.php b/TP4/ex1/controller/ControleurAdherent.php
index 7d80d9c265b757d991724bf27a0370899ac26420..8373cf5f2d84bb29f0a1adbde8f236fc2ac6b7d8 100644
--- a/TP4/ex1/controller/ControleurAdherent.php
+++ b/TP4/ex1/controller/ControleurAdherent.php
@@ -37,7 +37,7 @@ class ControleurAdherent
         }
         $adherent = Adherent::getAdherentByLogin($_GET["login"]);
         return view('simple-data', [
-            'pageTitle' => 'Information du libre',
+            'pageTitle' => 'Information du livre',
             'pageContent' => $adherent->afficher()
         ]);
     }
diff --git a/TP4/ex1/controller/ControleurAuteur.php b/TP4/ex1/controller/ControleurAuteur.php
index 694801e3c6d3b691c75a94bf00198dd506bba2ba..7f648d6af10d4ab0678c61561972004a82a84f1a 100644
--- a/TP4/ex1/controller/ControleurAuteur.php
+++ b/TP4/ex1/controller/ControleurAuteur.php
@@ -39,7 +39,7 @@ class ControleurAuteur
         }
         $auteur = Auteur::getAuteurByNum($_GET["numAuteur"]);
         return view('simple-data', [
-            'pageTitle' => 'Information du libre',
+            'pageTitle' => 'Information du livre',
             'pageContent' => $auteur->afficher()
         ]);
     }
diff --git a/TP4/ex1/controller/ControleurLivre.php b/TP4/ex1/controller/ControleurLivre.php
index 6cf4d2ab57c7dbbdbf7a3a1c26ca42bbaa7763e5..3d5b0d983a794a78f8bf2a96b9684673ddbf5e3e 100644
--- a/TP4/ex1/controller/ControleurLivre.php
+++ b/TP4/ex1/controller/ControleurLivre.php
@@ -39,7 +39,7 @@ class ControleurLivre
         $livre = Livre::getLivreByNumLivre($_GET["numLivre"]);
 
         return view('simple-data', [
-            'pageTitle' => 'Information du libre',
+            'pageTitle' => 'Information du livre',
             'pageContent' => $livre->afficher()
         ]);
     }
diff --git a/TP5/controller/ControleurAdherent.php b/TP5/controller/ControleurAdherent.php
index 7b9744640d3fcf8cd9bbfb9970d3e22d7e6fe525..90089f045c7d2b45c8442a1841e820f7e8963532 100644
--- a/TP5/controller/ControleurAdherent.php
+++ b/TP5/controller/ControleurAdherent.php
@@ -39,7 +39,7 @@ class ControleurAdherent extends ControleurObjet
         }
         $adherent = Adherent::getAdherentByLogin($_GET["login"]);
         return view('simple-data', [
-            'pageTitle' => 'Information du libre',
+            'pageTitle' => 'Information du livre',
             'pageContent' => $adherent->afficher()
         ]);
     }
diff --git a/TP5/controller/ControleurAuteur.php b/TP5/controller/ControleurAuteur.php
index 37c589fd808baadbae38b112dcd55ad3b09a311f..fdd9baf049092a29412c458522464d0d06f10c41 100644
--- a/TP5/controller/ControleurAuteur.php
+++ b/TP5/controller/ControleurAuteur.php
@@ -38,7 +38,7 @@ class ControleurAuteur extends ControleurObjet
         }
         $auteur = Auteur::getAuteurByNum($_GET["numAuteur"]);
         return view('simple-data', [
-            'pageTitle' => 'Information du libre',
+            'pageTitle' => 'Information du livre',
             'pageContent' => $auteur->afficher()
         ]);
     }
diff --git a/TP5/test.php b/TP5/test.php
deleted file mode 100644
index 67f33f8c4bf9dc7db3eaaa75b8a620f289b99a2d..0000000000000000000000000000000000000000
--- a/TP5/test.php
+++ /dev/null
@@ -1,3 +0,0 @@
-<?php
-$test = "TESTEUU";
-echo('Ceci est un <?=$test?>!');
\ No newline at end of file
diff --git a/TP6/.env b/TP6/.env
new file mode 100644
index 0000000000000000000000000000000000000000..5200165ceea1a9ce0dc91c381b1043a26518932f
--- /dev/null
+++ b/TP6/.env
@@ -0,0 +1,4 @@
+DB_HOST=localhost
+DB_NAME=iut-dev
+DB_LOGIN=iut-dev-user
+DB_PASSWORD=p73i74KAV8lami2iyIpehE5ozic8GA
diff --git a/TP6/TP6_web.pdf b/TP6/TP6_web.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..1552fc8c46be418e99370219cdaff85deebfec1c
Binary files /dev/null and b/TP6/TP6_web.pdf differ
diff --git a/TP6/app/helpers/config.php b/TP6/app/helpers/config.php
new file mode 100644
index 0000000000000000000000000000000000000000..c4a9e47d21a9f3faace1afdc5a6ccdbcd20c5f29
--- /dev/null
+++ b/TP6/app/helpers/config.php
@@ -0,0 +1,19 @@
+<?php
+/**
+ * @param string $index
+ * @return string
+ */
+function config(string $index) : string
+{
+    $envPath = getcwd() . "/.env";
+    if(file_exists($envPath)){
+        $index = str_replace('_', '\\_', $index);
+        $envFile = file_get_contents($envPath);
+        preg_match("/" . $index . '=(.*?)\n/', $envFile, $matches);
+        $value = $matches[count($matches) - 1];
+        $value = preg_replace('/[^A-Za-z0-9\-]/', '', $value);
+        return $value;
+    } else {
+        return "";
+    }
+}
\ No newline at end of file
diff --git a/TP6/app/helpers/views.php b/TP6/app/helpers/views.php
new file mode 100644
index 0000000000000000000000000000000000000000..2546cdb1d76d4592e6a83c8b497914350cacb3a7
--- /dev/null
+++ b/TP6/app/helpers/views.php
@@ -0,0 +1,12 @@
+<?php
+require_once("app/models/View.php");
+/**
+ * Charge le contenu d'une vue avec des paramètres.
+ * @param string $viewName
+ * @param array $args
+ * @return string
+ */
+function view(string $viewName, array $args = []): string
+{
+    return View::load($viewName, $args);
+}
\ No newline at end of file
diff --git a/TP6/app/models/Database.php b/TP6/app/models/Database.php
new file mode 100644
index 0000000000000000000000000000000000000000..570f4a95f13f261ef74675375eb89a45d95a3348
--- /dev/null
+++ b/TP6/app/models/Database.php
@@ -0,0 +1,39 @@
+<?php
+
+class Database
+{
+    // les attributs static caractéristiques de la connexion
+    static private $hostname = 'localhost';
+    static private $database = 'iut-dev';
+    static private $login = 'iut-dev-user';
+    static private $password = 'p73i74KAV8lami2iyIpehE5ozic8GA';
+
+    static private $tabUTF8 = array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8");
+
+    // l'attribut static qui matérialisera la connexion
+    static private $pdo;
+
+    // le getter public de cet attribut
+    static public function pdo()
+    {
+        return self::$pdo;
+    }
+
+    // la fonction static de connexion qui initialise $pdo et lance la tentative de connexion
+    static public function connect()
+    {
+        $hostname = config("DB_HOST");
+        $database = config("DB_NAME");
+        $login = config("DB_LOGIN");
+        $password = config("DB_PASSWORD");
+        $t = self::$tabUTF8;
+        try {
+            self::$pdo = new PDO("mysql:host=$hostname;dbname=$database", $login, $password, $t);
+            self::$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
+        } catch (PDOException $e) {
+            echo "Erreur de connexion : " . $e->getMessage() . "<br>";
+        }
+    }
+}
+
+?>
diff --git a/TP6/app/models/View.php b/TP6/app/models/View.php
new file mode 100644
index 0000000000000000000000000000000000000000..026feb9efcf27c6d9a360a29ce7a996d7b75f7a1
--- /dev/null
+++ b/TP6/app/models/View.php
@@ -0,0 +1,105 @@
+<?php
+
+/**
+ * Tentative de créer un système de template.
+ */
+class View
+{
+    /**
+     * S'occupe d'ouvrir la template.
+     * @param string $viewName
+     * @param array $args
+     * @return string
+     */
+    public static function load(string $viewName, array $args = []): string
+    {
+        $viewPathParts = explode(".", $viewName);
+        $viewPath = "";
+        foreach ($viewPathParts as $pathPart){
+            $viewPath .= "/" . $pathPart;
+        }
+        $viewPath = "resources/views" . $viewPath . ".php";
+        if(file_exists($viewPath)){
+            return self::render(self::parse($viewPath), $args);
+        }else{
+            return "La vue " . $viewName . " est introuvable.";
+        }
+    }
+
+    /**
+     * S'occuper de remplir la template
+     * @param string $viewPath
+     * @param array $args
+     * @return string
+     */
+    public static function parse(string $viewPath): string
+    {
+        $viewContent = file_get_contents($viewPath);
+
+        // On va chercher le @extends('nom-de-la-vue') (seul le premier est pris en compte)
+        preg_match("/@extends[ ]{0,1}\([\"|'](.*?)[\"|']\)/", $viewContent, $extendMatch);
+        if(!empty($extendMatch)){
+            $contentToPlaceInExtends = str_replace($extendMatch[0], "", $viewContent);
+            $viewContent = self::load($extendMatch[1]);
+
+            // Maintenant on va regarder si on a pas des @yield('nom') à remplacer
+            // On commence avec les @section("nom", "valeur"). L'ordre est important car la second regex peut englober la première.
+            preg_match_all("/@section[ ]{0,1}\([ ]{0,1}[\"|'](.*?)[\"|'][ ]{0,1},[ ]{0,1}[\"|'](.*?)[\"|'][ ]{0,1}\)/",
+                $contentToPlaceInExtends, $inlineSectionMatches);
+            for($i = 0; $i<count($inlineSectionMatches[0]); $i++){
+                $viewContent = preg_replace(
+                    "/@yield[ ]{0,1}\([\"|']" . preg_quote($inlineSectionMatches[1][$i]) . "[\"|']\)/",
+                    $inlineSectionMatches[2][$i],
+                    $viewContent
+                );
+
+                // On supprime la directive dans le contenu mis de côté car la regex du dessous capte aussi celle-ci.
+                $contentToPlaceInExtends = str_replace($inlineSectionMatches[0][$i],
+                    $inlineSectionMatches[2][$i],
+                    $contentToPlaceInExtends);
+            }
+
+            // Et @section("nom") --> @endsection
+            preg_match_all("/@section[ ]{0,1}\([ ]{0,1}[\"|'](.*?)[\"|'][ ]{0,1}\)((\n|.)*?)@endsection/",
+            $contentToPlaceInExtends, $sectionMatches);
+            for($i = 0; $i<count($sectionMatches[0]); $i++){
+                //echo $sectionMatches[1][$i] . " - " . $sectionMatches[2][$i];
+                $viewContent = preg_replace(
+                    "/@yield[ ]{0,1}\([\"|']" . preg_quote($sectionMatches[1][$i]) . "[\"|']\)/",
+                    $sectionMatches[2][$i],
+                    $viewContent
+                );
+            }
+        }
+
+        // On va rechercher toutes les concaténations {{ $var }}
+        $viewContent = preg_replace("/\{\{(.*?)\}\}/", "<?=$1?>", $viewContent);
+
+        // On va rechercher tous les @foreach($var1 as $var2) @endforeach
+        $viewContent = preg_replace("/@foreach[ ]{0,1}\((.*?) as (.*?)\)/",
+            "<?php foreach($1 as $2) { ?>", $viewContent);
+        $viewContent = preg_replace("/@endforeach/", "<?php } ?>", $viewContent);
+
+        // On va rechercher tous les @if(condition) @else @endif
+        $viewContent = preg_replace("/@if[ ]{0,1}\((.*)\)/",
+            "<?php if($1) { ?>", $viewContent);
+        $viewContent = preg_replace("/@else/", "<?php }else{ ?>", $viewContent);
+        $viewContent = preg_replace("/@endif/", "<?php } ?>", $viewContent);
+
+        return $viewContent;
+    }
+
+    /**
+     * @param string $viewCode
+     * @param array $args
+     * @return string
+     */
+    public static function render(string $viewCode, array $args = []): string
+    {
+        extract($args);
+        // On ouvre le buffer pour enregistrer le résultat de l'echo.
+        ob_start();
+        eval("?>" . $viewCode . "<?php");
+        return ob_get_clean();
+    }
+}
\ No newline at end of file
diff --git a/TP6/controller/ControleurAdherent.php b/TP6/controller/ControleurAdherent.php
new file mode 100644
index 0000000000000000000000000000000000000000..90089f045c7d2b45c8442a1841e820f7e8963532
--- /dev/null
+++ b/TP6/controller/ControleurAdherent.php
@@ -0,0 +1,46 @@
+<?php
+require_once "ControleurObjet.php";
+require_once("models/Adherent.php");
+
+class ControleurAdherent extends ControleurObjet
+{
+    protected static string $object = "Adherent";
+    /**
+     * Charge la page de la liste des adhérents.
+     * @return string
+     * @throws Exception
+     */
+    public static function lireAdherents(): string
+    {
+        $adherents = Adherent::getAllAdherents();
+        $objects = [];
+        foreach ($adherents as $adherent){
+            $object['title'] = $adherent->prenomAdherent . " " . $adherent->nomAdherent;
+            $object['desc'] = "ID: {$adherent->login}<br>Date d'adhésion: {$adherent->dateAdhesion->format("Y-m-d")}";
+            $object['url'] = "index.php?action=lireAdherent&login={$adherent->login}";
+            $objects[] = $object;
+        }
+        return view('data-grid', [
+            'pageTitle' => 'Liste des adhérents',
+            'pageDesc' => 'Voici la liste de tous les adhérents',
+            'objects' => $objects
+        ]);
+    }
+
+    /**
+     * Charge la page du détail d'un adhérent.
+     * @return string
+     * @throws Exception
+     */
+    public static function lireAdherent(): string
+    {
+        if (empty($_GET["login"])) {
+            die("Le paramètre login n'est pas spécifié.");
+        }
+        $adherent = Adherent::getAdherentByLogin($_GET["login"]);
+        return view('simple-data', [
+            'pageTitle' => 'Information du livre',
+            'pageContent' => $adherent->afficher()
+        ]);
+    }
+}
\ No newline at end of file
diff --git a/TP6/controller/ControleurAuteur.php b/TP6/controller/ControleurAuteur.php
new file mode 100644
index 0000000000000000000000000000000000000000..e7435431afa7fd5dc584e6f71bb2771c3d876370
--- /dev/null
+++ b/TP6/controller/ControleurAuteur.php
@@ -0,0 +1,66 @@
+<?php
+require_once "ControleurObjet.php";
+require_once("models/Auteur.php");
+
+class ControleurAuteur extends ControleurObjet
+{
+    protected static string $object = "Auteur";
+    /**
+     * Charge la page de la liste des auteurs.
+     * @return string
+     */
+    public static function lireAuteurs() : string
+    {
+        $auteurs = Auteur::getAllAuteurs();
+
+        $objects = [];
+        foreach ($auteurs as $auteur){
+            $object['title'] = $auteur->prenom . " " . $auteur->nom;
+            $object['desc'] = "ID: {$auteur->numAuteur}<br>Date de naissance: {$auteur->anneeNaissance}";
+            $object['url'] = "index.php?action=lireAuteur&numAuteur={$auteur->numAuteur}";
+            $objects[] = $object;
+        }
+        return view('data-grid', [
+            'pageTitle' => 'Liste des auteurs',
+            'pageDesc' => 'Voici la liste de tous les auteurs',
+            'objects' => $objects
+        ]);
+    }
+
+    /**
+     * Charge la page du détail d'un auteur.
+     * @return string
+     */
+    public static function lireAuteur() : string
+    {
+        if (empty($_GET["numAuteur"])) {
+            die("Le paramètre numAuteur n'est pas spécifié.");
+        }
+        $auteur = Auteur::getAuteurByNum($_GET["numAuteur"]);
+        return view('simple-data', [
+            'pageTitle' => 'Information du livre',
+            'pageContent' => $auteur->afficher()
+        ]);
+    }
+
+    public static function creerAuteur() : string
+    {
+        $insertMessage = [];
+        if(!empty($_GET["nom"]) && !empty($_GET["prenom"]) && !empty($_GET["anneeNaissance"])){
+            $insertResult = Auteur::addAuteur($_GET["nom"], $_GET["prenom"], $_GET["anneeNaissance"]);
+            if($insertResult === "success"){
+                $insertMessage["type"] = "success";
+                $insertMessage["text"] = "Auteur créé avec succès !";
+            }else{
+                $insertMessage["type"] = "danger";
+                $insertMessage["text"] = "<b>Erreur lors de la création de l'auteur.</b><br>{$insertResult}";
+            }
+        }
+        return view('formulaire-creation-auteur', [
+            'pageTitle' => 'Créer un auteur',
+            'insertMessage' => $insertMessage
+        ]);
+    }
+}
+
+?>
diff --git a/TP6/controller/ControleurLivre.php b/TP6/controller/ControleurLivre.php
new file mode 100644
index 0000000000000000000000000000000000000000..0f0f651cfe0285eed9b76e2c007d300f21e3b637
--- /dev/null
+++ b/TP6/controller/ControleurLivre.php
@@ -0,0 +1,48 @@
+<?php
+require_once "ControleurObjet.php";
+require_once("models/Livre.php");
+
+class ControleurLivre extends ControleurObjet
+{
+    protected static string $object = "Livre";
+    /**
+     * Charge la page de la liste des adhérents.
+     * @return string
+     * @throws Exception
+     */
+    public static function lireLivres(): string
+    {
+        $livres = Livre::getAllLivres();
+
+        $objects = [];
+        foreach ($livres as $livre){
+            $object['title'] = $livre->titre;
+            $object['desc'] = "ID: {$livre->numLivre}<br>Année de parution: {$livre->anneeParution}";
+            $object['url'] = "index.php?action=lireLivre&numLivre={$livre->numLivre}";
+            $objects[] = $object;
+        }
+        return view('data-grid', [
+            'pageTitle' => 'Liste des livres',
+            'pageDesc' => 'Voici la liste de tous les livres',
+            'objects' => $objects
+        ]);
+    }
+
+    /**
+     * Charge la page du détail d'un adhérent.
+     * @return string
+     * @throws Exception
+     */
+    public static function lireLivre(): string
+    {
+        if (empty($_GET["numLivre"])) {
+            die("Le paramètre numLivre n'est pas spécifié.");
+        }
+        $livre = Livre::getLivreByNumLivre($_GET["numLivre"]);
+
+        return view('simple-data', [
+            'pageTitle' => 'Information du livre',
+            'pageContent' => $livre->afficher()
+        ]);
+    }
+}
\ No newline at end of file
diff --git a/TP6/controller/ControleurObjet.php b/TP6/controller/ControleurObjet.php
new file mode 100644
index 0000000000000000000000000000000000000000..04f34485eedd31828911f013ce59e4c153a7235d
--- /dev/null
+++ b/TP6/controller/ControleurObjet.php
@@ -0,0 +1,15 @@
+<?php
+
+/**
+ * Désolé mais le TP5 est une mauvaise idée de bout en bout.
+ * Je me suis arrêté à l'ex 2 car je ne vois pas comment on pourrait aisément rassembler tous les contrôleurs ici
+ * étant donné que le contenu diffère légèrement selon les modèles.
+ */
+class ControleurObjet
+{
+    public static function lireObjets() : string
+    {
+        $titre = "Listes des " . strtolower(static::$object) . "s";
+        return $titre;
+    }
+}
\ No newline at end of file
diff --git a/TP6/index.php b/TP6/index.php
new file mode 100644
index 0000000000000000000000000000000000000000..0804c198327327e175ab2289aa0ff9354b548fa2
--- /dev/null
+++ b/TP6/index.php
@@ -0,0 +1,60 @@
+<?php
+ini_set('display_errors', 1);
+ini_set('display_startup_errors', 1);
+error_reporting(E_ALL);
+
+require_once("app/helpers/config.php");
+require_once("app/helpers/views.php");
+require_once("app/models/Database.php");
+
+require_once("controller/ControleurAuteur.php");
+require_once("controller/ControleurAdherent.php");
+
+require_once("controller/ControleurLivre.php");
+
+Database::connect();
+
+if (empty($_GET["action"])) {
+    echo ControleurAuteur::lireAuteurs();
+} else {
+    // Test TP 5
+    if ($_GET["action"] === "lireObjets" && !empty($_GET["objet"])) {
+        switch ($_GET["objet"]){
+            case 'Auteur':
+                echo ControleurAuteur::lireObjets();
+                break;
+            default:
+                echo ControleurAuteur::lireObjets();
+                break;
+        }
+    }
+    // Fin test TP5
+
+    // C'est plus long que get_class_methods mais c'est moins sujet à problèmes.
+    switch ($_GET["action"]){
+        case "lireAuteur":
+            echo ControleurAuteur::lireAuteur();
+            break;
+        case "lireAuteurs":
+            echo ControleurAuteur::lireAuteurs();
+            break;
+        case "creerAuteur":
+            echo ControleurAuteur::creerAuteur();
+            break;
+        case "lireAdherent":
+            echo ControleurAdherent::lireAdherent();
+            break;
+        case "lireAdherents":
+            echo ControleurAdherent::lireAdherents();
+            break;
+        case "lireLivre":
+            echo ControleurLivre::lireLivre();
+            break;
+        case "lireLivres":
+            echo ControleurLivre::lireLivres();
+            break;
+        default:
+            echo ControleurAuteur::lireAuteur();
+            break;
+    }
+}
diff --git a/TP6/models/Adherent.php b/TP6/models/Adherent.php
new file mode 100644
index 0000000000000000000000000000000000000000..58668a7f6f7f91b275d599571e2b97ed9d5a928e
--- /dev/null
+++ b/TP6/models/Adherent.php
@@ -0,0 +1,104 @@
+<?php
+require_once "Objet.php";
+
+class Adherent extends Objet
+{
+    protected string $login;
+    protected string $mdp;
+    protected string $nomAdherent;
+    protected string $prenomAdherent;
+    protected string $email;
+    protected DateTime $dateAdhesion;
+    protected int $numCategorie;
+
+    /**
+     * @param string $login
+     * @param string $mdp
+     * @param string $nomAdherent
+     * @param string $prenomAdherent
+     * @param string $email
+     * @param DateTime $dateAdhesion
+     * @param int $numCategorie
+     */
+    public function __construct(string $login, string $mdp, string $nomAdherent, string $prenomAdherent, string $email, DateTime $dateAdhesion, int $numCategorie)
+    {
+        $this->login = $login;
+        $this->mdp = $mdp;
+        $this->nomAdherent = $nomAdherent;
+        $this->prenomAdherent = $prenomAdherent;
+        $this->email = $email;
+        $this->dateAdhesion = $dateAdhesion;
+        $this->numCategorie = $numCategorie;
+    }
+
+    /**
+     * @return array
+     * @throws Exception
+     */
+    public static function getAllAdherents(): array
+    {
+        // écriture de la requête
+        $requete = "SELECT * FROM Adherent;";
+        // envoi de la requête et stockage de la réponse
+        $resultat = Database::pdo()->query($requete);
+        // traitement de la réponse
+        $resultat->setFetchmode(PDO::FETCH_ASSOC);
+        $resultat = $resultat->fetchAll();
+
+        $tableau = array();
+        foreach ($resultat as $row){
+            $tableau[] = new Adherent($row['login'],
+                $row['mdp'],
+                $row['nomAdherent'],
+                $row['prenomAdherent'],
+                $row['email'],
+                new DateTime($row['dateAdhesion']),
+                $row['numCategorie']);
+        }
+        return $tableau;
+    }
+
+    /**
+     * Trouve un adhérent selon son login unique.
+     * @param $login
+     * @return Adherent
+     * @throws Exception
+     */
+    public static function getAdherentByLogin($login) : Adherent
+    {
+        // écriture de la requête
+        $requetePreparee = "SELECT * FROM Adherent WHERE login = :login;";
+        $req_prep = Database::pdo()->prepare($requetePreparee);
+        // le tableau des valeurs
+        $valeurs = array("login" => $login);
+        $response = null;
+        try {
+            // envoi de la requête
+            $req_prep->execute($valeurs);
+            // traitement de la réponse
+            $req_prep->setFetchmode(PDO::FETCH_ASSOC);
+            // récupération de l'auteur
+            $row = $req_prep->fetch();
+            $response = new Adherent($row['login'],
+                $row['mdp'],
+                $row['nomAdherent'],
+                $row['prenomAdherent'],
+                $row['email'],
+                new DateTime($row['dateAdhesion']),
+                $row['numCategorie']);
+
+        } catch (PDOException $e) {
+            echo $e->getMessage();
+        }
+        return $response;
+    }
+
+    /**
+     * @return string
+     */
+    public function afficher(): string
+    {
+        return "<p>" . $this->prenomAdherent . " " . $this->nomAdherent . " a rejoint le "
+            .$this->dateAdhesion->format('Y-m-d H:i:s');
+    }
+}
\ No newline at end of file
diff --git a/TP6/models/Auteur.php b/TP6/models/Auteur.php
new file mode 100644
index 0000000000000000000000000000000000000000..a45a0403844c3defb156fbac47c1f54666444bd3
--- /dev/null
+++ b/TP6/models/Auteur.php
@@ -0,0 +1,80 @@
+<?php
+require_once "Objet.php";
+
+class Auteur extends Objet
+{
+	// attributs
+    protected ?int $numAuteur;
+    protected ?string $nom;
+    protected ?string $prenom;
+    protected ?int $anneeNaissance;
+
+    // getter
+
+    public function __construct($nu = NULL, $n = NULL, $p = NULL, $a = NULL)
+    {
+        if (!is_null($nu)) {
+            $this->numAuteur = $nu;
+            $this->nom = $n;
+            $this->prenom = $p;
+            $this->anneeNaissance = $a;
+        }
+    }
+
+    public static function getAllAuteurs()
+    {
+        // écriture de la requête
+        $requete = "SELECT * FROM Auteur;";
+        // envoi de la requête et stockage de la réponse
+        $resultat = Database::pdo()->query($requete);
+        // traitement de la réponse
+        $resultat->setFetchmode(PDO::FETCH_CLASS, 'Auteur');
+        $tableau = $resultat->fetchAll();
+        return $tableau;
+    }
+
+    public static function getAuteurByNum($numAuteur)
+    {
+        // écriture de la requête
+        $requetePreparee = "SELECT * FROM Auteur WHERE numAuteur = :num_tag;";
+        $req_prep = Database::pdo()->prepare($requetePreparee);
+        // le tableau des valeurs
+        $valeurs = array("num_tag" => $numAuteur);
+        $response = null;
+        try {
+            // envoi de la requête
+            $req_prep->execute($valeurs);
+            // traitement de la réponse
+            $req_prep->setFetchmode(PDO::FETCH_CLASS, 'Auteur');
+            // récupération de l'auteur
+            $response = $req_prep->fetch();
+            // retour
+
+        } catch (PDOException $e) {
+            echo $e->getMessage();
+        }
+        return $response;
+    }
+
+    // méthode static qui retourne un auteur identifié par son numAuteur
+
+    public function afficher()
+    {
+        return "<p>auteur $this->prenom $this->nom, né(e) en $this->anneeNaissance </p>";
+    }
+
+    public static function addAuteur($nom, $prenom, $anneeNaissance){
+        $query = Database::pdo()->prepare("INSERT INTO Auteur(nom, prenom, anneeNaissance) VALUES (:nom, :prenom, :anneeNaissance)");
+        try{
+            $query->execute([
+                "nom" => $nom,
+                "prenom" => $prenom,
+                "anneeNaissance" => $anneeNaissance
+            ]);
+            return "success";
+        } catch (PDOException $e){
+            return $e;
+        }
+    }
+}
+
diff --git a/TP6/models/Categorie.php b/TP6/models/Categorie.php
new file mode 100644
index 0000000000000000000000000000000000000000..cc90eab92b835a565e0cfa153aae7225cd447326
--- /dev/null
+++ b/TP6/models/Categorie.php
@@ -0,0 +1,78 @@
+<?php
+
+/**
+ *
+ */
+class Categorie
+{
+    private int $numCategorie;
+    private string $libelle;
+    private int $nbLivresAutorises;
+
+    /**
+     * @param int $numCategorie
+     * @param string $libelle
+     * @param int $nbLivresAutorises
+     */
+    public function __construct(int $numCategorie, string $libelle, int $nbLivresAutorises)
+    {
+        $this->numCategorie = $numCategorie;
+        $this->libelle = $libelle;
+        $this->nbLivresAutorises = $nbLivresAutorises;
+    }
+
+    /**
+     * @return int
+     */
+    public function getNumCategorie(): int
+    {
+        return $this->numCategorie;
+    }
+
+    /**
+     * @param int $numCategorie
+     */
+    public function setNumCategorie(int $numCategorie): void
+    {
+        $this->numCategorie = $numCategorie;
+    }
+
+    /**
+     * @return string
+     */
+    public function getLibelle(): string
+    {
+        return $this->libelle;
+    }
+
+    /**
+     * @param string $libelle
+     */
+    public function setLibelle(string $libelle): void
+    {
+        $this->libelle = $libelle;
+    }
+
+    /**
+     * @return int
+     */
+    public function getNbLivresAutorises(): int
+    {
+        return $this->nbLivresAutorises;
+    }
+
+    /**
+     * @param int $nbLivresAutorises
+     */
+    public function setNbLivresAutorises(int $nbLivresAutorises): void
+    {
+        $this->nbLivresAutorises = $nbLivresAutorises;
+    }
+
+    /**
+     * @return void
+     */
+    public function afficher(): void{
+        echo "<p>Le livre" . $this->libelle . " est autorisé " . $this->nbLivresAutorises . " fois.</p>";
+    }
+}
\ No newline at end of file
diff --git a/TP6/models/DateEmprunt.php b/TP6/models/DateEmprunt.php
new file mode 100644
index 0000000000000000000000000000000000000000..c8aef9679609f8cbbb69a82be13c8cf37ab26c28
--- /dev/null
+++ b/TP6/models/DateEmprunt.php
@@ -0,0 +1,41 @@
+<?php
+
+class DateEmprunt
+{
+    private int $numDateEmprunt;
+    private DateTime $dateEmrpunt;
+
+    /**
+     * @return int
+     */
+    public function getNumDateEmprunt(): int
+    {
+        return $this->numDateEmprunt;
+    }
+
+    /**
+     * @param int $numDateEmprunt
+     */
+    public function setNumDateEmprunt(int $numDateEmprunt): void
+    {
+        $this->numDateEmprunt = $numDateEmprunt;
+    }
+
+    /**
+     * @return DateTime
+     */
+    public function getDateEmrpunt(): DateTime
+    {
+        return $this->dateEmrpunt;
+    }
+
+    /**
+     * @param DateTime $dateEmrpunt
+     */
+    public function setDateEmrpunt(DateTime $dateEmrpunt): void
+    {
+        $this->dateEmrpunt = $dateEmrpunt;
+    }
+
+
+}
\ No newline at end of file
diff --git a/TP6/models/Genre.php b/TP6/models/Genre.php
new file mode 100644
index 0000000000000000000000000000000000000000..2c953d485903e032e9c2d92a3c52af154d32d8ce
--- /dev/null
+++ b/TP6/models/Genre.php
@@ -0,0 +1,49 @@
+<?php
+
+class Genre
+{
+    private int $numGenre;
+    private string $intitule;
+
+    /**
+     * @param int $numGenre
+     * @param string $intitule
+     */
+    public function __construct(int $numGenre, string $intitule)
+    {
+        $this->numGenre = $numGenre;
+        $this->intitule = $intitule;
+    }
+
+    /**
+     * @return int
+     */
+    public function getNumGenre(): int
+    {
+        return $this->numGenre;
+    }
+
+    /**
+     * @param int $numGenre
+     */
+    public function setNumGenre(int $numGenre): void
+    {
+        $this->numGenre = $numGenre;
+    }
+
+    /**
+     * @return string
+     */
+    public function getIntitule(): string
+    {
+        return $this->intitule;
+    }
+
+    /**
+     * @param string $intitule
+     */
+    public function setIntitule(string $intitule): void
+    {
+        $this->intitule = $intitule;
+    }
+}
\ No newline at end of file
diff --git a/TP6/models/Livre.php b/TP6/models/Livre.php
new file mode 100644
index 0000000000000000000000000000000000000000..bde6024f752931bccd03f7fef748ea6955b78cea
--- /dev/null
+++ b/TP6/models/Livre.php
@@ -0,0 +1,75 @@
+<?php
+require_once "Objet.php";
+
+class Livre extends Objet
+{
+    protected int $numLivre;
+    protected string $titre;
+    protected int $anneeParution;
+    protected int $numGenre;
+
+    /**
+     * @param int $numLivre
+     * @param string $titre
+     * @param int $anneeParution
+     * @param int $numGenre
+     */
+    public function __construct(int $numLivre, string $titre, int $anneeParution, int $numGenre)
+    {
+        $this->numLivre = $numLivre;
+        $this->titre = $titre;
+        $this->anneeParution = $anneeParution;
+        $this->numGenre = $numGenre;
+    }
+
+    /**
+     * @return array
+     */
+    public static function getAllLivres(): array
+    {
+        $query = Database::pdo()->query("SELECT * FROM Livre");
+        $query->setFetchmode(PDO::FETCH_ASSOC);
+        $queryResult = $query->fetchAll();
+
+        $tableau = array();
+        foreach ($queryResult as $row) {
+            $tableau[] = new Livre($row['numLivre'],
+                $row['titre'],
+                $row['anneeParution'],
+                $row['numGenre']);
+        }
+        return $tableau;
+    }
+
+    /**
+     * @param int $numLivre
+     * @return Livre
+     */
+    public static function getLivreByNumLivre(int $numLivre): Livre
+    {
+        $query = Database::pdo()->prepare("SELECT * FROM Livre WHERE numLivre = :numLivre");
+        $response = null;
+        try {
+            // envoi de la requête
+            $query->execute(['numLivre' => $numLivre]);
+            $query->setFetchmode(PDO::FETCH_ASSOC);
+            $queryResult = $query->fetch();
+            $response = new Livre($queryResult['numLivre'],
+                $queryResult['titre'],
+                $queryResult['anneeParution'],
+                $queryResult['numGenre']);
+        } catch (PDOException $e) {
+            echo $e->getMessage();
+        }
+        return $response;
+    }
+
+    /**
+     * @return string
+     */
+    public function afficher(): string
+    {
+        return "<p>" . $this->titre . " est paru en "
+            . $this->anneeParution;
+    }
+}
\ No newline at end of file
diff --git a/TP6/models/Nationalite.php b/TP6/models/Nationalite.php
new file mode 100644
index 0000000000000000000000000000000000000000..aee6ad6413dab3ca78624c8d508dab4189f71951
--- /dev/null
+++ b/TP6/models/Nationalite.php
@@ -0,0 +1,36 @@
+<?php
+
+class Nationalite
+{
+    private int $numNationalite;
+    private string $pays;
+    private string $abrege;
+
+    /**
+     * @param int $numNationalite
+     * @param string $pays
+     * @param string $abrege
+     */
+    public function __construct(int $numNationalite, string $pays, string $abrege)
+    {
+        $this->numNationalite = $numNationalite;
+        $this->pays = $pays;
+        $this->abrege = $abrege;
+    }
+
+    /**
+     * @return int
+     */
+    public function getNumNationalite(): int
+    {
+        return $this->numNationalite;
+    }
+
+    /**
+     * @param int $numNationalite
+     */
+    public function setNumNationalite(int $numNationalite): void
+    {
+        $this->numNationalite = $numNationalite;
+    }
+}
\ No newline at end of file
diff --git a/TP6/models/Objet.php b/TP6/models/Objet.php
new file mode 100644
index 0000000000000000000000000000000000000000..28c122325cdc9b7e41661e22ab2b031059f4a91e
--- /dev/null
+++ b/TP6/models/Objet.php
@@ -0,0 +1,35 @@
+<?php
+require_once "Objet.php";
+
+/**
+ * Implémente les magic methods.
+ */
+class Objet
+{
+    public function __construct($data = null)
+    {
+        if(!is_null($data)){
+            foreach ($data as $key => $value){
+                $this->$key = $value;
+            }
+        }
+    }
+    /**
+     * @param $name
+     * @return mixed
+     */
+    public function __get($name)
+    {
+        return $this->$name ?? null;
+    }
+
+    /**
+     * @param $name
+     * @param $value
+     * @return void
+     */
+    public function __set($name, $value)
+    {
+        $this->$name = $value;
+    }
+}
\ No newline at end of file
diff --git a/TP6/resources/css/styles.css b/TP6/resources/css/styles.css
new file mode 100644
index 0000000000000000000000000000000000000000..8ba9598e773a9c31a18a05b59bff1ff6f12e46a5
--- /dev/null
+++ b/TP6/resources/css/styles.css
@@ -0,0 +1,13 @@
+.ligne {
+  display:flex;
+  flex-direction: row;
+  justify-content: space-between;
+  margin-top:10px;
+  margin-left:5%;
+  width:50%;
+}
+
+nav {
+  margin:10px;
+  padding:5px;
+}
diff --git a/TP6/resources/views/components/navbar.php b/TP6/resources/views/components/navbar.php
new file mode 100644
index 0000000000000000000000000000000000000000..e37a42bf412e9a1b404a035e3d446183a9030c77
--- /dev/null
+++ b/TP6/resources/views/components/navbar.php
@@ -0,0 +1,33 @@
+<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
+    <div class="container-fluid">
+        <a class="navbar-brand" href="?action=lireAuteurs">Bibliothèque</a>
+        <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
+            <span class="navbar-toggler-icon"></span>
+        </button>
+        <div class="collapse navbar-collapse" id="navbarNav">
+            <ul class="navbar-nav">
+                <li class="nav-item">
+                    <a class="nav-link" href="?action=lireAuteurs">
+                        Liste des auteurs
+                    </a>
+                </li>
+                <li class="nav-item">
+                    <a class="nav-link" href="?action=lireAdherents">Liste des adéherents</a>
+                </li>
+                <li class="nav-item">
+                    <a class="nav-link" href="?action=lireLivres">Liste des livres</a>
+                </li>
+                <li class="nav-item">
+                    <a class="nav-link" href="?action=creerAuteur">Créer un auteur</a>
+                </li>
+            </ul>
+        </div>
+    </div>
+</nav>
+<script type="text/javascript">
+    const urlParams = new URLSearchParams(window.location.search);
+    let links = document.querySelectorAll('a[href="?action='+urlParams.get("action")+'"]');
+    for (var i=0; i<links.length; i++){
+        links[i].classList.add("active");
+    }
+</script>
\ No newline at end of file
diff --git a/TP6/resources/views/data-grid.php b/TP6/resources/views/data-grid.php
new file mode 100644
index 0000000000000000000000000000000000000000..982e309dfd97fcf9b4721c187e0fcb30201276a2
--- /dev/null
+++ b/TP6/resources/views/data-grid.php
@@ -0,0 +1,26 @@
+@extends('layouts.page-layout')
+
+@section('title', '{{ $pageTitle }}')
+
+@section('content')
+<div class="container mt-3">
+    <h1>{{ $pageTitle }}</h1>
+    <p>{{ $pageDesc }}</p>
+    <div class="d-flex flex-wrap justify-content-between">
+        @foreach($objects as $object)
+        <div class="card mb-2" style="width: 18rem;">
+            <div class="card-body">
+                <h5 class="card-title">{{ $object['title'] }}</h5>
+                <p class="card-text">
+                    {{ $object['desc'] }}
+                </p>
+                <a class="btn btn-primary"
+                   href="{{ $object['url'] }}">
+                    Lire les détails
+                </a>
+            </div>
+        </div>
+        @endforeach
+    </div>
+</div>
+@endsection
\ No newline at end of file
diff --git a/TP6/resources/views/formulaire-creation-auteur.php b/TP6/resources/views/formulaire-creation-auteur.php
new file mode 100644
index 0000000000000000000000000000000000000000..a2cfbc69d93074e81ae312b11f25fe5c28981051
--- /dev/null
+++ b/TP6/resources/views/formulaire-creation-auteur.php
@@ -0,0 +1,29 @@
+@extends('layouts.page-layout')
+
+@section('title', '{{ $pageTitle }}')
+
+@section('content')
+<div class="container mt-3">
+    @if(!empty($insertMessage))
+    <div class="alert alert-{{ $insertMessage["type"] }}" role="alert">{{ $insertMessage["text"] }}</div>
+    @endif
+
+    <h1>{{ $pageTitle }}</h1>
+    <form action="index.php" method="get" class="col-6">
+        <input hidden name="action" value="creerAuteur">
+        <div class="mb-3">
+            <label class="form-label" for="nom">Nom</label>
+            <input class="form-control" type="text" name="nom" placeholder="nom" required>
+        </div>
+        <div class="mb-3">
+            <label class="form-label" for="nom">Prénom</label>
+            <input class="form-control" type="text" name="prenom" placeholder="prenom" required>
+        </div>
+        <div class="mb-3">
+            <label class="form-label" for="anneeNaissance">Année de naissance</label>
+            <input class="form-control" type="number" name="anneeNaissance" placeholder="Année de naissance" required>
+        </div>
+        <button type="submit" class="btn btn-primary">Créer</button>
+    </form>
+</div>
+@endsection
\ No newline at end of file
diff --git a/TP6/resources/views/layouts/page-layout.php b/TP6/resources/views/layouts/page-layout.php
new file mode 100644
index 0000000000000000000000000000000000000000..1734d49a9388804026029e0d0d0f0fe30e1e6858
--- /dev/null
+++ b/TP6/resources/views/layouts/page-layout.php
@@ -0,0 +1,13 @@
+<html lang="fr">
+<head>
+    <meta charset="utf-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1">
+    <title>@yield("title")</title>
+    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-Zenh87qX5JnK2Jl0vWa8Ck2rdkQ2Bzep5IDxbcnCeuOxjzrPF/et3URy9Bv1WTRi" crossorigin="anonymous">
+</head>
+<body class="">
+    <?=view("components.navbar")?>
+    @yield("content")
+    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-OERcA2EqjJCMA+/3y+gxIOqMEjwtxJY7qPCqsdltbNJuaOe923+mo//f6V8Qbsw3" crossorigin="anonymous"></script>
+</body>
+</html>
diff --git a/TP6/resources/views/simple-data.php b/TP6/resources/views/simple-data.php
new file mode 100644
index 0000000000000000000000000000000000000000..83a32766da30404fe6f6ee4e88b734c792f9ad60
--- /dev/null
+++ b/TP6/resources/views/simple-data.php
@@ -0,0 +1,10 @@
+@extends('layouts.page-layout')
+
+@section('title', '{{ $pageTitle }}')
+
+@section('content')
+<div class="container mt-3">
+    <h1>{{ $pageTitle }}</h1>
+    {{ $pageContent }}
+</div>
+@endsection
\ No newline at end of file