74e0093f |
1 | <?php |
2 | /*************************************************************************** |
3 | * Copyright (C) 2003-2006 Polytechnique.org * |
4 | * http://opensource.polytechnique.org/ * |
5 | * * |
6 | * This program is free software; you can redistribute it and/or modify * |
7 | * it under the terms of the GNU General Public License as published by * |
8 | * the Free Software Foundation; either version 2 of the License, or * |
9 | * (at your option) any later version. * |
10 | * * |
11 | * This program is distributed in the hope that it will be useful, * |
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * |
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * |
14 | * GNU General Public License for more details. * |
15 | * * |
16 | * You should have received a copy of the GNU General Public License * |
17 | * along with this program; if not, write to the Free Software * |
18 | * Foundation, Inc., * |
19 | * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * |
20 | ***************************************************************************/ |
21 | |
22 | class EventsModule extends PLModule |
23 | { |
24 | function handlers() |
25 | { |
26 | return array( |
1a828cd4 |
27 | 'events' => $this->make_hook('ev', AUTH_COOKIE), |
0535ed02 |
28 | 'send_bug' => $this->make_hook('bug', AUTH_COOKIE), |
1a828cd4 |
29 | 'events/submit' => $this->make_hook('ev_submit', AUTH_MDP), |
92423144 |
30 | 'admin/events' => $this->make_hook('admin_events', AUTH_MDP, 'admin'), |
b829e258 |
31 | |
dc767839 |
32 | 'ajax/tips' => $this->make_hook('tips', AUTH_COOKIE, '', NO_AUTH), |
33 | 'admin/tips' => $this->make_hook('admin_tips', AUTH_MDP, 'admin'), |
34 | |
164ca57a |
35 | 'nl' => $this->make_hook('nl', AUTH_COOKIE), |
36 | 'nl/show' => $this->make_hook('nl_show', AUTH_COOKIE), |
37 | 'nl/submit' => $this->make_hook('nl_submit', AUTH_COOKIE), |
92423144 |
38 | 'admin/newsletter' => $this->make_hook('admin_nl', AUTH_MDP, 'admin'), |
39 | 'admin/newsletter/categories' => $this->make_hook('admin_nl_cat', AUTH_MDP, 'admin'), |
40 | 'admin/newsletter/edit' => $this->make_hook('admin_nl_edit', AUTH_MDP, 'admin'), |
74e0093f |
41 | ); |
42 | } |
43 | |
8d8f7607 |
44 | function on_subscribe($forlife, $uid, $promo, $password) |
45 | { |
46 | require_once 'newsletter.inc.php'; |
47 | subscribe_nl($uid); |
48 | } |
49 | |
dc767839 |
50 | function get_tips($exclude = null) |
51 | { |
52 | $exclude = is_null($exclude) ? '' : ' AND id != ' . $exclude . ' '; |
53 | $priority = rand(0, 510); |
54 | do { |
55 | $priority = (int)($priority/2); |
56 | $res = XDB::query("SELECT * |
57 | FROM tips |
58 | WHERE (peremption = '0000-00-00' OR peremption > CURDATE()) |
59 | AND (promo_min = 0 OR promo_min <= {?}) |
60 | AND (promo_max = 0 OR promo_max >= {?}) |
61 | AND (priorite >= {?}) |
5d617d8d |
62 | AND (state = 'active') |
dc767839 |
63 | $exclude |
64 | ORDER BY RAND() |
65 | LIMIT 1", |
66 | S::i('promo'), S::i('promo'), $priority); |
67 | } while ($priority && !$res->numRows()); |
68 | if (!$res->numRows()) { |
69 | return null; |
70 | } |
71 | return $res->fetchOneAssoc(); |
72 | } |
73 | |
0535ed02 |
74 | function handler_bug(&$page) |
75 | { |
987f1bd2 |
76 | $page->changeTpl('bug.tpl',SIMPLE); |
77 | $page->addJsLink('close_on_esc.js'); |
78 | if (Env::has('send')) { |
79 | $page->assign('bug_sent',1); |
1e33266a |
80 | $mymail = new PlMailer(); |
987f1bd2 |
81 | $mymail->setFrom('"'.S::v('prenom').' '.S::v('nom').'" <'.S::v('bestalias').'@polytechnique.org>'); |
82 | $mymail->addTo('support+platal@polytechnique.org'); |
83 | $mymail->setSubject('Plat/al '.Env::v('task_type').' : '.Env::v('item_summary')); |
84 | $mymail->setTxtBody(Env::v('detailed_desc')); |
85 | $mymail->send(); |
86 | } |
0535ed02 |
87 | } |
88 | |
096f0dca |
89 | function handler_ev(&$page, $action = 'list', $eid = null, $pound = null) |
1a828cd4 |
90 | { |
1a828cd4 |
91 | $page->changeTpl('login.tpl'); |
dc767839 |
92 | $page->addJsLink('ajax.js'); |
93 | $page->assign('tips', $this->get_tips()); |
94 | |
4c92c8b2 |
95 | // donne la derniere date de session |
96 | $page->assign('lastlogin', strftime("%Y%m%d%H%M%S",S::i('lastlogin'))); |
1a828cd4 |
97 | |
08cce2ff |
98 | $res = XDB::query('SELECT date, naissance FROM auth_user_md5 |
cab08090 |
99 | WHERE user_id={?}', S::v('uid')); |
1a828cd4 |
100 | list($date, $naissance) = $res->fetchOneRow(); |
101 | |
089a5801 |
102 | // incitation à mettre à jour la fiche |
1a828cd4 |
103 | |
104 | $d2 = mktime(0, 0, 0, substr($date, 5, 2), substr($date, 8, 2), |
105 | substr($date, 0, 4)); |
106 | if( (time() - $d2) > 60 * 60 * 24 * 400 ) { |
107 | // si fiche date de + de 400j; |
108 | $page->assign('fiche_incitation', $date); |
109 | } |
110 | |
111 | // Souhaite bon anniversaire |
112 | |
113 | if (substr($naissance, 5) == date('m-d')) { |
114 | $page->assign('birthday', date('Y') - substr($naissance, 0, 4)); |
115 | } |
116 | |
089a5801 |
117 | // incitation à mettre une photo |
1a828cd4 |
118 | |
08cce2ff |
119 | $res = XDB::query('SELECT COUNT(*) FROM photo |
cab08090 |
120 | WHERE uid={?}', S::v('uid')); |
1a828cd4 |
121 | $page->assign('photo_incitation', $res->fetchOneCell() == 0); |
122 | |
089a5801 |
123 | // Incitation à se géolocaliser |
1a828cd4 |
124 | require_once 'geoloc.inc.php'; |
cab08090 |
125 | $res = localize_addresses(S::v('uid', -1)); |
1a828cd4 |
126 | $page->assign('geoloc_incitation', count($res)); |
127 | |
1a828cd4 |
128 | // ajout du lien RSS |
cab08090 |
129 | if (S::has('core_rss_hash')) { |
162370e7 |
130 | $page->setRssLink('Polytechnique.org :: News', |
131 | '/rss/'.S::v('forlife') .'/'.S::v('core_rss_hash').'/rss.xml'); |
1a828cd4 |
132 | } |
133 | |
134 | // cache les evenements lus et raffiche les evenements a relire |
4e61caea |
135 | if ($action == 'read' && $eid) { |
eadff9f9 |
136 | XDB::execute('DELETE evenements_vus.* |
137 | FROM evenements_vus AS ev |
138 | INNER JOIN evenements AS e ON e.id = ev.evt_id |
139 | WHERE peremption < NOW()'); |
08cce2ff |
140 | XDB::execute('REPLACE INTO evenements_vus VALUES({?},{?})', |
096f0dca |
141 | $eid, S::v('uid')); |
142 | pl_redirect('events#'.$pound); |
1a828cd4 |
143 | } |
144 | |
4e61caea |
145 | if ($action == 'unread' && $eid) { |
08cce2ff |
146 | XDB::execute('DELETE FROM evenements_vus |
eadff9f9 |
147 | WHERE evt_id = {?} AND user_id = {?}', |
4e61caea |
148 | $eid, S::v('uid')); |
096f0dca |
149 | pl_redirect('events#newsid'.$eid); |
1a828cd4 |
150 | } |
151 | |
152 | // affichage des evenements |
089a5801 |
153 | // annonces promos triées par présence d'une limite sur les promos |
1a828cd4 |
154 | // puis par dates croissantes d'expiration |
cab08090 |
155 | $promo = S::v('promo'); |
1a828cd4 |
156 | $sql = "SELECT e.id,e.titre,e.texte,a.user_id,a.nom,a.prenom,a.promo,l.alias AS forlife |
2f678da1 |
157 | FROM evenements AS e |
158 | INNER JOIN auth_user_md5 AS a ON e.user_id=a.user_id |
159 | INNER JOIN aliases AS l ON ( a.user_id=l.id AND l.type='a_vie' ) |
160 | LEFT JOIN evenements_vus AS ev ON (e.id = ev.evt_id AND ev.user_id = {?}) |
1a828cd4 |
161 | WHERE FIND_IN_SET(e.flags, 'valide') AND peremption >= NOW() |
162 | AND (e.promo_min = 0 || e.promo_min <= {?}) |
163 | AND (e.promo_max = 0 || e.promo_max >= {?}) |
164 | AND ev.user_id IS NULL |
165 | ORDER BY (e.promo_min != 0 AND e.promo_max != 0) DESC, e.peremption"; |
166 | $page->assign('evenement', |
cab08090 |
167 | XDB::iterator($sql, S::v('uid'), |
1a828cd4 |
168 | $promo, $promo) |
169 | ); |
170 | |
171 | $sql = "SELECT e.id,e.titre, ev.user_id IS NULL AS nonlu |
172 | FROM evenements AS e |
173 | LEFT JOIN evenements_vus AS ev ON (e.id = ev.evt_id AND ev.user_id = {?}) |
174 | WHERE FIND_IN_SET(e.flags, 'valide') AND peremption >= NOW() |
175 | AND (e.promo_min = 0 || e.promo_min <= {?}) |
176 | AND (e.promo_max = 0 || e.promo_max >= {?}) |
177 | ORDER BY (e.promo_min != 0 AND e.promo_max != 0) DESC, e.peremption"; |
178 | $page->assign('evenement_summary', |
cab08090 |
179 | XDB::iterator($sql, S::v('uid'), |
1a828cd4 |
180 | $promo, $promo) |
181 | ); |
1a828cd4 |
182 | } |
183 | |
184 | function handler_ev_submit(&$page) |
74e0093f |
185 | { |
74e0093f |
186 | $page->changeTpl('evenements.tpl'); |
187 | |
5e2307dc |
188 | $titre = Post::v('titre'); |
189 | $texte = Post::v('texte'); |
190 | $promo_min = Post::i('promo_min'); |
191 | $promo_max = Post::i('promo_max'); |
192 | $peremption = Post::i('peremption'); |
193 | $valid_mesg = Post::v('valid_mesg'); |
194 | $action = Post::v('action'); |
74e0093f |
195 | |
2086ab7f |
196 | if ($promo_min > $promo_max || |
197 | ($promo_min != 0 && ($promo_min <= 1900 || $promo_min >= 2020)) || |
198 | ($promo_max != 0 && ($promo_max <= 1900 || $promo_max >= 2020))) |
199 | { |
200 | $page->trig("L'intervalle de promotions n'est pas valide"); |
201 | $action = null; |
202 | } |
203 | |
edd50750 |
204 | require_once('url_catcher.inc.php'); |
205 | $texte_catch_url = url_catcher($texte); |
206 | |
74e0093f |
207 | $page->assign('titre', $titre); |
208 | $page->assign('texte', $texte); |
edd50750 |
209 | $page->assign('texte_html', $texte_catch_url); |
74e0093f |
210 | $page->assign('promo_min', $promo_min); |
211 | $page->assign('promo_max', $promo_max); |
212 | $page->assign('peremption', $peremption); |
213 | $page->assign('valid_mesg', $valid_mesg); |
214 | $page->assign('action', strtolower($action)); |
215 | |
216 | if ($action == 'Confirmer') { |
edd50750 |
217 | $texte = $texte_catch_url; |
74e0093f |
218 | require_once 'validations.inc.php'; |
219 | $evtreq = new EvtReq($titre, $texte, $promo_min, $promo_max, |
cab08090 |
220 | $peremption, $valid_mesg, S::v('uid')); |
74e0093f |
221 | $evtreq->submit(); |
222 | $page->assign('ok', true); |
223 | } |
224 | |
225 | $select = ''; |
226 | for ($i = 1 ; $i < 30 ; $i++) { |
227 | $time = time() + 3600 * 24 * $i; |
228 | $p_stamp = date('Ymd', $time); |
229 | $year = date('Y', $time); |
230 | $month = date('m', $time); |
231 | $day = date('d', $time); |
232 | |
233 | $select .= "<option value=\"$p_stamp\""; |
234 | if ($p_stamp == strtr($peremption, array("-" => ""))) { |
235 | $select .= " selected='selected'"; |
236 | } |
237 | $select .= "> $day / $month / $year</option>\n"; |
238 | } |
239 | $page->assign('select',$select); |
74e0093f |
240 | } |
b829e258 |
241 | |
dc767839 |
242 | function handler_tips(&$page, $tips = null) |
243 | { |
244 | $page->changeTpl('include/tips.tpl', NO_SKIN); |
245 | $page->assign('tips', $this->get_tips($tips)); |
246 | } |
247 | |
248 | function handler_admin_tips(&$page, $action = 'list', $id = null) |
249 | { |
250 | $page->assign('xorg_title', 'Polytechnique.org - Administration - Astuces'); |
251 | $page->assign('title', 'Gestion des Astuces'); |
252 | $table_editor = new PLTableEditor('admin/tips', 'tips', 'id'); |
253 | $table_editor->describe('peremption', 'date de péremption', true); |
254 | $table_editor->describe('promo_min', 'promo. min (0 aucune)', false); |
255 | $table_editor->describe('promo_max', 'promo. max (0 aucune)', false); |
256 | $table_editor->describe('titre', 'titre', true); |
5d617d8d |
257 | $table_editor->describe('state', 'actif', true); |
dc767839 |
258 | $table_editor->describe('text', 'texte (html) de l\'astuce', false); |
259 | $table_editor->describe('priorite', 'priorité (0=min, 256=max)', false); |
260 | $table_editor->apply($page, $action, $id); |
261 | } |
262 | |
164ca57a |
263 | function handler_nl(&$page, $action = null) |
264 | { |
265 | require_once 'newsletter.inc.php'; |
266 | |
267 | $page->changeTpl('newsletter/index.tpl'); |
268 | $page->assign('xorg_title','Polytechnique.org - Lettres mensuelles'); |
269 | |
270 | switch ($action) { |
271 | case 'out': unsubscribe_nl(); break; |
272 | case 'in': subscribe_nl(); break; |
273 | default: ; |
274 | } |
275 | |
276 | $page->assign('nls', get_nl_state()); |
1a013db7 |
277 | $page->assign('nl_list', get_nl_list()); |
164ca57a |
278 | } |
279 | |
280 | function handler_nl_show(&$page, $nid = 'last') |
b829e258 |
281 | { |
282 | $page->changeTpl('newsletter/show.tpl'); |
283 | |
284 | require_once 'newsletter.inc.php'; |
285 | |
286 | $nl = new NewsLetter($nid); |
287 | $page->assign_by_ref('nl', $nl); |
288 | |
289 | if (Post::has('send')) { |
cab08090 |
290 | $nl->sendTo(S::v('prenom'), S::v('nom'), |
291 | S::v('bestalias'), S::v('femme'), |
91f42324 |
292 | S::v('mail_fmt') != 'texte'); |
b829e258 |
293 | } |
b829e258 |
294 | } |
164ca57a |
295 | |
296 | function handler_nl_submit(&$page) |
297 | { |
298 | $page->changeTpl('newsletter/submit.tpl'); |
299 | |
300 | require_once 'newsletter.inc.php'; |
301 | |
302 | if (Post::has('see')) { |
5e2307dc |
303 | $art = new NLArticle(Post::v('title'), Post::v('body'), Post::v('append')); |
164ca57a |
304 | $page->assign('art', $art); |
305 | } elseif (Post::has('valid')) { |
306 | require_once('validations.inc.php'); |
5e2307dc |
307 | $art = new NLReq(S::v('uid'), Post::v('title'), |
308 | Post::v('body'), Post::v('append')); |
164ca57a |
309 | $art->submit(); |
310 | $page->assign('submited', true); |
311 | } |
164ca57a |
312 | } |
92423144 |
313 | |
506a46ed |
314 | function handler_admin_events(&$page, $action = 'list', $eid = null) |
315 | { |
92423144 |
316 | $page->changeTpl('admin/evenements.tpl'); |
317 | $page->assign('xorg_title','Polytechnique.org - Administration - Evenements'); |
506a46ed |
318 | $page->register_modifier('hde', 'html_entity_decode'); |
319 | |
320 | $arch = $action == 'archives'; |
321 | $page->assign('action', $action); |
322 | |
01248e3a |
323 | if (Post::v('action') == "Proposer" && $eid) { |
2086ab7f |
324 | $promo_min = Post::i('promo_min'); |
325 | $promo_max = Post::i('promo_max'); |
326 | if ($promo_min > $promo_max || |
327 | ($promo_min != 0 && ($promo_min <= 1900 || $promo_min >= 2020)) || |
328 | ($promo_max != 0 && ($promo_max <= 1900 || $promo_max >= 2020))) |
329 | { |
330 | $page->trig("L'intervalle de promotions $promo_min -> $promo_max n'est pas valide"); |
331 | $action = 'edit'; |
332 | } else { |
333 | XDB::execute('UPDATE evenements |
334 | SET titre={?}, texte={?}, peremption={?}, promo_min={?}, promo_max={?} |
335 | WHERE id = {?}', |
336 | Post::v('titre'), Post::v('texte'), Post::v('peremption'), |
337 | Post::v('promo_min'), Post::v('promo_max'), $eid); |
338 | } |
92423144 |
339 | } |
506a46ed |
340 | |
341 | if ($action == 'edit') { |
342 | $res = XDB::query('SELECT titre, texte, peremption, promo_min, promo_max |
343 | FROM evenements |
344 | WHERE id={?}', $eid); |
345 | list($titre, $texte, $peremption, $promo_min, $promo_max) = $res->fetchOneRow(); |
346 | $page->assign('titre',$titre); |
347 | $page->assign('texte',$texte); |
348 | $page->assign('promo_min',$promo_min); |
349 | $page->assign('promo_max',$promo_max); |
350 | $page->assign('peremption',$peremption); |
351 | |
352 | $select = ""; |
353 | for ($i = 1 ; $i < 30 ; $i++) { |
354 | $p_stamp=date("Ymd",time()+3600*24*$i); |
355 | $year=substr($p_stamp,0,4); |
356 | $month=substr($p_stamp,4,2); |
357 | $day=substr($p_stamp,6,2); |
358 | |
359 | $select .= "<option value=\"$p_stamp\"" |
360 | . (($p_stamp == strtr($peremption, array("-" => ""))) ? " selected" : "") |
361 | . "> $day / $month / $year</option>\n"; |
362 | } |
363 | $page->assign('select',$select); |
364 | } else { |
365 | switch ($action) { |
366 | case 'delete': |
367 | XDB::execute('DELETE from evenements |
368 | WHERE id = {?}', $eid); |
369 | break; |
370 | |
371 | case "archive": |
372 | XDB::execute('UPDATE evenements |
373 | SET creation_date = creation_date, flags = CONCAT(flags,",archive") |
374 | WHERE id = {?}', $eid); |
375 | break; |
376 | |
377 | case "unarchive": |
378 | XDB::execute('UPDATE evenements |
379 | SET creation_date = creation_date, flags = REPLACE(flags,"archive","") |
380 | WHERE id = {?}', $eid); |
381 | $action = 'archives'; |
382 | $arch = true; |
383 | break; |
384 | |
385 | case "valid": |
386 | XDB::execute('UPDATE evenements |
387 | SET creation_date = creation_date, flags = CONCAT(flags,",valide") |
388 | WHERE id = {?}', $eid); |
389 | break; |
390 | |
391 | case "unvalid": |
392 | XDB::execute('UPDATE evenements |
393 | SET creation_date = creation_date, flags = REPLACE(flags,"valide", "") |
394 | WHERE id = {?}', $eid); |
395 | break; |
396 | } |
397 | |
398 | $pid = ($eid && $action == 'preview') ? $eid : -1; |
399 | $sql = "SELECT e.id, e.titre, e.texte,e.id = $pid AS preview, |
92423144 |
400 | DATE_FORMAT(e.creation_date,'%d/%m/%Y %T') AS creation_date, |
401 | DATE_FORMAT(e.peremption,'%d/%m/%Y') AS peremption, |
402 | e.promo_min, e.promo_max, |
403 | FIND_IN_SET('valide', e.flags) AS fvalide, |
404 | FIND_IN_SET('archive', e.flags) AS farch, |
405 | u.promo, u.nom, u.prenom, a.alias AS forlife |
406 | FROM evenements AS e |
407 | INNER JOIN auth_user_md5 AS u ON(e.user_id = u.user_id) |
408 | INNER JOIN aliases AS a ON (u.user_id = a.id AND a.type='a_vie') |
409 | WHERE ".($arch ? "" : "!")."FIND_IN_SET('archive',e.flags) |
506a46ed |
410 | ORDER BY FIND_IN_SET('valide',e.flags), e.peremption DESC"; |
92423144 |
411 | $page->assign('evs', XDB::iterator($sql)); |
412 | } |
506a46ed |
413 | $page->assign('arch', $arch); |
92423144 |
414 | } |
415 | |
416 | function handler_admin_nl(&$page, $new = false) { |
163eddd2 |
417 | $page->changeTpl('newsletter/admin.tpl'); |
92423144 |
418 | $page->assign('xorg_title','Polytechnique.org - Administration - Newsletter : liste'); |
419 | require_once("newsletter.inc.php"); |
420 | |
421 | if($new) { |
422 | insert_new_nl(); |
423 | pl_redirect("admin/newsletter"); |
424 | } |
425 | |
1a013db7 |
426 | $page->assign('nl_list', get_nl_slist()); |
92423144 |
427 | } |
428 | |
429 | function handler_admin_nl_edit(&$page, $nid = 'last', $aid = null, $action = 'edit') { |
163eddd2 |
430 | $page->changeTpl('newsletter/edit.tpl'); |
92423144 |
431 | $page->assign('xorg_title','Polytechnique.org - Administration - Newsletter : Edition'); |
432 | require_once("newsletter.inc.php"); |
433 | |
434 | $nl = new NewsLetter($nid); |
435 | |
436 | if($action == 'delete') { |
437 | $nl->delArticle($aid); |
438 | pl_redirect("admin/newsletter/edit/$nid"); |
439 | } |
440 | |
441 | if($aid == 'update') { |
ed76a506 |
442 | $nl->_title = Post::v('title'); |
8269d2d6 |
443 | $nl->_title_mail= Post::v('title_mail'); |
ed76a506 |
444 | $nl->_date = Post::v('date'); |
445 | $nl->_head = Post::v('head'); |
446 | $nl->_shortname = strlen(Post::v('shortname')) ? Post::v('shortname') : null; |
447 | if (preg_match('/^[-a-z0-9]*$/i', $nl->_shortname) && !is_numeric($nl->_shortname)) { |
448 | $nl->save(); |
449 | } else { |
450 | $page->trig('Le nom de la NL n\'est pas valide'); |
451 | pl_redirect('admin/newsletter/edit/' . $nl->_id); |
452 | } |
92423144 |
453 | } |
454 | |
455 | if(Post::v('save')) { |
456 | $art = new NLArticle(Post::v('title'), Post::v('body'), Post::v('append'), |
457 | $aid, Post::v('cid'), Post::v('pos')); |
458 | $nl->saveArticle($art); |
459 | pl_redirect("admin/newsletter/edit/$nid"); |
460 | } |
461 | |
ed76a506 |
462 | if($action == 'edit' && $aid != 'update') { |
92423144 |
463 | $eaid = $aid; |
464 | if(Post::has('title')) { |
465 | $art = new NLArticle(Post::v('title'), Post::v('body'), Post::v('append'), |
466 | $eaid, Post::v('cid'), Post::v('pos')); |
467 | } else { |
468 | $art = ($eaid == 'new') ? new NLArticle() : $nl->getArt($eaid); |
469 | } |
470 | $page->assign('art', $art); |
471 | } |
472 | |
473 | $page->assign_by_ref('nl',$nl); |
474 | } |
475 | function handler_admin_nl_cat(&$page, $action = 'list', $id = null) { |
92423144 |
476 | $page->assign('xorg_title','Polytechnique.org - Administration - Newsletter : Catégories'); |
477 | $page->assign('title', 'Gestion des catégories de la newsletter'); |
478 | $table_editor = new PLTableEditor('admin/newsletter/categories','newsletter_cat','cid'); |
479 | $table_editor->describe('titre','intitulé',true); |
480 | $table_editor->describe('pos','position',true); |
481 | $table_editor->apply($page, $action, $id); |
482 | } |
483 | |
74e0093f |
484 | } |
485 | |
486 | ?> |