From ce4ec7dfb531a955b4501908b74466b2f5e4347c Mon Sep 17 00:00:00 2001 From: Jan BELLON Date: Fri, 8 Mar 2024 15:56:10 +0000 Subject: [PATCH] Update 2 files - /html/news.php - /html/editpage.php --- html/editpage.php | 4 ++-- html/news.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/html/editpage.php b/html/editpage.php index 9634e45d..c26c2a8b 100644 --- a/html/editpage.php +++ b/html/editpage.php @@ -124,14 +124,14 @@ if(isset($fichier)) { $req->execute(); $resultat = $req->fetchAll(PDO::FETCH_ASSOC); - $date = new Datetime($row['date']); + $date = strtotime($row['date']); if ($resultat) { foreach($resultat as $row) { echo "

"; echo ""; echo "
" . $row['titre'] . "
"; - echo "
"; + echo "
" . date('d/m/Y', $date) . "
"; } } echo ""; diff --git a/html/news.php b/html/news.php index 88297afd..89eff281 100644 --- a/html/news.php +++ b/html/news.php @@ -75,14 +75,14 @@ if (filter_var($_GET['article'], FILTER_VALIDATE_INT)) { $req->execute(); $resultat = $req->fetchAll(PDO::FETCH_ASSOC); - $date = new Datetime($row['date']); + $date = strtotime($row['date']); if ($resultat) { foreach($resultat as $row) { echo "

"; echo ""; echo "
" . $row['titre'] . "
"; - echo "
"; + echo "
" . date('d/m/Y', $date) . "
"; } } }