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

Revision 191, 1.1 KB (checked in by exi, 16 years ago)

Fixed a bug which prevented some options from beeing saved properly.
Added code to the http request class to support cookies.
Added a small summary option for the killsummarytables.
System location will now get classified in the battleparser too.

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