nativegallery-weryskok/views/pages/Admin/General.php

39 lines
1.2 KiB
PHP
Raw Permalink Normal View History

2024-07-17 05:00:53 +03:00
<?php
use \App\Services\{Auth, DB};
use \App\Models\User;
?>
<table class="table" style="margin-top: 15px;">
<thead>
2024-07-20 23:04:27 +03:00
<tr>
<th scope="col">ID</th>
<th scope="col"></th>
<th scope="col">Никнейм</th>
<th scope="col">Почта</th>
<th scope="col">Прямая загрузка</th>
<th scope="col">Ссылка</th>
<th scope="col"></th>
2024-07-17 05:00:53 +03:00
</tr>
</thead>
<tbody>
<?php
$users = DB::query('SELECT * FROM users');
foreach ($users as $u) {
$user = new \App\Models\User($u['id']);
2024-07-18 18:23:20 +03:00
if ($user->content('premoderation') === "true") {
2024-07-17 05:00:53 +03:00
$prem = 'Да';
} else {
$prem = 'Нет';
}
echo '<tr>
2024-07-20 23:04:27 +03:00
<th>'.$u['id'].'</th>
<td><img src="'.$u['photourl'].'" width="35"></td>
<td>'.$u['username'].'</td>
<td>'.$u['email'].'</td>
<td>'.$prem.'</td>
<td><a href="https://'.$_SERVER['SERVER_NAME'].'/author/'.$u['id'].'">https://'.$_SERVER['SERVER_NAME'].'/author/'.$u['id'].'</a></td>
<td><div class="cmt-submit"><a href="/admin?type=UserEdit&user_id='.$u['id'].'">Редактировать</a></div></td>
2024-07-17 05:00:53 +03:00
</tr>';
}
?>
</tbody>
</table>