+ function handler_tips(&$page, $tips = null)
+ {
+ $page->changeTpl('include/tips.tpl', NO_SKIN);
+ $page->assign('tips', $this->get_tips($tips));
+ }
+
+ function handler_admin_tips(&$page, $action = 'list', $id = null)
+ {
+ $page->assign('xorg_title', 'Polytechnique.org - Administration - Astuces');
+ $page->assign('title', 'Gestion des Astuces');
+ $table_editor = new PLTableEditor('admin/tips', 'tips', 'id');
+ $table_editor->describe('peremption', 'date de péremption', true);
+ $table_editor->describe('promo_min', 'promo. min (0 aucune)', false);
+ $table_editor->describe('promo_max', 'promo. max (0 aucune)', false);
+ $table_editor->describe('titre', 'titre', true);
+ $table_editor->describe('state', 'actif', true);
+ $table_editor->describe('text', 'texte (html) de l\'astuce', false);
+ $table_editor->describe('priorite', 'priorité (0=min, 256=max)', false);
+ $table_editor->apply($page, $action, $id);
+ }
+