init
[garradin.git] / www / admin / compta / categories / index.php
1 <?php
2 namespace Garradin;
3
4 require_once __DIR__ . '/../_inc.php';
5
6 if ($user['droits']['compta'] < Membres::DROIT_ADMIN)
7 {
8 throw new UserException("Vous n'avez pas le droit d'accéder à cette page.");
9 }
10
11 $cats = new Compta_Categories;
12
13 if (isset($_GET['depenses']))
14 $type = Compta_Categories::DEPENSES;
15 else
16 $type = Compta_Categories::RECETTES;
17
18 $tpl->assign('type', $type);
19 $tpl->assign('liste', $cats->getList($type));
20
21 $tpl->display('admin/compta/categories/index.tpl');
22
23 ?>