Blame view

orga.php 12.2 KB
e4f5453d   Geoffrey PREUD'HOMME   [Orga] Meilleure ...
1
  <h3> Organisation </h3>
97d25235   Erwan Nanrocki   ajout d un titre ...
2
  
27f3beb9   Geoffrey Bontoux-Preud-Homme   Ajout de orga.php
3
  <?php
5f2f48c7   Geoffrey PREUD'HOMME   [Orga] Modificati...
4
  
e4f5453d   Geoffrey PREUD'HOMME   [Orga] Meilleure ...
5
6
  $time = time();
  
27f3beb9   Geoffrey Bontoux-Preud-Homme   Ajout de orga.php
7
  # e_ : est
e6faaa33   Geoffrey PREUD'HOMME   [Orga] Oublié ses...
8
  
c1431d5f   Geoffrey PREUD'HOMME   [Orga] Fix commit...
9
  if(session_id() == '') {
65039e83   Geoffrey PREUD'HOMME   [Orga] session_st...
10
11
      session_start();
  }
e6faaa33   Geoffrey PREUD'HOMME   [Orga] Oublié ses...
12
  
d70dd0a0   Geoffrey PREUD'HOMME   [Orga] Intégratio...
13
14
15
  $e_connecte = isset($_SESSION["connected"]) && $_SESSION["connected"];
  $e_admin = isset($_SESSION["admin"]) && $_SESSION["admin"];
  
f84e30e3   Geoffrey PREUD'HOMME   [Orga] Retravail
16
  
e4f5453d   Geoffrey PREUD'HOMME   [Orga] Meilleure ...
17
  if ($e_connecte) {
d70dd0a0   Geoffrey PREUD'HOMME   [Orga] Intégratio...
18
      if ($e_admin) {
e4f5453d   Geoffrey PREUD'HOMME   [Orga] Meilleure ...
19
20
          $droits  = array('voir', 'voter', 'ajouter', 'proposer', 'annuler', 'supprimer', 'modifier', 'valider');
      } else {
e6faaa33   Geoffrey PREUD'HOMME   [Orga] Oublié ses...
21
          $droits = array('voir', 'voter', 'proposer');
e4f5453d   Geoffrey PREUD'HOMME   [Orga] Meilleure ...
22
23
24
25
26
      }
  } else {
      $droits = array('voir');
  }
  
3fde9691   Geoffrey PREUD'HOMME   [Orga] Interpréta...
27
  $lastID = 0; // TODO Est-ce que cela mérite-t-il d'exister ?
f84e30e3   Geoffrey PREUD'HOMME   [Orga] Retravail
28
29
30
  
  class Evenement
  {
3fde9691   Geoffrey PREUD'HOMME   [Orga] Interpréta...
31
32
33
      // TODO Mettre tout en privé et utiliser __get et __set
      public $id = 0;
      public $creationTime = 0;
5f2f48c7   Geoffrey PREUD'HOMME   [Orga] Modificati...
34
  
f84e30e3   Geoffrey PREUD'HOMME   [Orga] Retravail
35
36
37
38
      public $nom = "Sans nom";
      public $description = "Sans description";
      public $annule = false;
      public $valide = false;
5f2f48c7   Geoffrey PREUD'HOMME   [Orga] Modificati...
39
40
      public $duree = 3600;
      public $supprime = false;
f84e30e3   Geoffrey PREUD'HOMME   [Orga] Retravail
41
42
  
      public $dates = array();
5f2f48c7   Geoffrey PREUD'HOMME   [Orga] Modificati...
43
      public $datesVotes = array();
f84e30e3   Geoffrey PREUD'HOMME   [Orga] Retravail
44
  
3fde9691   Geoffrey PREUD'HOMME   [Orga] Interpréta...
45
46
47
48
49
50
51
52
53
54
55
56
57
58
      function __construct($id = 0) {
          global $lastID;
          if ($id == 0) { // Nouvel évènement
              $lastID += 1;
              $this->id = $lastID;
              $this->creationTime = time();
          } else { // Évènement existant : on charge
              // TODO SQL Select
              $this->id = $lastID + 1; // TODO DEBUG SQL Récupération id
              if ($this->id > $lastID) {
                  $lastID = $this->id;
              }
              // TODO SQL Récupération du reste des propriétés
          }
1d6e24f7   Geoffrey PREUD'HOMME   [Orga] Envoi des ...
59
60
61
62
63
64
      }
  
      public function sauvegarder() {
          // TODO SQL
      }
  
f84e30e3   Geoffrey PREUD'HOMME   [Orga] Retravail
65
      public function html() {
6884541c   Geoffrey PREUD'HOMME   [Orga] Ajout d'id...
66
          $html = '<li id="ev_li_'.$this->id.'" class="ev_li list-group-item';
e4f5453d   Geoffrey PREUD'HOMME   [Orga] Meilleure ...
67
68
69
70
          if ($this->annule) {
              $html .= ' list-group-item-danger';
          }
          $html .= '">';
f84e30e3   Geoffrey PREUD'HOMME   [Orga] Retravail
71
72
  
          # Titre
e4f5453d   Geoffrey PREUD'HOMME   [Orga] Meilleure ...
73
          $html .= '<h4 class="list-group-item-heading">'.$this->nom;
5f2f48c7   Geoffrey PREUD'HOMME   [Orga] Modificati...
74
          if ($this->p_annuler()) {
6884541c   Geoffrey PREUD'HOMME   [Orga] Ajout d'id...
75
              $html .= ' <button type="button" class="ev_annuler btn btn-warning"><span class="glyphicon glyphicon glyphicon-remove"></span> Annuler</button>';
f84e30e3   Geoffrey PREUD'HOMME   [Orga] Retravail
76
          }
5f2f48c7   Geoffrey PREUD'HOMME   [Orga] Modificati...
77
          if ($this->p_supprimer()) {
6884541c   Geoffrey PREUD'HOMME   [Orga] Ajout d'id...
78
              $html .= ' <button type="button" class="ev_supprimer btn btn-danger"><span class="glyphicon glyphicon glyphicon-trash"></span> Supprimer</button>';
f84e30e3   Geoffrey PREUD'HOMME   [Orga] Retravail
79
          }
e4f5453d   Geoffrey PREUD'HOMME   [Orga] Meilleure ...
80
          $html .= '</h4>';
f84e30e3   Geoffrey PREUD'HOMME   [Orga] Retravail
81
82
83
84
  
          # Description
          $html .= '<div class="panel panel-default">';
          $html .= '<div class="panel-heading">';
e4f5453d   Geoffrey PREUD'HOMME   [Orga] Meilleure ...
85
          $html .= '<h5 class="panel-title">Informations';
5f2f48c7   Geoffrey PREUD'HOMME   [Orga] Modificati...
86
          if ($this->p_modifier()) {
6884541c   Geoffrey PREUD'HOMME   [Orga] Ajout d'id...
87
              $html .= ' <button type="button" class="ev_modifier btn btn-default"><span class="glyphicon glyphicon-pencil"></span> Modifier</button>';
f84e30e3   Geoffrey PREUD'HOMME   [Orga] Retravail
88
          }
e4f5453d   Geoffrey PREUD'HOMME   [Orga] Meilleure ...
89
          $html .= '</h5>';
f84e30e3   Geoffrey PREUD'HOMME   [Orga] Retravail
90
91
          $html .= '</div>';
          $html .= '<div class="panel-body">';
6884541c   Geoffrey PREUD'HOMME   [Orga] Ajout d'id...
92
          $html .= '<p class="ev_description">';
f84e30e3   Geoffrey PREUD'HOMME   [Orga] Retravail
93
94
95
96
          $html .= nl2br(htmlspecialchars($this->description));
          $html .= '</p>';
          // $html .= '<hr/>';
          $html .= '<p>';
5f2f48c7   Geoffrey PREUD'HOMME   [Orga] Modificati...
97
98
99
          $heures = floor($this->duree/3600);
          $minutes = floor($this->duree%3600/60);
          $secondes = floor($this->duree%3600%60);
fab2252b   Geoffrey PREUD'HOMME   [Orga] Réponse ad...
100
          $html .= 'Durée : <span class="ev_duree">'.($heures > 0 ? '<span class="ev_duree_h">'.$heures.'</span> heure'.($heures > 1 ? 's' : '').' ' : '').($minutes > 0 ? '<span class="ev_duree_m">'.$minutes.'</span> minute'.($minutes > 1 ? 's' : '').' ' : '').($secondes > 0 ? '<span class="ev_duree_s">'.$secondes.'</span> seconde'.($secondes > 1 ? 's' : '').' ' : '').'</span><br/>';
f84e30e3   Geoffrey PREUD'HOMME   [Orga] Retravail
101
          if ($this->valide) {
6884541c   Geoffrey PREUD'HOMME   [Orga] Ajout d'id...
102
              $html .= 'Date : le <span class="ev_date">'.date('j/m/o', $this->valide).' à '.date('H:i', $this->valide).'</span><br/>';
f84e30e3   Geoffrey PREUD'HOMME   [Orga] Retravail
103
104
105
          }
          $html .= '</p>';
          if ($this->annule) {
e4f5453d   Geoffrey PREUD'HOMME   [Orga] Meilleure ...
106
              $html .= '<p><span class="label label-danger">Annulé</span></p>';
f84e30e3   Geoffrey PREUD'HOMME   [Orga] Retravail
107
108
109
110
111
112
113
  
          }
          $html .= '</div>';
          $html .= '</div>';
  
          # Dates
          if (!$this->valide && !$this->annule) {
3a23c07d   Geoffrey PREUD'HOMME   [Orga] Ajout d'év...
114
              $html .= '<div class="ev_pos panel panel-default">';
f84e30e3   Geoffrey PREUD'HOMME   [Orga] Retravail
115
              $html .= '<div class="panel-heading">';
e4f5453d   Geoffrey PREUD'HOMME   [Orga] Meilleure ...
116
              $html .= '<h5 class="panel-title">Dates possibles';
5f2f48c7   Geoffrey PREUD'HOMME   [Orga] Modificati...
117
              if ($this->p_proposer()) {
3a23c07d   Geoffrey PREUD'HOMME   [Orga] Ajout d'év...
118
                  $html .= ' <button type="button" class="ev_pos_proposer btn btn-default"><span class="glyphicon glyphicon-plus"></span> Proposer une date</button>';
f84e30e3   Geoffrey PREUD'HOMME   [Orga] Retravail
119
              }
e4f5453d   Geoffrey PREUD'HOMME   [Orga] Meilleure ...
120
              $html .= '</h5>';
f84e30e3   Geoffrey PREUD'HOMME   [Orga] Retravail
121
122
              $html .= '</div>';
              $html .= '<div class="panel-body">';
e4f5453d   Geoffrey PREUD'HOMME   [Orga] Meilleure ...
123
124
125
              if ($this->p_voter()) {
                  $html .= '<p>Sélectionnez les dates qui vous conviennent.</p>';
              }
5f2f48c7   Geoffrey PREUD'HOMME   [Orga] Modificati...
126
127
              $html .= '<div class="list-group">';
              $time = time();
6884541c   Geoffrey PREUD'HOMME   [Orga] Ajout d'id...
128
              foreach ($this->dates as $dateIndex => $date) { // TODO À faire fonctionner (après que le reste fonctionne)
5f2f48c7   Geoffrey PREUD'HOMME   [Orga] Modificati...
129
130
131
132
                  $html .= '<a href="#"class="list-group-item';
                  if ($date < $time) {
                      $html .= ' disabled';
                  }
3a23c07d   Geoffrey PREUD'HOMME   [Orga] Ajout d'év...
133
                  $html .= '">Le <span class="ev_pos_date">'.date('j/m/o', $date).' à '.date('H:i', $date).'</span> (<span class="ev_pos_nb">'.$this->datesVotes[$dateIndex].'</span> <span class="glyphicon glyphicon-user"></span>)</a>';
f84e30e3   Geoffrey PREUD'HOMME   [Orga] Retravail
134
              }
5f2f48c7   Geoffrey PREUD'HOMME   [Orga] Modificati...
135
136
              $html .= '</div>';
              if ($this->p_valider()) {
3a23c07d   Geoffrey PREUD'HOMME   [Orga] Ajout d'év...
137
                  $html .= '<p><button type="button" class="ev_pos_valider btn btn-primary"><span class="glyphicon glyphicon-ok"></span> Valider la date</button></p>';
f84e30e3   Geoffrey PREUD'HOMME   [Orga] Retravail
138
139
140
141
142
143
144
145
              }
              $html .= '</div>';
              $html .= '</div>';
          }
  
          $html .= '</li>';
          return $html;
      }
5f2f48c7   Geoffrey PREUD'HOMME   [Orga] Modificati...
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
  
      public function passe() {
          global $time;
          if ($this->valide) {
              return $this->valide+$this->duree < $time;
          } else {
              return false;
          }
      }
  
      # p_ : Il est possible de ...
      function p_annuler() {
          global $droits;
          return in_array('annuler', $droits) && !$this->annule && !$this->passe();
      }
  
      function p_supprimer() {
          global $droits;
          return in_array('supprimer', $droits) && !$this->valide;
      }
  
      function p_modifier() {
          global $droits;
          return in_array('modifier', $droits);
      }
  
e4f5453d   Geoffrey PREUD'HOMME   [Orga] Meilleure ...
172
173
174
175
176
      function p_voter() {
          global $droits;
          return in_array('voter', $droits) && !$this->valide;
      }
  
5f2f48c7   Geoffrey PREUD'HOMME   [Orga] Modificati...
177
178
      function p_proposer() {
          global $droits;
e4f5453d   Geoffrey PREUD'HOMME   [Orga] Meilleure ...
179
          return in_array('proposer', $droits) && !$this->valide;
5f2f48c7   Geoffrey PREUD'HOMME   [Orga] Modificati...
180
181
182
183
      }
  
      function p_valider() {
          global $droits;
e4f5453d   Geoffrey PREUD'HOMME   [Orga] Meilleure ...
184
          # TODO Et si un nombre suffisant de personnes est ok avec la date la plus disponible 
5f2f48c7   Geoffrey PREUD'HOMME   [Orga] Modificati...
185
186
187
188
189
          return in_array('valider', $droits) && !$this->valide;
      }
  
  }
  
3fde9691   Geoffrey PREUD'HOMME   [Orga] Interpréta...
190
191
  # a_ : Récupérer depuis la base de donnée (ou pas)
  function a_evenements() {
5f2f48c7   Geoffrey PREUD'HOMME   [Orga] Modificati...
192
193
      # DEBUG
      $test1 = new Evenement;
fab2252b   Geoffrey PREUD'HOMME   [Orga] Réponse ad...
194
      $test1->duree = 12345;
5f2f48c7   Geoffrey PREUD'HOMME   [Orga] Modificati...
195
      $test1->nom = 'Évènement de test n°1';
fab2252b   Geoffrey PREUD'HOMME   [Orga] Réponse ad...
196
      $test1->description = 'Description de l\'évènement de test n°1';
5f2f48c7   Geoffrey PREUD'HOMME   [Orga] Modificati...
197
198
199
      $test1->valide = time();
      
      $test2 = new Evenement;
5f2f48c7   Geoffrey PREUD'HOMME   [Orga] Modificati...
200
      $test2->nom = 'Évènement de test n°2';
fab2252b   Geoffrey PREUD'HOMME   [Orga] Réponse ad...
201
202
      $test2->description = 'Description de l\'évènement de test n°2';
      $test2->duree = 36000;
5f2f48c7   Geoffrey PREUD'HOMME   [Orga] Modificati...
203
204
205
206
      $test2->valide = time();
      $test2->annule = true;
      
      $test3 = new Evenement;
5f2f48c7   Geoffrey PREUD'HOMME   [Orga] Modificati...
207
      $test3->nom = 'Évènement de test n°3';
fab2252b   Geoffrey PREUD'HOMME   [Orga] Réponse ad...
208
      $test3->description = 'Description de l\'évènement de test n°3';
5f2f48c7   Geoffrey PREUD'HOMME   [Orga] Modificati...
209
210
211
212
213
214
215
216
      $test3->dates[] = 1415482197;
      $test3->datesVotes[] = 42;
      $test3->dates[] = time();
      $test3->datesVotes[] = 5;
      $test3->dates[] = time()+365*24*3600;
      $test3->datesVotes[] = 1;
      
      $test4 = new Evenement;
5f2f48c7   Geoffrey PREUD'HOMME   [Orga] Modificati...
217
      $test4->nom = 'Évènement de test n°4';
fab2252b   Geoffrey PREUD'HOMME   [Orga] Réponse ad...
218
      $test4->description = 'Description de l\'évènement de test n°4';
5f2f48c7   Geoffrey PREUD'HOMME   [Orga] Modificati...
219
220
221
222
223
224
225
226
      $test4->dates[] = time();
      $test4->datesVotes[] = 5;
      $test4->dates[] = time()+365*24*3600;
      $test4->datesVotes[] = 1;
      $test4->dates[] = time();
      $test4->annule = true;
  
      $test5 = new Evenement;
5f2f48c7   Geoffrey PREUD'HOMME   [Orga] Modificati...
227
      $test5->nom = 'Évènement de test n°5';
fab2252b   Geoffrey PREUD'HOMME   [Orga] Réponse ad...
228
      $test5->description = 'Description de l\'évènement de test n°5';
5f2f48c7   Geoffrey PREUD'HOMME   [Orga] Modificati...
229
230
231
232
233
      $test5->dates[] = time();
      $test5->datesVotes[] = 0;
      $test5->supprime = true;
  
      $test6 = new Evenement;
5f2f48c7   Geoffrey PREUD'HOMME   [Orga] Modificati...
234
      $test6->nom = 'Évènement de test n°6';
fab2252b   Geoffrey PREUD'HOMME   [Orga] Réponse ad...
235
      $test6->description = 'Description de l\'évènement de test n°6';
5f2f48c7   Geoffrey PREUD'HOMME   [Orga] Modificati...
236
237
238
239
240
      $test6->valide = 1415452197;
  
      return array($test1, $test2, $test3, $test4, $test5, $test6);
  }
  
3fde9691   Geoffrey PREUD'HOMME   [Orga] Interpréta...
241
  $evenements = a_evenements();
1d6e24f7   Geoffrey PREUD'HOMME   [Orga] Envoi des ...
242
  
3fde9691   Geoffrey PREUD'HOMME   [Orga] Interpréta...
243
244
245
246
247
248
249
250
  function a_evenement($id) {
      global $evenements;
      foreach ($evenements as $evenement) {
          if ($evenement->id == $id) {
              return $evenement;
          }
      }
  }
1d6e24f7   Geoffrey PREUD'HOMME   [Orga] Envoi des ...
251
  
3fde9691   Geoffrey PREUD'HOMME   [Orga] Interpréta...
252
  # TRAITEMENT DES DONNEES POST
1d6e24f7   Geoffrey PREUD'HOMME   [Orga] Envoi des ...
253
  
3fde9691   Geoffrey PREUD'HOMME   [Orga] Interpréta...
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
  function mauvaiseRequete($code = 0) {
      echo '<div class="alert alert-danger" role="alert">Le serveur n\'a pas compris votre requête <small>(code d\'erreur n°'.$code.')</small>.</div>';
  }
  
  function bonneRequete($message = 'Action correctement effectuée.') {
      echo '<div class="alert alert-success" role="alert">'.$message.'</div>';
  }
  
  if (isset($_POST['action'])) {
  
      switch ($_POST['action']) {
          case 'modifier':
              if (isset($_POST['id']) && isset($_POST['description']) && isset($_POST['duree'])) {
                  if ($evenement = a_evenement($_POST['id'])) {
                      if (($duree = intval($_POST['duree'])) >= 0) {
                          $evenement->description = $_POST['description']; // TODO Protection nécessaire pour SQL
                          $evenement->duree = $duree;
                          bonneRequete('Élement correctement modifié.');
                      } else {
                          mauvaiseRequete(4);
                      }
                  } else {
                      mauvaiseRequete(3);
                  }
              } else {
                  mauvaiseRequete(2);
              }
              break;
  
          case 'annuler':
              if (isset($_POST['id'])) {
                  if ($evenement = a_evenement($_POST['id'])) {
                      $evenement->annule = true;
                      bonneRequete('Évènement annulé.');
                  } else {
                      mauvaiseRequete(3);
                  }
              } else {
                  mauvaiseRequete(2);
              }
              break;
  
          case 'supprimer':
              if (isset($_POST['id'])) {
                  if ($evenement = a_evenement($_POST['id'])) {
                      $evenement->supprime = true;
                      bonneRequete('Évènement supprimé.');
                  } else {
                      mauvaiseRequete(3);
                  }
              } else {
                  mauvaiseRequete(2);
              }
              break;
          
          default:
              mauvaiseRequete(1);
              break;
      }
1d6e24f7   Geoffrey PREUD'HOMME   [Orga] Envoi des ...
313
314
315
316
317
  }
  
  
  # AFFICHAGE DE LA PAGE
  
5f2f48c7   Geoffrey PREUD'HOMME   [Orga] Modificati...
318
  # Tri des évènements
5f2f48c7   Geoffrey PREUD'HOMME   [Orga] Modificati...
319
320
321
322
  $evenementsPlanifies = array();
  $evenementsAPlanifier = array();
  $evenementsPasses = array();
  
5f2f48c7   Geoffrey PREUD'HOMME   [Orga] Modificati...
323
324
325
326
327
328
329
330
331
332
333
334
  foreach ($evenements as $evenement) {
      if (!$evenement->supprime) {
          if ($evenement->valide) {
              if ($evenement->passe()) {
                  $evenementsPasses[] = $evenement;
              } else {
                  $evenementsPlanifies[] = $evenement;
              }
          } else {
              $evenementsAPlanifier[] = $evenement;
          }
      }
f84e30e3   Geoffrey PREUD'HOMME   [Orga] Retravail
335
336
  }
  
3fde9691   Geoffrey PREUD'HOMME   [Orga] Interpréta...
337
  # Affichage
27f3beb9   Geoffrey Bontoux-Preud-Homme   Ajout de orga.php
338
  
e4f5453d   Geoffrey PREUD'HOMME   [Orga] Meilleure ...
339
340
341
342
343
344
345
346
347
  if (!$e_connecte) {
  ?>
  <div class="alert alert-warning" role="alert">Connectez-vous afin de pouvoir agir sur les évènements.</div>
  <?php    
  }
  ?>
  <?php
  if (in_array('voir', $droits)) {
  ?>
6884541c   Geoffrey PREUD'HOMME   [Orga] Ajout d'id...
348
349
  <h3>Évènements plannifiés <?php if (in_array('ajouter', $droits)) { ?><button id="ev_ajouter_fixe" type="button" class="btn btn-primary"><span class="glyphicon glyphicon-plus"></span> Ajouter un évènement avec une date fixée</button><?php } ?></h3>
  <ul id="ev_ul_planifies" class="list-group">
e4f5453d   Geoffrey PREUD'HOMME   [Orga] Meilleure ...
350
  <?php
5f2f48c7   Geoffrey PREUD'HOMME   [Orga] Modificati...
351
352
353
  foreach ($evenementsPlanifies as $evenement) {
      echo $evenement->html();
  }
27f3beb9   Geoffrey Bontoux-Preud-Homme   Ajout de orga.php
354
  ?>
f84e30e3   Geoffrey PREUD'HOMME   [Orga] Retravail
355
356
  </ul>
  
27f3beb9   Geoffrey Bontoux-Preud-Homme   Ajout de orga.php
357
  
6884541c   Geoffrey PREUD'HOMME   [Orga] Ajout d'id...
358
359
  <h3>Évènements à plannifier <?php if (in_array('ajouter', $droits)) { ?><button id="ev_ajouter_choix" type="button" class="btn btn-primary"><span class="glyphicon glyphicon-plus"></span> Ajouter un évènement avec une date à choisir</button><?php } ?></h3>
  <ul id="ev_ul_aplanifier" class="list-group">
e4f5453d   Geoffrey PREUD'HOMME   [Orga] Meilleure ...
360
  <?php
5f2f48c7   Geoffrey PREUD'HOMME   [Orga] Modificati...
361
362
363
  foreach ($evenementsAPlanifier as $evenement) {
      echo $evenement->html();
  }
f84e30e3   Geoffrey PREUD'HOMME   [Orga] Retravail
364
365
366
367
  ?>
  </ul>
  
  
e4f5453d   Geoffrey PREUD'HOMME   [Orga] Meilleure ...
368
  <h3>Évènements passés</h3>
6884541c   Geoffrey PREUD'HOMME   [Orga] Ajout d'id...
369
  <ul id="ev_ul_passes" class="list-group">
e4f5453d   Geoffrey PREUD'HOMME   [Orga] Meilleure ...
370
  <?php
5f2f48c7   Geoffrey PREUD'HOMME   [Orga] Modificati...
371
372
373
374
  foreach ($evenementsPasses as $evenement) {
      echo $evenement->html();
  }
  ?>
e4f5453d   Geoffrey PREUD'HOMME   [Orga] Meilleure ...
375
376
  </ul>
  
fab2252b   Geoffrey PREUD'HOMME   [Orga] Réponse ad...
377
  <script type="text/javascript" src="js/orga.js"></script>
3a23c07d   Geoffrey PREUD'HOMME   [Orga] Ajout d'év...
378
  
e4f5453d   Geoffrey PREUD'HOMME   [Orga] Meilleure ...
379
380
381
382
383
384
385
  <?php
  } else {
  ?>
  <div class="alert alert-danger" role="alert">Vous ne pouvez pas voir les évènements.</div>
  <?php
  }
  ?>