mirror of
https://github.com/WerySkok/nativegallery.git
synced 2024-12-23 09:01:03 +03:00
37 lines
No EOL
1.1 KiB
PHP
37 lines
No EOL
1.1 KiB
PHP
<?php
|
|
use \App\Services\{Auth, DB};
|
|
use \App\Models\User;
|
|
?>
|
|
<table class="table" style="margin-top: 15px;">
|
|
<thead>
|
|
<tr class="sticky">
|
|
<th class="c">ID</th>
|
|
<th class="c"></th>
|
|
<th class="c">Никнейм</th>
|
|
<th class="c">Почта</th>
|
|
<th class="c">Прямая загрузка</th>
|
|
<th class="c"></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php
|
|
$users = DB::query('SELECT * FROM users');
|
|
foreach ($users as $u) {
|
|
$user = new \App\Models\User($u['id']);
|
|
if ($user->content('premoderation') === true) {
|
|
$prem = 'Да';
|
|
} else {
|
|
$prem = 'Нет';
|
|
}
|
|
echo '<tr>
|
|
<th class="n">'.$u['id'].'</th>
|
|
<td class="cs"><img src="'.$u['photourl'].'" width="35"></td>
|
|
<td class="cs">'.$u['username'].'</td>
|
|
<td class="cs">'.$u['email'].'</td>
|
|
<td class="cs">'.$prem.'</td>
|
|
<td class="cs"><div class="cmt-submit"><a href="/admin?type=UserEdit&user_id='.$u['id'].'">Редактировать</a></div></td>
|
|
</tr>';
|
|
}
|
|
?>
|
|
</tbody>
|
|
</table>
|