From bf9ea4416385cde7507e32d1a7c8b756b5ed10d2 Mon Sep 17 00:00:00 2001 From: Jan BELLON Date: Fri, 8 Mar 2024 14:25:28 +0000 Subject: [PATCH] Update 4 files - /html/journal.php - /config/global.ini - /html/news.php - /html/editpage.php --- config/global.ini | 2 +- html/editpage.php | 7 ++++++- html/{journal.php => news.php} | 9 +++++++-- 3 files changed, 14 insertions(+), 4 deletions(-) rename html/{journal.php => news.php} (82%) diff --git a/config/global.ini b/config/global.ini index d855bc91..f4b0564e 100644 --- a/config/global.ini +++ b/config/global.ini @@ -11,7 +11,7 @@ dbpass = "vcwfDitW9tQBsRJX" dbhost = "127.0.0.1" [nav] -Journal = "journal.php" +News = "news.php" A propos = "about.php" [classifications] diff --git a/html/editpage.php b/html/editpage.php index 66c006bc..227811d6 100644 --- a/html/editpage.php +++ b/html/editpage.php @@ -128,7 +128,12 @@ if(isset($fichier)) { if ($resultat) { foreach($resultat as $row) { - echo "

" . $row['titre'] . "

" . $row['auteur'] . "

" . $classifications[(int)$row['classification']] . "
" . $date->format('d/m/Y') . "
"; + echo "

"; + echo ""; + echo "

" . $row['titre'] . "

"; + echo "

" . $row['auteur'] . "

"; + echo "
" . $classifications[(int)$row['classification']] . "
" + echo "
" . $date->format('d/m/Y') . "
"; } } echo ""; diff --git a/html/journal.php b/html/news.php similarity index 82% rename from html/journal.php rename to html/news.php index d5cd6b91..eca56764 100644 --- a/html/journal.php +++ b/html/news.php @@ -56,7 +56,7 @@ if (filter_var($_GET['article'], FILTER_VALIDATE_INT)) { } else { $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->bindParam(":accreditation", $_SESSION['accreditation']); $req->execute(); $resultat = $req->fetchAll(PDO::FETCH_ASSOC); @@ -64,7 +64,12 @@ if (filter_var($_GET['article'], FILTER_VALIDATE_INT)) { if ($resultat) { foreach($resultat as $row) { - echo "

" . $row['titre'] . "

" . $row['auteur'] . "

" . $classifications[(int)$row['classification']] . "
" . $date->format('d/m/Y') . "
"; + echo "

"; + echo ""; + echo "

" . $row['titre'] . "

"; + echo "

" . $row['auteur'] . "

"; + echo "
" . $classifications[(int)$row['classification']] . "
" + echo "
" . $date->format('d/m/Y') . "
"; } } }