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

"; echo "
" . $row['ID'] . "
"; echo "
" . $row['titre'] . "
"; echo ""; echo "
" . $row['auteur'] . "
"; echo "
" . $row['classification'] . "
"; } } 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 = new Datetime($row['date']); if ($resultat) { foreach($resultat as $row) { echo "

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