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 membre manquant.");
16 $id = (int) $_GET['id'];
18 $membre = $membres->get($id);
22 throw new UserException("Ce membre n'existe pas.");
25 $cats = new Membres_Categories
;
27 $categorie = $cats->get($membre['id_categorie']);
28 $tpl->assign('categorie', $categorie);
30 $cotisations = new Cotisations_Membres
;
32 if (!empty($categorie['id_cotisation_obligatoire']))
34 $tpl->assign('cotisation', $cotisations->isMemberUpToDate($membre['id'], $categorie['id_cotisation_obligatoire']));
38 $tpl->assign('cotisation', false);
41 $tpl->assign('nb_activites', $cotisations->countForMember($membre['id']));
42 $tpl->assign('cotisations', $cotisations->listForMember($membre['id']));
43 $tpl->assign('cotisations_membre', $cotisations->listSubscriptionsForMember($membre['id']));
45 $tpl->assign('membre', $membre);
47 $tpl->display('admin/membres/cotisations.tpl');