summaryrefslogtreecommitdiff
path: root/controller/admin.php
diff options
context:
space:
mode:
Diffstat (limited to 'controller/admin.php')
-rw-r--r--controller/admin.php44
1 files changed, 12 insertions, 32 deletions
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 @@
6 6
7function pageArticlesSimplesAdmin(string $page, string $title, string $headerPaintedTitle, $fileCode, int $suppression) 7function pageArticlesSimplesAdmin(string $page, string $title, string $headerPaintedTitle, $fileCode, int $suppression)
8{ 8{
9 $headerImage = '<div class="photo" id="photo_' . $page . '" ></div>'; 9 if($page == 'archives')
10 {
11 $headerImage = '<div style="display: flex;" >
12 <div>hello</div>
13 <div class="photo" id="photo_' . $page . '" ></div>
14 </div>';
15 }
16 else
17 {
18 $headerImage = '<div class="photo" id="photo_' . $page . '" ></div>';
19 }
10 20
11 // infos sur les fichiers 21 // infos sur les fichiers
12 $Articles = new Article($page); 22 $Articles = new Article($page);
@@ -210,40 +220,10 @@ function discoEdit($fileCode, $suppression)
210 $fileCodeArgument = ''; 220 $fileCodeArgument = '';
211 } 221 }
212 222
213 // préremplir le champ <input type="file" >
214 // c'est normallement impossible
215
216
217 // tri des albums avec l'année dans le .json
218
219 // noms des fichiers JSON
220 //$albumNamesJSON = $Albums->fileList;
221 //$annees = [];
222 //for($i = 0; $i < $Albums->fileListCount; $i++)
223 //{
224 // une case supplémentaire contient le "fileCode"
225 //$albumsJSON[$i][3] = pathinfo($albumNamesJSON[$i])['filename'];
226 //$albumsJSON[$i][3] = pathinfo($Albums->fileList[$i]['fileCode'])['filename'];
227
228 //$annees[$i] = $albumsJSON[$i][1];
229 //}
230 //var_dump($annee); die();
231
232 // tri d'un tableau multidimensionnel
233 //array_multisort($annees, $albumsJSON);
234
235
236
237 // liens dans la page et le menu chronologie
238 // ce dernier comporte une ancre lorsque le html n'existe pas
239 /*$lienAlbum = [];
240 $avecLien = [];
241 $linkDiscoChrono = [];*/
242 for($i = 0; $i < $Albums->fileListCount; $i++) 223 for($i = 0; $i < $Albums->fileListCount; $i++)
243 { 224 {
244 if(file_exists('data/discographie/html/' . $Albums->fileList[$i]['fileCode'] . '.html')) 225 if(file_exists('data/discographie/html/' . $Albums->fileList[$i]['fileCode'] . '.html'))
245 { 226 {
246 /*$lienAlbum[$i] = 'page=album&album_name=' . $Albums->fileList[$i]['titre'] . '&file_code=' . $Albums->fileList[$i]['fileCode'];*/
247 $lienAlbum[$i] = 'page=album&file_code=' . $Albums->fileList[$i]['fileCode']; 227 $lienAlbum[$i] = 'page=album&file_code=' . $Albums->fileList[$i]['fileCode'];
248 $avecLien[$i] = true; 228 $avecLien[$i] = true;
249 $linkDiscoChrono[$i] = 'linkChrono'; // css 229 $linkDiscoChrono[$i] = 'linkChrono'; // css
@@ -254,7 +234,7 @@ function discoEdit($fileCode, $suppression)
254 $avecLien[$i] = false; 234 $avecLien[$i] = false;
255 $linkDiscoChrono[$i] = 'noLinkChrono'; // css 235 $linkDiscoChrono[$i] = 'noLinkChrono'; // css
256 } 236 }
257 $lienBoutonModif[$i] = 'page=discographie&action=edition&file_code=' . $Albums->fileList[$i]['fileCode']; 237 $lienBoutonModif[$i] = 'page=discographie&action=edition&file_code=' . $Albums->fileList[$i]['fileCode'] . '#' . $Albums->fileList[$i]['fileCode'];
258 } 238 }
259 239
260 // morceaux en HTML à assembler 240 // morceaux en HTML à assembler