root/dev/common/admin/admin_roles.php @ 207

Revision 207, 1.1 KB (checked in by ralle030583, 15 years ago)

- added system search
- added 12 new ship Signatures (thx to Arthur Ffrub)
- removed again some not needed includes

Line 
1<?php
2$page = new Page();
3$page->setAdmin();
4$page->setTitle('Administration - Role Management');
5
6if ($_REQUEST['action'] == 'search')
7{
8    $hitlist = array();
9    $search = slashfix($_REQUEST['search']);
10    $qry = new DBQuery();
11    $qry->execute('select usr_login from kb3_user where usr_login like '."'%".$search."%'");
12    while ($row = $qry->getRow())
13    {
14        $hitlist[] = $row['usr_login'];
15    }
16
17    $smarty->assign_by_ref('user', $hitlist);
18
19    $page->addContext($menubox->generate());
20    $page->setContent($smarty->fetch(get_tpl('admin_roles_assign')));
21    $page->generate();
22}
23elseif ($_REQUEST['action'] == 'create')
24{
25    $page->addContext($menubox->generate());
26    $page->setContent('to be done');
27    $page->generate();
28}
29else
30{
31    $hardcoded = &role::get(true);
32    $softcoded = &role::get();
33
34    $smarty->assign_by_ref('hroles', $hardcoded);
35    $smarty->assign_by_ref('sroles', $softcoded);
36
37    $page->addContext($menubox->generate());
38    $page->setContent($smarty->fetch(get_tpl('admin_roles')));
39    $page->generate();
40}
41?>
Note: See TracBrowser for help on using the browser.