Translated using Weblate (Slovenian)
[phpmyadmin.git] / libraries / server_users.lib.php
blob807eaa19b8401871f34bf94411b51140fba94304
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * set of common functions for sub tabs in server level `Users` page
6 * @package PhpMyAdmin
7 */
9 if (! defined('PHPMYADMIN')) {
10 exit;
13 /**
14 * Get HTML for secondary level menu tabs on 'Users' page
16 * @param string $selfUrl Url of the file
18 * @return string HTML for secondary level menu tabs on 'Users' page
20 function PMA_getHtmlForSubMenusOnUsersPage($selfUrl)
22 $url_params = PMA_URL_getCommon();
23 $items = array(
24 array(
25 'name' => __('Users overview'),
26 'url' => 'server_privileges.php',
27 'specific_params' => '&viewing_mode=server'
31 if ($GLOBALS['is_superuser']) {
32 $items[] = array(
33 'name' => __('User groups'),
34 'url' => 'server_user_groups.php',
35 'specific_params' => ''
39 $retval = '<ul id="topmenu2">';
40 foreach ($items as $item) {
41 $class = '';
42 if ($item['url'] === $selfUrl) {
43 $class = ' class="tabactive"';
45 $retval .= '<li>';
46 $retval .= '<a' . $class;
47 $retval .= ' href="' . $item['url']
48 . $url_params . $item['specific_params'] . '">';
49 $retval .= $item['name'];
50 $retval .= '</a>';
51 $retval .= '</li>';
53 $retval .= '</ul>';
54 $retval .= '<div class="clearfloat"></div>';
56 return $retval;