2023-10-21 17:06:20 +02:00
|
|
|
<div class="hidden sm:mb-8 sm:flex sm:justify-center">
|
2023-10-22 01:46:22 +02:00
|
|
|
<div class="relative rounded-full px-3 py-1 text-sm leading-6 text-gray-600 ring-1 ring-gray-900/10 hover:ring-gray-900/20">
|
|
|
|
Currently logged in as: <?= $_SESSION['userid']?:'nobody' ?>
|
2023-10-21 17:06:20 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="text-center">
|
|
|
|
<h1 class="text-4xl font-bold tracking-tight text-gray-900 sm:text-6xl">Dogstats - der Agilityhelfer</h1>
|
|
|
|
<p class="mt-6 text-lg leading-8 text-gray-600">Anim aute id magna aliqua ad ad non deserunt sunt.
|
|
|
|
Qui irure qui lorem cupidatat commodo. Elit sunt amet fugiat veniam occaecat fugiat aliqua.</p>
|
|
|
|
<div class="mt-10 flex items-center justify-center gap-x-6">
|
2023-10-22 01:46:22 +02:00
|
|
|
<a href="#" class="rounded-md bg-indigo-600 px-3.5 py-2.5 text-sm font-semibold text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600">Get
|
2023-10-21 17:06:20 +02:00
|
|
|
started</a>
|
2023-10-22 01:46:22 +02:00
|
|
|
<a href="#" class="text-sm font-semibold leading-6 text-gray-900">Learn more <span aria-hidden="true">→</span></a>
|
2023-10-21 17:06:20 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2023-10-22 01:46:22 +02:00
|
|
|
<h1 class="text-2xl p-6 text-center">Admin stuff</h1>
|
|
|
|
|
2023-10-21 17:06:20 +02:00
|
|
|
<div class="container flex justify-center mx-auto">
|
|
|
|
<div class="flex flex-col">
|
|
|
|
<div class="w-full">
|
|
|
|
<div class="border-b border-gray-200 shadow">
|
|
|
|
<table class="divide-y divide-gray-300 ">
|
|
|
|
<thead class="bg-gray-50">
|
|
|
|
<tr>
|
2023-10-22 01:46:22 +02:00
|
|
|
<?php foreach (array_keys($userdata[0]) as $key) : ?>
|
2023-10-21 17:06:20 +02:00
|
|
|
<th class="px-6 py-2 text-xs text-gray-500">
|
2023-10-22 01:46:22 +02:00
|
|
|
<?= $key ?>
|
2023-10-21 17:06:20 +02:00
|
|
|
</th>
|
2023-10-22 01:46:22 +02:00
|
|
|
<?php endforeach; ?>
|
|
|
|
|
2023-10-21 17:06:20 +02:00
|
|
|
<th class="px-6 py-2 text-xs text-gray-500">
|
2023-10-22 01:46:22 +02:00
|
|
|
Login
|
2023-10-21 17:06:20 +02:00
|
|
|
</th>
|
|
|
|
<th class="px-6 py-2 text-xs text-gray-500">
|
|
|
|
Edit
|
|
|
|
</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody class="bg-white divide-y divide-gray-300">
|
2023-10-22 01:46:22 +02:00
|
|
|
<?php foreach ($userdata as $user) : ?>
|
2023-10-21 17:06:20 +02:00
|
|
|
|
2023-10-22 01:46:22 +02:00
|
|
|
<tr class="whitespace-nowrap">
|
|
|
|
<?php foreach (array_keys($user) as $key) : ?>
|
|
|
|
<td class="px-6 py-4 text-sm text-gray-500">
|
2023-10-22 23:05:24 +02:00
|
|
|
<?= is_array($user[$key])?json_encode($user[$key]):$user[$key] ?>
|
2023-10-22 01:46:22 +02:00
|
|
|
</td>
|
|
|
|
<?php endforeach; ?>
|
|
|
|
|
|
|
|
<td class="px-6 py-4">
|
|
|
|
<button name="email" value="<?= $user['email'] ?>" hx-post="/admin/loginas/" class="px-4 py-1 text-sm text-indigo-600 bg-indigo-200 rounded-full">Login as this user</button>
|
|
|
|
</td>
|
|
|
|
<td class="px-6 py-4">
|
|
|
|
<button name="email" value="<?= $user['email'] ?>" hx-post="/admin/edituser/" hx-target="#main" class="px-4 py-1 text-sm text-red-400 bg-red-200 rounded-full">Edit</button>
|
|
|
|
</td>
|
|
|
|
</tr>
|
2023-10-21 17:06:20 +02:00
|
|
|
|
|
|
|
<?php endforeach; ?>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|