From 2afdde9749eeface10ceca832eb7f8ff8d32de3c Mon Sep 17 00:00:00 2001 From: polo Date: Wed, 2 Mar 2022 01:10:29 +0100 Subject: Affichage et page archives --- controller/admin.php | 44 ++++++++++++-------------------------------- 1 file changed, 12 insertions(+), 32 deletions(-) (limited to 'controller/admin.php') diff --git a/controller/admin.php b/controller/admin.php index ee5c217..5e3cde7 100644 --- a/controller/admin.php +++ b/controller/admin.php @@ -6,7 +6,17 @@ function pageArticlesSimplesAdmin(string $page, string $title, string $headerPaintedTitle, $fileCode, int $suppression) { - $headerImage = '
'; + if($page == 'archives') + { + $headerImage = '
+
hello
+
+
'; + } + else + { + $headerImage = '
'; + } // infos sur les fichiers $Articles = new Article($page); @@ -210,40 +220,10 @@ function discoEdit($fileCode, $suppression) $fileCodeArgument = ''; } - // préremplir le champ - // c'est normallement impossible - - - // tri des albums avec l'année dans le .json - - // noms des fichiers JSON - //$albumNamesJSON = $Albums->fileList; - //$annees = []; - //for($i = 0; $i < $Albums->fileListCount; $i++) - //{ - // une case supplémentaire contient le "fileCode" - //$albumsJSON[$i][3] = pathinfo($albumNamesJSON[$i])['filename']; - //$albumsJSON[$i][3] = pathinfo($Albums->fileList[$i]['fileCode'])['filename']; - - //$annees[$i] = $albumsJSON[$i][1]; - //} - //var_dump($annee); die(); - - // tri d'un tableau multidimensionnel - //array_multisort($annees, $albumsJSON); - - - - // liens dans la page et le menu chronologie - // ce dernier comporte une ancre lorsque le html n'existe pas - /*$lienAlbum = []; - $avecLien = []; - $linkDiscoChrono = [];*/ for($i = 0; $i < $Albums->fileListCount; $i++) { if(file_exists('data/discographie/html/' . $Albums->fileList[$i]['fileCode'] . '.html')) { - /*$lienAlbum[$i] = 'page=album&album_name=' . $Albums->fileList[$i]['titre'] . '&file_code=' . $Albums->fileList[$i]['fileCode'];*/ $lienAlbum[$i] = 'page=album&file_code=' . $Albums->fileList[$i]['fileCode']; $avecLien[$i] = true; $linkDiscoChrono[$i] = 'linkChrono'; // css @@ -254,7 +234,7 @@ function discoEdit($fileCode, $suppression) $avecLien[$i] = false; $linkDiscoChrono[$i] = 'noLinkChrono'; // css } - $lienBoutonModif[$i] = 'page=discographie&action=edition&file_code=' . $Albums->fileList[$i]['fileCode']; + $lienBoutonModif[$i] = 'page=discographie&action=edition&file_code=' . $Albums->fileList[$i]['fileCode'] . '#' . $Albums->fileList[$i]['fileCode']; } // morceaux en HTML à assembler -- cgit v1.2.3