2015-10-19 00:45:58 +02:00
|
|
|
<?php
|
2015-05-05 03:00:01 +02:00
|
|
|
|
2018-04-15 22:23:11 +02:00
|
|
|
echo Bootstrap::pageTitle(array('title'=>$L->g('Users'), 'icon'=>'person'));
|
2015-05-05 03:00:01 +02:00
|
|
|
|
2018-04-15 22:23:11 +02:00
|
|
|
echo Bootstrap::link(array(
|
|
|
|
'title'=>$L->g('add-a-new-user'),
|
|
|
|
'href'=>HTML_PATH_ADMIN_ROOT.'new-user',
|
|
|
|
'icon'=>'plus'
|
|
|
|
));
|
2015-10-19 00:45:58 +02:00
|
|
|
|
|
|
|
echo '
|
2018-04-15 22:23:11 +02:00
|
|
|
<table class="table table-striped mt-3">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th class="border-bottom-0" scope="col">'.$L->g('Username').'</th>
|
2018-04-27 20:36:43 +02:00
|
|
|
<th class="border-bottom-0 d-none d-lg-table-cell" scope="col">'.$L->g('First name').'</th>
|
|
|
|
<th class="border-bottom-0 d-none d-lg-table-cell" scope="col">'.$L->g('Last name').'</th>
|
2018-04-15 22:23:11 +02:00
|
|
|
<th class="border-bottom-0" scope="col">'.$L->g('Email').'</th>
|
|
|
|
<th class="border-bottom-0" scope="col">'.$L->g('Status').'</th>
|
|
|
|
<th class="border-bottom-0" scope="col">'.$L->g('Role').'</th>
|
2018-04-27 20:36:43 +02:00
|
|
|
<th class="border-bottom-0 d-none d-lg-table-cell" scope="col">'.$L->g('Registered').'</th>
|
2018-04-15 22:23:11 +02:00
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
2015-10-19 00:45:58 +02:00
|
|
|
';
|
|
|
|
|
2017-09-23 15:15:29 +02:00
|
|
|
$users = $dbUsers->getAllUsers();
|
|
|
|
foreach ($users as $username=>$User) {
|
2015-10-19 00:45:58 +02:00
|
|
|
echo '<tr>';
|
|
|
|
echo '<td><a href="'.HTML_PATH_ADMIN_ROOT.'edit-user/'.$username.'">'.$username.'</a></td>';
|
2018-04-27 20:36:43 +02:00
|
|
|
echo '<td class="d-none d-lg-table-cell">'.$User->firstName().'</td>';
|
|
|
|
echo '<td class="d-none d-lg-table-cell">'.$User->lastName().'</td>';
|
2017-09-23 15:15:29 +02:00
|
|
|
echo '<td>'.$User->email().'</td>';
|
2018-04-27 20:36:43 +02:00
|
|
|
echo '<td>'.($User->enabled()?'<b>'.$L->g('Enabled').'</b>':$L->g('Disabled')).'</td>';
|
2018-06-25 23:17:43 +02:00
|
|
|
if ($User->role()=='admin') {
|
|
|
|
echo '<td>'.$L->g('Administrator').'</td>';
|
|
|
|
} elseif ($User->role()=='moderator') {
|
|
|
|
echo '<td>'.$L->g('Moderator').'</td>';
|
|
|
|
} elseif ($User->role()=='editor') {
|
|
|
|
echo '<td>'.$L->g('Editor').'</td>';
|
|
|
|
}
|
2018-04-27 20:36:43 +02:00
|
|
|
echo '<td class="d-none d-lg-table-cell">'.Date::format($User->registered(), DB_DATE_FORMAT, ADMIN_PANEL_DATE_FORMAT).'</td>';
|
2015-10-19 00:45:58 +02:00
|
|
|
echo '</tr>';
|
|
|
|
}
|
|
|
|
|
|
|
|
echo '
|
2018-04-15 22:23:11 +02:00
|
|
|
</tbody>
|
2015-10-19 00:45:58 +02:00
|
|
|
</table>
|
2018-04-15 22:23:11 +02:00
|
|
|
';
|