function handler_forums_bans($page, $action = 'list', $id = null) { $page->setTitle('Administration - Bannissements des forums'); $page->assign('title', 'Gestion des mises au ban'); $table_editor = new PLTableEditor('admin/forums', 'forum_innd', 'id_innd'); $table_editor->add_sort_field('priority', true, true); $table_editor->describe('read_perm', 'lecture', true); $table_editor->describe('write_perm', 'écriture', true); $table_editor->describe('priority', 'priorité', true); $table_editor->describe('comment', 'commentaire', true); $table_editor->apply($page, $action, $id); $page->changeTpl('forums/admin.tpl'); }
function handler_adm_bankaccounts($page, $action = "list", $id = null) { // managment of bank account used for money transfert $page->setTitle('Administration - Paiements - RIBs'); $page->assign('title', "Liste des RIBs"); $table_editor = new PLTableEditor('admin/payments/bankaccounts', 'payment_bankaccounts', 'id'); $table_editor->describe('asso_id', 'ID du groupe', false, true); $table_editor->describe('owner', 'titulaire', true); $table_editor->add_option_table('groups', 'groups.id = t.asso_id'); $table_editor->add_option_field('groups.diminutif', 'group_name', 'groupe', 'varchar', 'iban'); $table_editor->add_sort_field('status'); $table_editor->add_sort_field('group_name', false); /* check RIB key FIXME: the column format (and name) changed if ($action == 'update' && Post::has('account') && !check_rib(Post::v('account'))) { $page->trigError("Le RIB n'est pas valide"); $table_editor->apply($page, 'edit', $id); return; } */ $table_editor->apply($page, $action, $id); }