4 require_once __DIR__
. '/../../_inc.php';
6 if ($user['droits']['membres'] < Membres
::DROIT_ECRITURE
)
8 throw new UserException("Vous n'avez pas le droit d'accéder à cette page.");
11 if (empty($_GET['id']) ||
!is_numeric($_GET['id']))
13 throw new UserException("Argument du numéro de cotisation manquant.");
16 $id = (int) $_GET['id'];
18 $cotisations = new Cotisations
;
19 $m_cotisations = new Cotisations_Membres
;
21 $co = $cotisations->get($id);
25 throw new UserException("Cette cotisation n'existe pas.");
28 $page = (int) utils
::get('p') ?
: 1;
30 $tpl->assign('page', $page);
31 $tpl->assign('bypage', Cotisations_Membres
::ITEMS_PER_PAGE
);
32 $tpl->assign('total', $m_cotisations->countMembersForCotisation($co['id']));
33 $tpl->assign('pagination_url', utils
::getSelfUrl(true) . '?id=' . $co['id'] . '&p=[ID]');
35 $tpl->assign('cotisation', $co);
36 $tpl->assign('order', utils
::get('o') ?
: 'date');
37 $tpl->assign('desc', !isset($_GET['a']));
38 $tpl->assign('liste', $m_cotisations->listMembersForCotisation(
39 $co['id'], $page, utils
::get('o'), isset($_GET['a']) ?
false : true));
41 $tpl->display('admin/membres/cotisations/voir.tpl');