This repository has been archived on 2023-12-29. You can view files and clone it, but cannot push or open issues or pull requests.
dogstats/web/pages/home/home.html

108 lines
4.5 KiB
HTML
Raw Normal View History

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">
2023-10-23 13:05:16 +02:00
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-23 13:05:16 +02:00
<h1>Admin stuff</h1>
<div class="container text-center">
<div class="row">
<?php foreach ($userdata as $user) : ?>
<div class="m-3 col">
<div class="card">
<img src="<?= $user['photo']?:'https://pictshare.net/pj7vzx.jpg' ?>" class="card-img-top" alt="...">
<div class="card-body">
<h5 class="card-title"><?= escape($user['firstname'].' '.$user['lastname']) ?></h5>
<p class="card-text"><?= escape($user['email']) ?></p>
</div>
<ul class="list-group list-group-flush">
<li class="list-group-item">
<h6>uuid</h6>
<span class="badge rounded-pill text-bg-secondary"><?= escape($user['uuid']); ?></span>
</li>
<li class="list-group-item">
<h6>Registered</h6>
<?= escape($user['registered']); ?>
</li>
<li class="list-group-item">
<h6>last_login</h6>
<?= escape($user['last_login']); ?>
</li>
<li class="list-group-item">
<h6>Active</h6>
<?= $user['active']?'yes':'no'; ?>
</li>
<li class="list-group-item">
<h6>Dogs</h6>
<?php foreach($user['dogs'] as $dog): ?>
2023-10-29 17:39:33 +01:00
<a href="/dogs/overview/<?= $dog ?>" class="btn btn-secondary"><?= escape((new Dog())->getField('name',$dog)); ?></a>
<?php endforeach; ?>
</li>
</ul>
<div class="card-body">
<button class="btn btn-primary" name="email" value="<?= $user['email'] ?>" hx-post="/admin/loginas/">Login</button>
<button class="btn btn-primary"name="email" value="<?= $user['email'] ?>" hx-post="/admin/edituser/" hx-target="#main">Edit</button>
</div>
</div>
</div>
<?php endforeach; ?>
</div>
</div>
<!--
2023-10-27 12:31:50 +02:00
<figure class="table-responsive">
<table class="table" role="grid">
2023-10-23 13:05:16 +02:00
<thead>
<tr>
2023-10-22 01:46:22 +02:00
2023-10-23 13:05:16 +02:00
<th>
Login
</th>
<th>
Edit
</th>
2023-10-29 08:54:45 +01:00
<?php foreach (array_keys($userdata[0]) as $key) : ?>
<th>
<?= $key ?>
</th>
<?php endforeach; ?>
2023-10-23 13:05:16 +02:00
</tr>
</thead>
<tbody>
<?php foreach ($userdata as $user) : ?>
2023-10-22 01:46:22 +02:00
2023-10-23 13:05:16 +02:00
<tr>
<td>
<button name="email" value="<?= $user['email'] ?>" hx-post="/admin/loginas/">Login</button>
</td>
<td>
<button name="email" value="<?= $user['email'] ?>" hx-post="/admin/edituser/" hx-target="#main">Edit</button>
</td>
2023-10-27 12:31:50 +02:00
<?php foreach (array_keys($user) as $key) : ?>
<td class="px-6 py-4 text-sm text-gray-500">
<?= is_array($user[$key])?json_encode($user[$key]):$user[$key] ?>
</td>
<?php endforeach; ?>
2023-10-23 13:05:16 +02:00
</tr>
2023-10-22 01:46:22 +02:00
2023-10-23 13:05:16 +02:00
<?php endforeach; ?>
</tbody>
</table>
</figure> -->