Commit dd72b86c153954ad572ad6f3c40ee4306e811dee
1 parent
9cb44e38
Removed uneeded files
Not sure if all of them are really uneeded, but they're still in git. Needed a dummy commit anyway.
Showing
6 changed files
with
2 additions
and
567 deletions
Show diff stats
agenda.php deleted
... | ... | @@ -1,60 +0,0 @@ |
1 | -<h2> Agenda </h2> | |
2 | - | |
3 | -<?php | |
4 | - $d = new DateTime('now'); | |
5 | - $d->modify('first day of this month'); | |
6 | -// echo $d->format('N'); | |
7 | -?> | |
8 | - | |
9 | -<center><table class="table table-striped table-responsive table-bordered"> | |
10 | - <div class="panel_heading"> | |
11 | - <thead> | |
12 | - <tr> | |
13 | - <th> Lundi </th> | |
14 | - <th> Mardi </th> | |
15 | - <th> Mercredi </th> | |
16 | - <th> Jeudi </th> | |
17 | - <th> Vendredi </th> | |
18 | - <th> Samedi </th> | |
19 | - <th> Dimanche </th> | |
20 | - </tr> | |
21 | - </thead> | |
22 | - </div > | |
23 | - <tbody> | |
24 | -<?php | |
25 | -for($week=1;$week<6;$week++) | |
26 | -{ | |
27 | - echo "<tr>"; | |
28 | - | |
29 | - for($day=1;$day<8;$day++) | |
30 | - { | |
31 | - echo "<td>"; | |
32 | - | |
33 | - if($week==1) | |
34 | - { | |
35 | - if($day==$d->format('N')) | |
36 | - { | |
37 | - echo $d->format('j'); | |
38 | - $d->modify('next day'); | |
39 | - } | |
40 | - } | |
41 | - else if($week==5) | |
42 | - { | |
43 | - if($d->format('j')!=1) | |
44 | - { | |
45 | - echo $d->format('j'); | |
46 | - $d->modify('next day'); | |
47 | - } | |
48 | - } | |
49 | - else | |
50 | - { | |
51 | - echo $d->format('j'); | |
52 | - $d->modify('next day'); | |
53 | - } | |
54 | - echo "</td>"; | |
55 | - } | |
56 | - | |
57 | - echo "</tr>"; | |
58 | -} | |
59 | -?> | |
60 | -</table></center> |
js/crep.js
... | ... | @@ -16,37 +16,4 @@ function file(fichier) { |
16 | 16 | function loadNewDoc(doc) { |
17 | 17 | $("#mainContainer").html(file(doc)); |
18 | 18 | return false |
19 | -} | |
20 | - | |
21 | -function deleteNewNews() | |
22 | -{ | |
23 | - if (confirm('Voulez vous vraiment supprimer la news ?')) | |
24 | - $("#newNews").remove(); | |
25 | -} | |
26 | - | |
27 | -function validNewNews() | |
28 | -{ | |
29 | - var ret; | |
30 | - ret = $.post( "sendNews.php", {title: Base64.encode($("#newNews")[0].childNodes[0].childNodes[0].childNodes[0].value), content: Base64.encode($("#newNews")[0].childNodes[1].childNodes[0].value)}); | |
31 | - if(ret == true) | |
32 | - document.location.reload(); | |
33 | - else | |
34 | - alert("Erreur durant la transmission de la news"); | |
35 | -} | |
36 | - | |
37 | -function addNews() | |
38 | -{ | |
39 | - var elem = "<div id=\"newNews\" class=\"panel panel-default\"><div class=\"panel-heading\"><h3 class=\"panel-title\"><input type=text class=\"form-control\" placeholder=\"Nouvel article\"/></h3></div><div class=\"panel-body\"><textarea class=\"form-control\"></textarea></div><div class=\"panel-footer\"><p><button type=\"button\" onClick=\"validNewNews();\" class=\"btn btn-success\">Success</button> <button type=\"button\" onClick=\"deleteNewNews();\" class=\"btn btn-danger\">Annuler</button></p></div></div>"; | |
40 | - $("#mainContainer").append(elem); | |
41 | -} | |
42 | - | |
43 | -$().ready(function() { | |
44 | - // Navigue vers la page indiquée dans l'URL en cas de refresh | |
45 | - if (window.location.hash) { | |
46 | - $('ul.nav a').each(function() { | |
47 | - if ($(this).attr('href') == window.location.hash) { | |
48 | - loadNewDoc($(this).attr('onclick').replace(/loadNewDoc\(\'(.+)\'\);?/, '$1')) | |
49 | - } | |
50 | - }) | |
51 | - } | |
52 | -}) | |
19 | +} | |
53 | 20 | \ No newline at end of file | ... | ... |
js/orga.js deleted
... | ... | @@ -1,79 +0,0 @@ |
1 | -$(document).ready(function() { | |
2 | - function envoiRefresh(donnees) { | |
3 | - $.post('orga.php', donnees, function(page) { | |
4 | - $("#mainContainer").html(page); | |
5 | - }) | |
6 | - } | |
7 | - | |
8 | - $(".ev_li").each(function(index) { | |
9 | - var id = this.id.replace('ev_li_', '') | |
10 | - // console.debug(id) | |
11 | - _this = this | |
12 | - $('.ev_modifier', this).click(function(e) { | |
13 | - // console.debug(id, 'modifier', e) | |
14 | - | |
15 | - // Bouton | |
16 | - $(e.currentTarget).replaceWith('<button type="button" class="ev_appliquer btn btn-success"><span class="glyphicon glyphicon-ok"></span> Appliquer les changements</button>') | |
17 | - valider = $('#ev_li_' + id + ' .ev_appliquer') | |
18 | - | |
19 | - // Description | |
20 | - // var description = $('.ev_description', _this) | |
21 | - // TODO replaceWith ne fonctionne pas avec context (_this) pour une raison obscure | |
22 | - var description = $('#ev_li_' + id + ' .ev_description') | |
23 | - console.debug(description) | |
24 | - description.replaceWith('<textarea class="ev_description form-control">' + description[0].innerHTML + '</textarea>') | |
25 | - description = $('#ev_li_' + id + ' .ev_description') | |
26 | - | |
27 | - // Durée | |
28 | - var duree = $('#ev_li_' + id + ' .ev_duree') | |
29 | - console.debug($('.ev_duree_h', duree).text() || '00', ':', $('.ev_duree_m', duree).text() || '00') | |
30 | - h = $('.ev_duree_h', duree).text() || 0 | |
31 | - h = h < 10 ? '0' + h : h | |
32 | - m = $('.ev_duree_m', duree).text() || 0 | |
33 | - m = m < 10 ? '0' + m : m | |
34 | - duree.replaceWith('<input type="time" class="ev_duree form-control" value="' + h + ':' + m + '">') | |
35 | - duree = $('#ev_li_' + id + ' .ev_duree') | |
36 | - | |
37 | - valider.click(function(e) { | |
38 | - envoiRefresh({ | |
39 | - action: 'modifier', | |
40 | - id: id, | |
41 | - description: description[0].value, | |
42 | - duree: parseInt(duree[0].value.match(/^../)[0]) * 3600 + parseInt(duree[0].value.match(/^..:(..)/)[1]) * 60 | |
43 | - }) | |
44 | - }) | |
45 | - }) | |
46 | - $('.ev_annuler', this).click(function(e) { | |
47 | - // console.debug(id, 'annuler', e) | |
48 | - if (window.confirm('Voulez-vous vraiment annuler cet évènement ?')) { | |
49 | - envoiRefresh({ | |
50 | - action: 'annuler', | |
51 | - id: id | |
52 | - }) | |
53 | - } | |
54 | - }) | |
55 | - $('.ev_supprimer', this).click(function(e) { | |
56 | - // console.debug(id, 'supprimer', e) | |
57 | - if (window.confirm('Voulez-vous vraiment supprimer cet évènement ? \nIl ne sera plus visible par personne.')) { | |
58 | - envoiRefresh({ | |
59 | - action: 'supprimer', | |
60 | - id: id | |
61 | - }) | |
62 | - } | |
63 | - }) | |
64 | - $('.ev_pos_proposer', this).click(function(e) { | |
65 | - console.debug(id, 'pos_proposer', e) | |
66 | - window.alert('Cette fonction n\'est pas enore implémentée :-(') | |
67 | - }) | |
68 | - $('.ev_pos_valider', this).click(function(e) { | |
69 | - console.debug(id, 'pos_valider', e) | |
70 | - window.alert('Cette fonction n\'est pas enore implémentée :-(') | |
71 | - }) | |
72 | - }) | |
73 | - $("#ev_ajouter_fixe").click(function(e) { | |
74 | - console.debug('ajouter_fixe', e) | |
75 | - }) | |
76 | - $("#ev_ajouter_choix").click(function(e) { | |
77 | - console.debug('ajouter_choix', e) | |
78 | - }) | |
79 | -}) |
menu.php
... | ... | @@ -11,7 +11,7 @@ |
11 | 11 | <a href="#sponsors" onClick="loadNewDoc('sponsors.php');">Sponsors</a> |
12 | 12 | </li> |
13 | 13 | <li> |
14 | - <a href="#schools" onClick="loadNewDoc('schools.php');">Ecoles participantes</a> | |
14 | + <a href="#schools" onClick="loadNewDoc('schools.phpDEBUG');">Ecoles participantes</a> | |
15 | 15 | </li> |
16 | 16 | <li> |
17 | 17 | <a href="#contact" onClick="loadNewDoc('contact.php');">Contact</a> | ... | ... |
orga.php deleted
... | ... | @@ -1,381 +0,0 @@ |
1 | -<?php | |
2 | - | |
3 | -if(session_id() == '') { | |
4 | - session_start(); | |
5 | -} | |
6 | - | |
7 | -?> | |
8 | - | |
9 | -<h3> Organisation </h3> | |
10 | - | |
11 | -<?php | |
12 | - | |
13 | -$time = time(); | |
14 | - | |
15 | -# e_ : est | |
16 | - | |
17 | -$e_connecte = isset($_SESSION["connected"]) && $_SESSION["connected"]; | |
18 | -$e_admin = isset($_SESSION["admin"]) && $_SESSION["admin"]; | |
19 | - | |
20 | - | |
21 | -if ($e_connecte) { | |
22 | - if ($e_admin) { | |
23 | - $droits = array('voir', 'voter', 'ajouter', 'proposer', 'annuler', 'supprimer', 'modifier', 'valider'); | |
24 | - } else { | |
25 | - $droits = array('voir', 'voter', 'proposer'); | |
26 | - } | |
27 | -} else { | |
28 | - $droits = array('voir'); | |
29 | -} | |
30 | - | |
31 | -class Evenement | |
32 | -{ | |
33 | - // TODO Mettre tout en privé et utiliser __get et __set | |
34 | - public $id = 0; | |
35 | - public $creationTime = 0; | |
36 | - | |
37 | - public $nom = "Sans nom"; | |
38 | - public $description = "Sans description"; | |
39 | - public $annule = false; | |
40 | - public $valide = false; | |
41 | - public $duree = 3600; | |
42 | - public $supprime = false; | |
43 | - | |
44 | - public $dates = array(); | |
45 | - public $datesVotes = array(); | |
46 | - | |
47 | - private static $bddOK = false; | |
48 | - private static $bdd = null; | |
49 | - public static $tout = array(); | |
50 | - | |
51 | - private static function connecterBDD() { | |
52 | - if (!Evenement::$bddOK) { | |
53 | - require_once("creds.php"); | |
54 | - try { | |
55 | - Evenement::$bdd = mysql_connect(__MYSQL_HOSTNAME__, __MYSQL_USERNAME__, __MYSQL_PASSWORD__); | |
56 | - mysql_query("SET NAMES 'utf8'"); | |
57 | - } catch(Exception $e) { | |
58 | - echo 'Nop connect'; | |
59 | - return; // TODO Message d'erreur digne de ce nom | |
60 | - } | |
61 | - if (mysql_select_db('crep', Evenement::$bdd)) { | |
62 | - Evenement::$bddOK = true; | |
63 | - } else { | |
64 | - echo 'Nop db'; | |
65 | - } | |
66 | - } | |
67 | - } | |
68 | - | |
69 | - public static function chargerTout() { | |
70 | - Evenement::$tout = array(); | |
71 | - Evenement::connecterBDD(); | |
72 | - $requete = 'SELECT id FROM events'; | |
73 | - // TODO SQL Protéger | |
74 | - $resultat = mysql_query($requete); | |
75 | - while ($row = mysql_fetch_assoc($resultat)) { | |
76 | - Evenement::$tout[] = new Evenement($row['id']); | |
77 | - } | |
78 | - } | |
79 | - | |
80 | - function __construct($id = null) { | |
81 | - Evenement::connecterBDD(); | |
82 | - | |
83 | - if ($id == null) { // Nouvel évènement | |
84 | - $this->creationTime = time(); | |
85 | - // TODO SQL Récupérer id (AUTOINCREMENT) | |
86 | - } else { // Évènement existant : on charge | |
87 | - $requete = 'SELECT id, creationTime, nom, description, annule, valide, duree, supprime FROM events WHERE id='.$id; | |
88 | - // TODO SQL Protéger | |
89 | - $resultat = mysql_query($requete); | |
90 | - if ($resultat && $row = mysql_fetch_assoc($resultat)) { | |
91 | - $this->id = $row['id']; | |
92 | - $this->creationTime = $row['creationTime']; | |
93 | - $this->nom = $row['nom']; | |
94 | - $this->description = $row['description']; | |
95 | - $this->annule = $row['annule']; | |
96 | - $this->valide = $row['valide']; | |
97 | - $this->duree = $row['duree']; | |
98 | - $this->supprime = $row['supprime']; | |
99 | - | |
100 | - } else { | |
101 | - echo 'Nop resultat'; | |
102 | - } | |
103 | - } | |
104 | - } | |
105 | - | |
106 | - public function sauvegarder() { | |
107 | - // TODO SQL | |
108 | - } | |
109 | - | |
110 | - public function html() { | |
111 | - $html = '<li id="ev_li_'.$this->id.'" class="ev_li list-group-item'; | |
112 | - if ($this->annule) { | |
113 | - $html .= ' list-group-item-danger'; | |
114 | - } | |
115 | - $html .= '">'; | |
116 | - | |
117 | - # Titre | |
118 | - $html .= '<h4 class="list-group-item-heading">'.$this->nom; | |
119 | - if ($this->p_annuler()) { | |
120 | - $html .= ' <button type="button" class="ev_annuler btn btn-warning"><span class="glyphicon glyphicon glyphicon-remove"></span> Annuler</button>'; | |
121 | - } | |
122 | - if ($this->p_supprimer()) { | |
123 | - $html .= ' <button type="button" class="ev_supprimer btn btn-danger"><span class="glyphicon glyphicon glyphicon-trash"></span> Supprimer</button>'; | |
124 | - } | |
125 | - $html .= '</h4>'; | |
126 | - | |
127 | - # Description | |
128 | - $html .= '<div class="panel panel-default">'; | |
129 | - $html .= '<div class="panel-heading">'; | |
130 | - $html .= '<h5 class="panel-title">Informations'; | |
131 | - if ($this->p_modifier()) { | |
132 | - $html .= ' <button type="button" class="ev_modifier btn btn-default"><span class="glyphicon glyphicon-pencil"></span> Modifier</button>'; | |
133 | - } | |
134 | - $html .= '</h5>'; | |
135 | - $html .= '</div>'; | |
136 | - $html .= '<div class="panel-body">'; | |
137 | - $html .= '<p class="ev_description">'; | |
138 | - $html .= nl2br(htmlspecialchars($this->description)); | |
139 | - $html .= '</p>'; | |
140 | - // $html .= '<hr/>'; | |
141 | - $html .= '<p>'; | |
142 | - $heures = floor($this->duree/3600); | |
143 | - $minutes = floor($this->duree%3600/60); | |
144 | - $secondes = floor($this->duree%3600%60); | |
145 | - $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/>'; | |
146 | - if ($this->valide) { | |
147 | - $html .= 'Date : le <span class="ev_date">'.date('j/m/o', $this->valide).' à '.date('H:i', $this->valide).'</span><br/>'; | |
148 | - } | |
149 | - $html .= '</p>'; | |
150 | - if ($this->annule) { | |
151 | - $html .= '<p><span class="label label-danger">Annulé</span></p>'; | |
152 | - | |
153 | - } | |
154 | - $html .= '</div>'; | |
155 | - $html .= '</div>'; | |
156 | - | |
157 | - # Dates | |
158 | - if (!$this->valide && !$this->annule) { | |
159 | - $html .= '<div class="ev_pos panel panel-default">'; | |
160 | - $html .= '<div class="panel-heading">'; | |
161 | - $html .= '<h5 class="panel-title">Dates possibles'; | |
162 | - if ($this->p_proposer()) { | |
163 | - $html .= ' <button type="button" class="ev_pos_proposer btn btn-default"><span class="glyphicon glyphicon-plus"></span> Proposer une date</button>'; | |
164 | - } | |
165 | - $html .= '</h5>'; | |
166 | - $html .= '</div>'; | |
167 | - $html .= '<div class="panel-body">'; | |
168 | - if ($this->p_voter()) { | |
169 | - $html .= '<p>Sélectionnez les dates qui vous conviennent.</p>'; | |
170 | - } | |
171 | - $html .= '<div class="list-group">'; | |
172 | - $time = time(); | |
173 | - foreach ($this->dates as $dateIndex => $date) { // TODO À faire fonctionner (après que le reste fonctionne) | |
174 | - $html .= '<a href="#"class="list-group-item'; | |
175 | - if ($date < $time) { | |
176 | - $html .= ' disabled'; | |
177 | - } | |
178 | - $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>'; | |
179 | - } | |
180 | - $html .= '</div>'; | |
181 | - if ($this->p_valider()) { | |
182 | - $html .= '<p><button type="button" class="ev_pos_valider btn btn-primary"><span class="glyphicon glyphicon-ok"></span> Valider la date</button></p>'; | |
183 | - } | |
184 | - $html .= '</div>'; | |
185 | - $html .= '</div>'; | |
186 | - } | |
187 | - | |
188 | - $html .= '</li>'; | |
189 | - return $html; | |
190 | - } | |
191 | - | |
192 | - public function passe() { | |
193 | - global $time; | |
194 | - if ($this->valide) { | |
195 | - return $this->valide+$this->duree < $time; | |
196 | - } else { | |
197 | - return false; | |
198 | - } | |
199 | - } | |
200 | - | |
201 | - # p_ : Il est possible de ... | |
202 | - function p_annuler() { | |
203 | - global $droits; | |
204 | - return in_array('annuler', $droits) && !$this->annule && !$this->passe(); | |
205 | - } | |
206 | - | |
207 | - function p_supprimer() { | |
208 | - global $droits; | |
209 | - return in_array('supprimer', $droits) && !$this->valide; | |
210 | - } | |
211 | - | |
212 | - function p_modifier() { | |
213 | - global $droits; | |
214 | - return in_array('modifier', $droits); | |
215 | - } | |
216 | - | |
217 | - function p_voter() { | |
218 | - global $droits; | |
219 | - return in_array('voter', $droits) && !$this->valide; | |
220 | - } | |
221 | - | |
222 | - function p_proposer() { | |
223 | - global $droits; | |
224 | - return in_array('proposer', $droits) && !$this->valide; | |
225 | - } | |
226 | - | |
227 | - function p_valider() { | |
228 | - global $droits; | |
229 | - # TODO Et si un nombre suffisant de personnes est ok avec la date la plus disponible | |
230 | - return in_array('valider', $droits) && !$this->valide; | |
231 | - } | |
232 | - | |
233 | -} | |
234 | - | |
235 | -Evenement::chargerTout(); | |
236 | - | |
237 | -# a_ : Récupérer depuis la base de donnée (ou pas) | |
238 | - | |
239 | -function a_evenement($id) { // TODO Méthode statique à Evenement | |
240 | - foreach (Evenement::$tout as $evenement) { | |
241 | - if ($evenement->id == $id) { | |
242 | - return $evenement; | |
243 | - } | |
244 | - } | |
245 | -} | |
246 | - | |
247 | -# TRAITEMENT DES DONNEES POST | |
248 | - | |
249 | -function mauvaiseRequete($code = 0) { | |
250 | - 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>'; | |
251 | -} | |
252 | - | |
253 | -function bonneRequete($message = 'Action correctement effectuée.') { | |
254 | - echo '<div class="alert alert-success" role="alert">'.$message.'</div>'; | |
255 | -} | |
256 | - | |
257 | -if (isset($_POST['action'])) { | |
258 | - | |
259 | - switch ($_POST['action']) { | |
260 | - case 'modifier': | |
261 | - if (isset($_POST['id']) && isset($_POST['description']) && isset($_POST['duree'])) { | |
262 | - if ($evenement = a_evenement($_POST['id'])) { | |
263 | - if (($duree = intval($_POST['duree'])) >= 0) { | |
264 | - $evenement->description = $_POST['description']; // TODO Protection nécessaire pour SQL | |
265 | - $evenement->duree = $duree; | |
266 | - bonneRequete('Élement correctement modifié.'); | |
267 | - } else { | |
268 | - mauvaiseRequete(4); | |
269 | - } | |
270 | - } else { | |
271 | - mauvaiseRequete(3); | |
272 | - } | |
273 | - } else { | |
274 | - mauvaiseRequete(2); | |
275 | - } | |
276 | - break; | |
277 | - | |
278 | - case 'annuler': | |
279 | - if (isset($_POST['id'])) { | |
280 | - if ($evenement = a_evenement($_POST['id'])) { | |
281 | - $evenement->annule = true; | |
282 | - bonneRequete('Évènement annulé.'); | |
283 | - } else { | |
284 | - mauvaiseRequete(3); | |
285 | - } | |
286 | - } else { | |
287 | - mauvaiseRequete(2); | |
288 | - } | |
289 | - break; | |
290 | - | |
291 | - case 'supprimer': | |
292 | - if (isset($_POST['id'])) { | |
293 | - if ($evenement = a_evenement($_POST['id'])) { | |
294 | - $evenement->supprime = true; | |
295 | - bonneRequete('Évènement supprimé.'); | |
296 | - } else { | |
297 | - mauvaiseRequete(3); | |
298 | - } | |
299 | - } else { | |
300 | - mauvaiseRequete(2); | |
301 | - } | |
302 | - break; | |
303 | - | |
304 | - default: | |
305 | - mauvaiseRequete(1); | |
306 | - break; | |
307 | - } | |
308 | -} | |
309 | - | |
310 | - | |
311 | -# AFFICHAGE DE LA PAGE | |
312 | - | |
313 | -# Tri des évènements | |
314 | -$evenementsPlanifies = array(); | |
315 | -$evenementsAPlanifier = array(); | |
316 | -$evenementsPasses = array(); | |
317 | - | |
318 | -foreach (Evenement::$tout as $evenement) { | |
319 | - if (!$evenement->supprime) { | |
320 | - if ($evenement->valide) { | |
321 | - if ($evenement->passe()) { | |
322 | - $evenementsPasses[] = $evenement; | |
323 | - } else { | |
324 | - $evenementsPlanifies[] = $evenement; | |
325 | - } | |
326 | - } else { | |
327 | - $evenementsAPlanifier[] = $evenement; | |
328 | - } | |
329 | - } | |
330 | -} | |
331 | - | |
332 | -# Affichage | |
333 | - | |
334 | -if (!$e_connecte) { | |
335 | -?> | |
336 | -<div class="alert alert-warning" role="alert">Connectez-vous afin de pouvoir agir sur les évènements.</div> | |
337 | -<?php | |
338 | -} | |
339 | - | |
340 | - | |
341 | -if (in_array('voir', $droits)) { | |
342 | -// TODO Message si catégorie vide | |
343 | -?> | |
344 | -<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> | |
345 | -<ul id="ev_ul_planifies" class="list-group"> | |
346 | -<?php | |
347 | -foreach ($evenementsPlanifies as $evenement) { | |
348 | - echo $evenement->html(); | |
349 | -} | |
350 | -?> | |
351 | -</ul> | |
352 | - | |
353 | - | |
354 | -<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> | |
355 | -<ul id="ev_ul_aplanifier" class="list-group"> | |
356 | -<?php | |
357 | -foreach ($evenementsAPlanifier as $evenement) { | |
358 | - echo $evenement->html(); | |
359 | -} | |
360 | -?> | |
361 | -</ul> | |
362 | - | |
363 | - | |
364 | -<h3>Évènements passés</h3> | |
365 | -<ul id="ev_ul_passes" class="list-group"> | |
366 | -<?php | |
367 | -foreach ($evenementsPasses as $evenement) { | |
368 | - echo $evenement->html(); | |
369 | -} | |
370 | -?> | |
371 | -</ul> | |
372 | - | |
373 | -<script type="text/javascript" src="js/orga.js"></script> | |
374 | - | |
375 | -<?php | |
376 | -} else { | |
377 | -?> | |
378 | -<div class="alert alert-danger" role="alert">Vous ne pouvez pas voir les évènements.</div> | |
379 | -<?php | |
380 | -} | |
381 | -?> | |
382 | 0 | \ No newline at end of file |
sendNews.php deleted
... | ... | @@ -1,12 +0,0 @@ |
1 | -<?php | |
2 | -require_once("creds.php"); | |
3 | - | |
4 | -$link = mysql_connect(__MYSQL_HOSTNAME__, __MYSQL_USERNAME__, __MYSQL_PASSWORD__) | |
5 | - or die("Impossible de se connecter : " . mysql_error()); | |
6 | -if(!mysql_select_db('crep', $link)) | |
7 | -{ | |
8 | - echo 'Selection de la base de donnees impossible'; | |
9 | - exit; | |
10 | -} | |
11 | -$requete = "INSERT INTO `crep`.`news` (`pk` ,`fk_author` ,`created` ,`title` ,`content`) VALUES (NULL , '2', CURDATE(), \"".base64_decode($_POST["title"])."\", \"".base64_decode($_POST["content"])."\")"; | |
12 | -$resultat = mysql_query($requete); |