diff --git a/html/news.php b/html/news.php index 36b8ee0c..c41ee534 100644 --- a/html/news.php +++ b/html/news.php @@ -52,8 +52,9 @@ if (filter_var($_GET['article'], FILTER_VALIDATE_INT)) { $parsedown = new Parsedown(); echo "
"; $bdd = connect($dbhost, $dbname, $dbuser, $dbpass); - $req = $bdd->prepare("SELECT ID, titre, date, auteur, classification FROM articles WHERE ID = :article"); + $req = $bdd->prepare("SELECT ID, titre, date, auteur, classification FROM articles WHERE ID = :article AND classification <= :accreditation"); $req->bindParam(":article", $article); + $req->bindParam(":accreditation", $_SESSION['accreditation']); $req->execute(); $resultat = $req->fetchAll(PDO::FETCH_ASSOC);;