summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--controller/Security.php5
-rw-r--r--controller/ajax.php1
-rw-r--r--controller/ckeditor.php7
-rw-r--r--model/Article.php8
-rw-r--r--public/css/normalize.css698
-rw-r--r--à faire après livraison.txt21
6 files changed, 377 insertions, 363 deletions
diff --git a/controller/Security.php b/controller/Security.php
index 3475a8d..0ab4c02 100644
--- a/controller/Security.php
+++ b/controller/Security.php
@@ -49,13 +49,16 @@ class Security
49 - # ne fonctionne pas 49 - # ne fonctionne pas
50 - ~ fonctionne 50 - ~ fonctionne
51 - & fonctionne 51 - & fonctionne
52 - ^ pas encore testé
52 */ 53 */
53 54
54 // => on remplace tout par des _ 55 // => on remplace tout par des _
55 // filtrer / et \ semble inutile 56 // filtrer / et \ semble inutile
56 57
57 $cibles = [' ', '/', '\\', ':', '*', '?', '<', '>', '|', '=', "'", '`', '"', '%22', '#']; 58 $cibles = [' ', '/', '\\', ':', '*', '?', '<', '>', '|', '=', "'", '`', '"', '%22', '#'];
58 return(str_replace($cibles, '_', $chaine)); 59 $chaine = str_replace($cibles, '_', $chaine);
60 $chaine = mb_strtolower($chaine);
61 return($chaine);
59 62
60 // les problèmes avec \ persistent !! 63 // les problèmes avec \ persistent !!
61 // => javascript 64 // => javascript
diff --git a/controller/ajax.php b/controller/ajax.php
index 9272dea..1a4909e 100644
--- a/controller/ajax.php
+++ b/controller/ajax.php
@@ -43,6 +43,7 @@ if(isset($_GET['action']) && isset($_GET['page']) && $_GET['action'] == 'upload_
43 43
44 44
45// page restauration quand le fichier zip est lourd 45// page restauration quand le fichier zip est lourd
46//
46// -> input file onchange 47// -> input file onchange
47if(isset($_GET['action']) && $_GET['action'] == 'restauration' 48if(isset($_GET['action']) && $_GET['action'] == 'restauration'
48 && isset($_GET['file_name']) && isset($_GET['file_size'])) 49 && isset($_GET['file_name']) && isset($_GET['file_size']))
diff --git a/controller/ckeditor.php b/controller/ckeditor.php
index 7b4f1bb..1707128 100644
--- a/controller/ckeditor.php
+++ b/controller/ckeditor.php
@@ -64,7 +64,7 @@ function submitCKeditor()
64 exit(); 64 exit();
65 } 65 }
66 66
67 // POST de l'éditeur 67 // sécurité du HTML
68 if(isset($_POST['contenu'])) // optionnel pour discographie 68 if(isset($_POST['contenu'])) // optionnel pour discographie
69 { 69 {
70 $html = Security::secureString($_POST['contenu']); 70 $html = Security::secureString($_POST['contenu']);
@@ -85,6 +85,8 @@ function submitCKeditor()
85 } 85 }
86 86
87 87
88 // enregistrement du HTML
89 //
88 // page discographie 90 // page discographie
89 if($_GET['page'] === 'discographie' || $_GET['page'] === 'album') 91 if($_GET['page'] === 'discographie' || $_GET['page'] === 'album')
90 { 92 {
@@ -155,7 +157,7 @@ function submitCKeditor()
155 $Album->update($html); 157 $Album->update($html);
156 } 158 }
157 } 159 }
158 // pages avec des articles simples (melaine...) 160 // pages articles simples (melaine...)
159 //if($_GET['page'] != 'discographie') 161 //if($_GET['page'] != 'discographie')
160 else 162 else
161 { 163 {
@@ -177,6 +179,7 @@ function submitCKeditor()
177 } 179 }
178 } 180 }
179 181
182 // redirection
180 if($_GET['page'] === 'discographie' || $_GET['page'] === 'album') 183 if($_GET['page'] === 'discographie' || $_GET['page'] === 'album')
181 { 184 {
182 if($html === '') 185 if($html === '')
diff --git a/model/Article.php b/model/Article.php
index 3eca127..929cc5c 100644
--- a/model/Article.php
+++ b/model/Article.php
@@ -163,6 +163,14 @@ class Article
163 '#(<img[^>]+)((?<!-mini)(\.jpg|\.jpeg|\.png|\.gif)[^>]+>)#'); 163 '#(<img[^>]+)((?<!-mini)(\.jpg|\.jpeg|\.png|\.gif)[^>]+>)#');
164 $remplacement = array('$1-mini$2', '$1-mini$2'); 164 $remplacement = array('$1-mini$2', '$1-mini$2');
165 $content = preg_replace($pattern, $remplacement, $content); 165 $content = preg_replace($pattern, $remplacement, $content);
166
167 // les miniatures produites par gd sont des "jpg"
168 global $imageLibrary;
169 if($imageLibrary == 'gd')
170 {
171 $search = ['.jpeg', '.png', '.gif'];
172 $content = str_replace($search, '.jpg', $content);
173 }
166 174
167 return $content; 175 return $content;
168 } 176 }
diff --git a/public/css/normalize.css b/public/css/normalize.css
index 784422c..192eb9c 100644
--- a/public/css/normalize.css
+++ b/public/css/normalize.css
@@ -1,349 +1,349 @@
1/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */ 1/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */
2 2
3/* Document 3/* Document
4 ========================================================================== */ 4 ========================================================================== */
5 5
6/** 6/**
7 * 1. Correct the line height in all browsers. 7 * 1. Correct the line height in all browsers.
8 * 2. Prevent adjustments of font size after orientation changes in iOS. 8 * 2. Prevent adjustments of font size after orientation changes in iOS.
9 */ 9 */
10 10
11html { 11html {
12 line-height: 1.15; /* 1 */ 12 line-height: 1.15; /* 1 */
13 -webkit-text-size-adjust: 100%; /* 2 */ 13 -webkit-text-size-adjust: 100%; /* 2 */
14} 14}
15 15
16/* Sections 16/* Sections
17 ========================================================================== */ 17 ========================================================================== */
18 18
19/** 19/**
20 * Remove the margin in all browsers. 20 * Remove the margin in all browsers.
21 */ 21 */
22 22
23body { 23body {
24 margin: 0; 24 margin: 0;
25} 25}
26 26
27/** 27/**
28 * Render the `main` element consistently in IE. 28 * Render the `main` element consistently in IE.
29 */ 29 */
30 30
31main { 31main {
32 display: block; 32 display: block;
33} 33}
34 34
35/** 35/**
36 * Correct the font size and margin on `h1` elements within `section` and 36 * Correct the font size and margin on `h1` elements within `section` and
37 * `article` contexts in Chrome, Firefox, and Safari. 37 * `article` contexts in Chrome, Firefox, and Safari.
38 */ 38 */
39 39
40h1 { 40h1 {
41 font-size: 2em; 41 font-size: 2em;
42 margin: 0.67em 0; 42 margin: 0.67em 0;
43} 43}
44 44
45/* Grouping content 45/* Grouping content
46 ========================================================================== */ 46 ========================================================================== */
47 47
48/** 48/**
49 * 1. Add the correct box sizing in Firefox. 49 * 1. Add the correct box sizing in Firefox.
50 * 2. Show the overflow in Edge and IE. 50 * 2. Show the overflow in Edge and IE.
51 */ 51 */
52 52
53hr { 53hr {
54 box-sizing: content-box; /* 1 */ 54 box-sizing: content-box; /* 1 */
55 height: 0; /* 1 */ 55 height: 0; /* 1 */
56 overflow: visible; /* 2 */ 56 overflow: visible; /* 2 */
57} 57}
58 58
59/** 59/**
60 * 1. Correct the inheritance and scaling of font size in all browsers. 60 * 1. Correct the inheritance and scaling of font size in all browsers.
61 * 2. Correct the odd `em` font sizing in all browsers. 61 * 2. Correct the odd `em` font sizing in all browsers.
62 */ 62 */
63 63
64pre { 64pre {
65 font-family: monospace, monospace; /* 1 */ 65 font-family: monospace, monospace; /* 1 */
66 font-size: 1em; /* 2 */ 66 font-size: 1em; /* 2 */
67} 67}
68 68
69/* Text-level semantics 69/* Text-level semantics
70 ========================================================================== */ 70 ========================================================================== */
71 71
72/** 72/**
73 * Remove the gray background on active links in IE 10. 73 * Remove the gray background on active links in IE 10.
74 */ 74 */
75 75
76a { 76a {
77 background-color: transparent; 77 background-color: transparent;
78} 78}
79 79
80/** 80/**
81 * 1. Remove the bottom border in Chrome 57- 81 * 1. Remove the bottom border in Chrome 57-
82 * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari. 82 * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
83 */ 83 */
84 84
85abbr[title] { 85abbr[title] {
86 border-bottom: none; /* 1 */ 86 border-bottom: none; /* 1 */
87 text-decoration: underline; /* 2 */ 87 text-decoration: underline; /* 2 */
88 text-decoration: underline dotted; /* 2 */ 88 text-decoration: underline dotted; /* 2 */
89} 89}
90 90
91/** 91/**
92 * Add the correct font weight in Chrome, Edge, and Safari. 92 * Add the correct font weight in Chrome, Edge, and Safari.
93 */ 93 */
94 94
95b, 95b,
96strong { 96strong {
97 font-weight: bolder; 97 font-weight: bolder;
98} 98}
99 99
100/** 100/**
101 * 1. Correct the inheritance and scaling of font size in all browsers. 101 * 1. Correct the inheritance and scaling of font size in all browsers.
102 * 2. Correct the odd `em` font sizing in all browsers. 102 * 2. Correct the odd `em` font sizing in all browsers.
103 */ 103 */
104 104
105code, 105code,
106kbd, 106kbd,
107samp { 107samp {
108 font-family: monospace, monospace; /* 1 */ 108 font-family: monospace, monospace; /* 1 */
109 font-size: 1em; /* 2 */ 109 font-size: 1em; /* 2 */
110} 110}
111 111
112/** 112/**
113 * Add the correct font size in all browsers. 113 * Add the correct font size in all browsers.
114 */ 114 */
115 115
116small { 116small {
117 font-size: 80%; 117 font-size: 80%;
118} 118}
119 119
120/** 120/**
121 * Prevent `sub` and `sup` elements from affecting the line height in 121 * Prevent `sub` and `sup` elements from affecting the line height in
122 * all browsers. 122 * all browsers.
123 */ 123 */
124 124
125sub, 125sub,
126sup { 126sup {
127 font-size: 75%; 127 font-size: 75%;
128 line-height: 0; 128 line-height: 0;
129 position: relative; 129 position: relative;
130 vertical-align: baseline; 130 vertical-align: baseline;
131} 131}
132 132
133sub { 133sub {
134 bottom: -0.25em; 134 bottom: -0.25em;
135} 135}
136 136
137sup { 137sup {
138 top: -0.5em; 138 top: -0.5em;
139} 139}
140 140
141/* Embedded content 141/* Embedded content
142 ========================================================================== */ 142 ========================================================================== */
143 143
144/** 144/**
145 * Remove the border on images inside links in IE 10. 145 * Remove the border on images inside links in IE 10.
146 */ 146 */
147 147
148img { 148img {
149 border-style: none; 149 border-style: none;
150} 150}
151 151
152/* Forms 152/* Forms
153 ========================================================================== */ 153 ========================================================================== */
154 154
155/** 155/**
156 * 1. Change the font styles in all browsers. 156 * 1. Change the font styles in all browsers.
157 * 2. Remove the margin in Firefox and Safari. 157 * 2. Remove the margin in Firefox and Safari.
158 */ 158 */
159 159
160button, 160button,
161input, 161input,
162optgroup, 162optgroup,
163select, 163select,
164textarea { 164textarea {
165 font-family: inherit; /* 1 */ 165 font-family: inherit; /* 1 */
166 font-size: 100%; /* 1 */ 166 font-size: 100%; /* 1 */
167 line-height: 1.15; /* 1 */ 167 line-height: 1.15; /* 1 */
168 margin: 0; /* 2 */ 168 margin: 0; /* 2 */
169} 169}
170 170
171/** 171/**
172 * Show the overflow in IE. 172 * Show the overflow in IE.
173 * 1. Show the overflow in Edge. 173 * 1. Show the overflow in Edge.
174 */ 174 */
175 175
176button, 176button,
177input { /* 1 */ 177input { /* 1 */
178 overflow: visible; 178 overflow: visible;
179} 179}
180 180
181/** 181/**
182 * Remove the inheritance of text transform in Edge, Firefox, and IE. 182 * Remove the inheritance of text transform in Edge, Firefox, and IE.
183 * 1. Remove the inheritance of text transform in Firefox. 183 * 1. Remove the inheritance of text transform in Firefox.
184 */ 184 */
185 185
186button, 186button,
187select { /* 1 */ 187select { /* 1 */
188 text-transform: none; 188 text-transform: none;
189} 189}
190 190
191/** 191/**
192 * Correct the inability to style clickable types in iOS and Safari. 192 * Correct the inability to style clickable types in iOS and Safari.
193 */ 193 */
194 194
195button, 195button,
196[type="button"], 196[type="button"],
197[type="reset"], 197[type="reset"],
198[type="submit"] { 198[type="submit"] {
199 -webkit-appearance: button; 199 -webkit-appearance: button;
200} 200}
201 201
202/** 202/**
203 * Remove the inner border and padding in Firefox. 203 * Remove the inner border and padding in Firefox.
204 */ 204 */
205 205
206button::-moz-focus-inner, 206button::-moz-focus-inner,
207[type="button"]::-moz-focus-inner, 207[type="button"]::-moz-focus-inner,
208[type="reset"]::-moz-focus-inner, 208[type="reset"]::-moz-focus-inner,
209[type="submit"]::-moz-focus-inner { 209[type="submit"]::-moz-focus-inner {
210 border-style: none; 210 border-style: none;
211 padding: 0; 211 padding: 0;
212} 212}
213 213
214/** 214/**
215 * Restore the focus styles unset by the previous rule. 215 * Restore the focus styles unset by the previous rule.
216 */ 216 */
217 217
218button:-moz-focusring, 218button:-moz-focusring,
219[type="button"]:-moz-focusring, 219[type="button"]:-moz-focusring,
220[type="reset"]:-moz-focusring, 220[type="reset"]:-moz-focusring,
221[type="submit"]:-moz-focusring { 221[type="submit"]:-moz-focusring {
222 outline: 1px dotted ButtonText; 222 outline: 1px dotted ButtonText;
223} 223}
224 224
225/** 225/**
226 * Correct the padding in Firefox. 226 * Correct the padding in Firefox.
227 */ 227 */
228 228
229fieldset { 229fieldset {
230 padding: 0.35em 0.75em 0.625em; 230 padding: 0.35em 0.75em 0.625em;
231} 231}
232 232
233/** 233/**
234 * 1. Correct the text wrapping in Edge and IE. 234 * 1. Correct the text wrapping in Edge and IE.
235 * 2. Correct the color inheritance from `fieldset` elements in IE. 235 * 2. Correct the color inheritance from `fieldset` elements in IE.
236 * 3. Remove the padding so developers are not caught out when they zero out 236 * 3. Remove the padding so developers are not caught out when they zero out
237 * `fieldset` elements in all browsers. 237 * `fieldset` elements in all browsers.
238 */ 238 */
239 239
240legend { 240legend {
241 box-sizing: border-box; /* 1 */ 241 box-sizing: border-box; /* 1 */
242 color: inherit; /* 2 */ 242 color: inherit; /* 2 */
243 display: table; /* 1 */ 243 display: table; /* 1 */
244 max-width: 100%; /* 1 */ 244 max-width: 100%; /* 1 */
245 padding: 0; /* 3 */ 245 padding: 0; /* 3 */
246 white-space: normal; /* 1 */ 246 white-space: normal; /* 1 */
247} 247}
248 248
249/** 249/**
250 * Add the correct vertical alignment in Chrome, Firefox, and Opera. 250 * Add the correct vertical alignment in Chrome, Firefox, and Opera.
251 */ 251 */
252 252
253progress { 253progress {
254 vertical-align: baseline; 254 vertical-align: baseline;
255} 255}
256 256
257/** 257/**
258 * Remove the default vertical scrollbar in IE 10+. 258 * Remove the default vertical scrollbar in IE 10+.
259 */ 259 */
260 260
261textarea { 261textarea {
262 overflow: auto; 262 overflow: auto;
263} 263}
264 264
265/** 265/**
266 * 1. Add the correct box sizing in IE 10. 266 * 1. Add the correct box sizing in IE 10.
267 * 2. Remove the padding in IE 10. 267 * 2. Remove the padding in IE 10.
268 */ 268 */
269 269
270[type="checkbox"], 270[type="checkbox"],
271[type="radio"] { 271[type="radio"] {
272 box-sizing: border-box; /* 1 */ 272 box-sizing: border-box; /* 1 */
273 padding: 0; /* 2 */ 273 padding: 0; /* 2 */
274} 274}
275 275
276/** 276/**
277 * Correct the cursor style of increment and decrement buttons in Chrome. 277 * Correct the cursor style of increment and decrement buttons in Chrome.
278 */ 278 */
279 279
280[type="number"]::-webkit-inner-spin-button, 280[type="number"]::-webkit-inner-spin-button,
281[type="number"]::-webkit-outer-spin-button { 281[type="number"]::-webkit-outer-spin-button {
282 height: auto; 282 height: auto;
283} 283}
284 284
285/** 285/**
286 * 1. Correct the odd appearance in Chrome and Safari. 286 * 1. Correct the odd appearance in Chrome and Safari.
287 * 2. Correct the outline style in Safari. 287 * 2. Correct the outline style in Safari.
288 */ 288 */
289 289
290[type="search"] { 290[type="search"] {
291 -webkit-appearance: textfield; /* 1 */ 291 -webkit-appearance: textfield; /* 1 */
292 outline-offset: -2px; /* 2 */ 292 outline-offset: -2px; /* 2 */
293} 293}
294 294
295/** 295/**
296 * Remove the inner padding in Chrome and Safari on macOS. 296 * Remove the inner padding in Chrome and Safari on macOS.
297 */ 297 */
298 298
299[type="search"]::-webkit-search-decoration { 299[type="search"]::-webkit-search-decoration {
300 -webkit-appearance: none; 300 -webkit-appearance: none;
301} 301}
302 302
303/** 303/**
304 * 1. Correct the inability to style clickable types in iOS and Safari. 304 * 1. Correct the inability to style clickable types in iOS and Safari.
305 * 2. Change font properties to `inherit` in Safari. 305 * 2. Change font properties to `inherit` in Safari.
306 */ 306 */
307 307
308::-webkit-file-upload-button { 308::-webkit-file-upload-button {
309 -webkit-appearance: button; /* 1 */ 309 -webkit-appearance: button; /* 1 */
310 font: inherit; /* 2 */ 310 font: inherit; /* 2 */
311} 311}
312 312
313/* Interactive 313/* Interactive
314 ========================================================================== */ 314 ========================================================================== */
315 315
316/* 316/*
317 * Add the correct display in Edge, IE 10+, and Firefox. 317 * Add the correct display in Edge, IE 10+, and Firefox.
318 */ 318 */
319 319
320details { 320details {
321 display: block; 321 display: block;
322} 322}
323 323
324/* 324/*
325 * Add the correct display in all browsers. 325 * Add the correct display in all browsers.
326 */ 326 */
327 327
328summary { 328summary {
329 display: list-item; 329 display: list-item;
330} 330}
331 331
332/* Misc 332/* Misc
333 ========================================================================== */ 333 ========================================================================== */
334 334
335/** 335/**
336 * Add the correct display in IE 10+. 336 * Add the correct display in IE 10+.
337 */ 337 */
338 338
339template { 339template {
340 display: none; 340 display: none;
341} 341}
342 342
343/** 343/**
344 * Add the correct display in IE 10. 344 * Add the correct display in IE 10.
345 */ 345 */
346 346
347[hidden] { 347[hidden] {
348 display: none; 348 display: none;
349} 349}
diff --git a/à faire après livraison.txt b/à faire après livraison.txt
index 012b759..185cafc 100644
--- a/à faire après livraison.txt
+++ b/à faire après livraison.txt
@@ -1,12 +1,16 @@
1filtre caractère ^
2
3problème lorsque deux images ont le même nom
4
5problème lorsqu'on télécharge la même image en tant que pochette d'un album et dans le HTML, cause: les dimensions des deux miniatures crées sont censées être différents, hors l'une écrase l'autre
6
1protéger les e-mails de la page infos légales 7protéger les e-mails de la page infos légales
2avec JS peut-être, comme l'adresse de melaine? 8avec JS peut-être, comme l'adresse de melaine?
3 9
4renommer fichiers melaineDATA et melainePHP en melainefavennec.comDATA, etc 10renommer les fichiers melaineDATA et melainePHP en melainefavennec.comDATA, etc
5 11
6gérer les \ dans les noms de fichiers (ou pas, c'est dur à faire et ça ne casse rien) 12gérer les \ dans les noms de fichiers (ou pas, c'est dur à faire et ça ne casse rien)
7 13
8empêcher de recharger la page en cliquant sur "Partager"
9
10écrire Security::fixLinks() 14écrire Security::fixLinks()
11 15
12barre de progression au téléchargement d'un melaineDATA 16barre de progression au téléchargement d'un melaineDATA
@@ -28,9 +32,6 @@ Actualité: remplacer le mot "actualité" (page menu) par un logo sur le côté
28 32
29rendre le menu chronologie moins moche 33rendre le menu chronologie moins moche
30 34
31miniatures albums, le même fichier est utilisé pour la pochette et dans la page album, la miniature de l'une écrase celle de l'autre
32(problème: les dimensions des deux miniatures sont censées être différentes)
33
34variable de session avec vérification du captcha 35variable de session avec vérification du captcha
35 36
36images d'en-tête svg? 37images d'en-tête svg?
@@ -69,12 +70,10 @@ ajouter d'autres format de sauvegarde (il parait que zip se fait vieux)
69 70
70Identification avec deux codes (login + mot de passe) 71Identification avec deux codes (login + mot de passe)
71 72
72pagination (ex: max 10 articles par page) 73pagination (système d'onglets), par exemple: 10 articles max par page
73à voir selon le volume, c'est mieux avec de l'AJAX 74à voir selon le volume
74
75pagination + AJAX
76 75
77système d'onglets avec AJAX: changement de page sans recharger 76pagination avec AJAX pour ne pas recharger la page tout le temps
78 77
79plugin autosave de l'éditeur 78plugin autosave de l'éditeur
80 79