Translated using Weblate (Dutch)
[phpmyadmin.git] / server_user_groups.php
blob7236a9161551b22be5acafe701595a6f3960706a
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * Displays the 'User groups' sub page under 'Users' page.
6 * @package PhpMyAdmin
7 */
9 require_once 'libraries/common.inc.php';
10 require_once 'libraries/server_users.lib.php';
11 require_once 'libraries/server_user_groups.lib.php';
13 PMA_getRelationsParam();
14 if (! $GLOBALS['cfgRelation']['menuswork']) {
15 exit;
18 $response = PMA_Response::getInstance();
19 $header = $response->getHeader();
20 $scripts = $header->getScripts();
21 $scripts->addFile('server_user_groups.js');
23 $response->addHTML('<div>');
24 $response->addHTML(PMA_getHtmlForSubMenusOnUsersPage('server_user_groups.php'));
26 /**
27 * Delete user group
29 if (! empty($_REQUEST['deleteUserGroup'])) {
30 PMA_deleteUserGroup($_REQUEST['userGroup']);
33 /**
34 * Add a new user group
36 if (! empty($_REQUEST['addUserGroupSubmit'])) {
37 PMA_editUserGroup($_REQUEST['userGroup'], true);
40 /**
41 * Update a user group
43 if (! empty($_REQUEST['editUserGroupSubmit'])) {
44 PMA_editUserGroup($_REQUEST['userGroup']);
47 if (isset($_REQUEST['viewUsers'])) {
48 // Display users belonging to a user group
49 $response->addHTML(PMA_getHtmlForListingUsersofAGroup($_REQUEST['userGroup']));
52 if (isset($_REQUEST['addUserGroup'])) {
53 // Display add user group dialog
54 $response->addHTML(PMA_getHtmlToEditUserGroup());
55 } elseif (isset($_REQUEST['editUserGroup'])) {
56 // Display edit user group dialog
57 $response->addHTML(PMA_getHtmlToEditUserGroup($_REQUEST['userGroup']));
58 } else {
59 // Display user groups table
60 $response->addHTML(PMA_getHtmlForUserGroupsTable());
63 $response->addHTML('</div>');