"; $bdd = connect($dbhost, $dbname, $dbuser, $dbpass); $req = $bdd->prepare("SELECT ID, titre, date, auteur, classification FROM articles WHERE ID = :article"); $req->bindParam(":article", $article); $req->execute(); $resultat = $req->fetchAll(PDO::FETCH_ASSOC);; if ($resultat) { $date = strtotime($resultat[0]['date']); echo ""; } echo "
"; echo $parsedown->text($markdownContent); echo "
"; } else { $bdd = connect($dbhost, $dbname, $dbuser, $dbpass); $req = $bdd->prepare("SELECT ID, titre, date FROM articles WHERE classification <= :accreditation ORDER BY date DESC"); $req->bindParam(":accreditation", $_SESSION['accreditation']); $req->execute(); $resultat = $req->fetchAll(PDO::FETCH_ASSOC); $date = strtotime($row['date']); if ($resultat) { foreach($resultat as $row) { echo "

"; echo ""; echo "
" . $row['titre'] . "
"; echo "
"; } } } ?>