Fixed showing of group names in overview

This commit is contained in:
kolaente 2017-05-07 22:29:31 +02:00 committed by konrad
parent 0b96919d0c
commit 7d2fdcfebc
3 changed files with 38 additions and 22 deletions

View File

@ -105,6 +105,7 @@ $lang['admins_title'] = 'Administratoren';
$lang['admins_list'] = 'Benutzerliste';
$lang['admins_groups'] = 'Benutzergruppen';
$lang['admins_permissions'] = 'Berechtigungen';
$lang['admins_group'] = 'Gruppe';
$lang['admins_create_new'] = 'Neuen Benutzer anlegen';
//Admin List
$lang['admins_id'] = 'ID';
@ -191,7 +192,7 @@ $lang['user_settings_log_level_3'] = 'Änderungen';
$lang['user_settings_log_level_4'] = 'Generelle Mitteilungen';
$lang['user_settings_log_level_fail'] = 'Fehler beim Speichern des Log-Levels.';
$lang['user_settings_log_level_success'] = 'Die Änderungen des Log-Levels wurden erfolgreich gespeichert.';
$lang['user_settings_none'] = 'keine <a href="%1$s">Einstellungen</a>';
$lang['user_settings_none'] = 'Keine. <a href="%1$s">Ändern</a>';
//Mail
$lang['mail_write'] = 'Email schreiben';

View File

@ -98,6 +98,7 @@ $lang['admins_title'] = 'Administrators';
$lang['admins_list'] = 'Userlist';
$lang['admins_groups'] = 'Usergroups';
$lang['admins_permissions'] = 'Permissions';
$lang['admins_group'] = 'Group';
$lang['admins_create_new'] = 'Create New User';
//Admin List
$lang['admins_id'] = 'ID';

View File

@ -1,45 +1,59 @@
<?php
require_once '../inc/autoload_adm.php';
printHeader($lang->get('admins_list'));
if(hasPerm('manage_admins'))
if (hasPerm('manage_admins'))
{
?>
<div class="main">
<table>
<tr>
<th><?php echo $lang->get('admins_id');?></th>
<th><?php echo $lang->get('admins_users');?></th>
<th><?php echo $lang->get('admins_permissions');?></th>
<th><?php echo $lang->get('admins_mail');?></th>
<th></th>
</tr>
<table>
<tr>
<th><?php echo $lang->get('admins_id'); ?></th>
<th><?php echo $lang->get('admins_users'); ?></th>
<th><?php echo $lang->get('admins_group'); ?></th>
<th><?php echo $lang->get('admins_mail'); ?></th>
<th></th>
</tr>
<?php
$db->setCol('system_admins');
$db->get();
foreach ($db->data as $user)
$users = $db->data;
foreach ($users as $user)
{
?>
<tr>
<td><?php echo $user['id']; ?></td>
<td><?php echo $user['username']; ?></td>
<td><?php echo $user['lvl']; ?></td>
<td><?php if ($user['mail'] === '')
<tr>
<td><?php echo $user['id']; ?></td>
<td><?php echo $user['username']; ?></td>
<td><?php
$db->setCol('system_roles');
$db->data['id'] = $user['lvl'];
$db->get();
if (isset($db->data[0]))
{
echo '<i>'.$lang->get('admins_not_set').'</i>';
echo '<a href="'.$MCONF['web_uri'].'admin/roles.php?members='.$user['lvl'].'">'.$db->data[0]['name'].'</a>';
}
else
{
echo '<i>'.sprintf($lang->get('user_settings_none'), $MCONF['web_uri']. 'admin/roles.php').'</i>';
}
?></td>
<td><?php if ($user['mail'] === '')
{
echo '<i>' . $lang->get('admins_not_set') . '</i>';
} else
{
?>
<a href="mail.php?to=<?php echo $user['mail']; ?>"
title="<?php printf($lang->get('admins_write_mail'), $user['username']);?>"><?php echo $user['mail']; ?></a>
<a href="mail.php?to=<?php echo $user['mail']; ?>"
title="<?php printf($lang->get('admins_write_mail'), $user['username']); ?>"><?php echo $user['mail']; ?></a>
<?php
}
?></td>
<td><a href="user_settings.php?uid=<?php echo $user['id']; ?>"><?php echo $lang->get('settings');?></a></td>
</tr>
<td><a href="user_settings.php?uid=<?php echo $user['id']; ?>"><?php echo $lang->get('settings'); ?></a>
</td>
</tr>
<?php
}
?>
</table>
</table>
<?php
}
else