0337d704 |
1 | <?php |
2 | require 'xnet.inc.php'; |
3 | |
4 | if (!($cat = Get::get('cat'))) { |
fa36e526 |
5 | redirect("index.php"); |
0337d704 |
6 | exit; |
7 | } |
8 | |
9 | $_GET['cat'] = strtolower($cat); |
10 | |
11 | new_page('xnet/groupes.tpl', AUTH_PUBLIC); |
12 | |
13 | $res = $globals->xdb->query("SELECT id,nom FROM groupex.dom WHERE FIND_IN_SET({?}, cat) ORDER BY nom", $cat); |
14 | $doms = $res->fetchAllAssoc(); |
15 | $page->assign('doms', $doms); |
16 | |
17 | if (empty($doms)) { |
18 | $res = $globals->xdb->iterator("SELECT diminutif, nom FROM groupex.asso WHERE FIND_IN_SET({?}, cat) ORDER BY nom", $cat); |
19 | } elseif (Get::has('dom')) { |
20 | $res = $globals->xdb->iterator("SELECT diminutif, nom FROM groupex.asso WHERE FIND_IN_SET({?}, cat) AND dom={?} ORDER BY nom", $cat, Get::getInt('dom')); |
21 | } else { |
22 | $res = null; |
23 | } |
24 | $page->assign('gps', $res); |
25 | |
26 | $page->useMenu(); |
27 | $page->setType($cat); |
28 | $page->run(); |
29 | ?> |