From 1f3d5581acabb710844d3f5914e44615264c3981 Mon Sep 17 00:00:00 2001 From: Jan BELLON Date: Fri, 8 Mar 2024 18:58:57 +0000 Subject: [PATCH] Update file news.php --- html/news.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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);;