From 2c5dc14a9cd8bd847c724c0d43ddce8be0069013 Mon Sep 17 00:00:00 2001 From: polo Date: Sun, 20 Feb 2022 22:15:21 +0100 Subject: debuggage et message d'erreur --- controller/admin.php | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'controller/admin.php') diff --git a/controller/admin.php b/controller/admin.php index 370426b..50f15e2 100644 --- a/controller/admin.php +++ b/controller/admin.php @@ -93,9 +93,8 @@ function discoEdit($fileCode, $suppression) // nouvel album if($fileCode == '') { - //echo($_SESSION['target'] . "
"); - //unset($_SESSION['target']); $title = "Ajouter un album"; + $imageFormulaire = ''; // formulaires vides $vignette = ['', '', '']; @@ -131,7 +130,14 @@ function discoEdit($fileCode, $suppression) $texte = $Albums->fileList[$i]['HTMLcontent']; // image affichée à côté des formulaires - $imageFormulaire = 'data/' . $page_actuelle . '/images/' . $vignette[2]; + if(!empty($vignette[2])) + { + $imageFormulaire = '
'; + } + else + { + $imageFormulaire = ''; + } } } } @@ -161,14 +167,14 @@ function discoEdit($fileCode, $suppression) // noms des fichiers JSON //$albumNamesJSON = $Albums->fileList; //$annees = []; - for($i = 0; $i < $Albums->fileListCount; $i++) - { + //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 -- cgit v1.2.3