X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=modules%2Fxnet.php;h=f3cf0f9417ca5c4bb4ee5884b6fd672c9091757b;hb=1d10d3fd659fa8eb7c663d6bb599bc8bbc0feeb3;hp=5427a27a66330218d7edc78589344f166b0d19e9;hpb=9bb8bf21cfc5b5f47805cd54d64cfeae75ce1de3;p=platal.git diff --git a/modules/xnet.php b/modules/xnet.php index 5427a27..f3cf0f9 100644 --- a/modules/xnet.php +++ b/modules/xnet.php @@ -32,30 +32,39 @@ class XnetModule extends PLModule 'groups' => $this->make_hook('groups', AUTH_PUBLIC), 'groupes.php' => $this->make_hook('groups2', AUTH_PUBLIC), 'plan' => $this->make_hook('plan', AUTH_PUBLIC), + 'send_bug' => $this->make_hook('bug', AUTH_MDP), ); } + function handler_bug(&$page) + { + $this->handler_index(&$page); + $page->assign('bug', 1); + } + function handler_index(&$page) { + $page->nomenu = true; $page->changeTpl('xnet/index.tpl'); } function handler_login(&$page) { - pl_redirect(''); + $allkeys = func_get_args(); + unset($allkeys[0]); + $url = join('/',$allkeys); + pl_redirect($url); } function handler_exit(&$page) { XnetSession::destroy(); $page->changeTpl('xnet/deconnexion.tpl'); - $page->useMenu(); } function handler_admin(&$page) { new_admin_page('xnet/admin.tpl'); - $page->useMenu(); if (Get::has('del')) { $res = XDB::query('SELECT id, nom, mail_domain @@ -141,7 +150,6 @@ class XnetModule extends PLModule WHERE FIND_IN_SET("Institutions", cat) ORDER BY diminutif'); $page->assign('inst', $res); - $page->useMenu(); } function handler_groups2(&$page) @@ -168,18 +176,17 @@ class XnetModule extends PLModule $page->assign('doms', $doms); if (empty($doms)) { - $res = XDB::query("SELECT diminutif, nom FROM groupex.asso + $res = XDB::query("SELECT diminutif, nom, site FROM groupex.asso WHERE FIND_IN_SET({?}, cat) ORDER BY nom", $cat); $page->assign('gps', $res->fetchAllAssoc()); } elseif (!is_null($dom)) { - $res = XDB::query("SELECT diminutif, nom FROM groupex.asso + $res = XDB::query("SELECT diminutif, nom, site FROM groupex.asso WHERE FIND_IN_SET({?}, cat) AND dom={?} ORDER BY nom", $cat, $dom); $page->assign('gps', $res->fetchAllAssoc()); } - $page->useMenu(); $page->setType($cat); } }