46 lines
2.6 KiB
PHP
46 lines
2.6 KiB
PHP
<?php $current = auth_check() ? user() : null; ?>
|
|
|
|
<div class="container text-center text-light mt-5">
|
|
<h1 class="text-center"><?= e($user->name) ?></h1>
|
|
|
|
<form style="background-color: #fff;" class="text-dark" method="GET" action="/member">
|
|
<?= csrf_field() ?>
|
|
|
|
<div class="form-group" style="display:flex;">
|
|
<label class="ml-2 mt-4" style="width:150px; text-align:left;" for="name"><h4>Name:</h4></label>
|
|
<input class="mt-3 mr-2 form-control" type="text" id="name" style="font-size:20px;" name="name" value="<?= e(old('name') ?? $user->name) ?>" readonly>
|
|
</div>
|
|
|
|
<div class="form-group" style="display:flex;">
|
|
<label class="ml-2 mt-4" style="width:150px; text-align:left;" for="email"><h4>EMail:</h4></label>
|
|
<input type="text" class="mt-3 mr-2 form-control" id="email" style="font-size:20px;" name="email" value="<?= e(old('email') ?? $user->email) ?>" readonly>
|
|
</div>
|
|
|
|
<div class="form-group" style="display:flex;">
|
|
<label class="ml-2 mt-4" style="width:150px; text-align:left;" for="mobile"><h4>Telefon:</h4></label>
|
|
<input type="text" class="mt-3 mr-2 form-control" id="mobile" style="font-size:20px;" name="mobile" value="<?= e(old('mobile') ?? $user->mobile) ?>" readonly>
|
|
</div>
|
|
|
|
<div class="form-group" style="display:flex;">
|
|
<label class="ml-2 mt-4" style="width:150px; text-align:left;" for="bild"><h4>Bild:</h4></label>
|
|
|
|
<?php if (file_exists(storage_path('img_storage/user/' . $user->id . '.jpg'))): ?>
|
|
<a href="/img_storage/user/<?= e($user->id) ?>_gross.jpg" data-lightbox="<?= e($user->id) ?>_gross.jpg?<?= rand() ?>" data-title="<?= e($user->name) ?>">
|
|
<img src="/img_storage/user/<?= e($user->id) ?>.jpg?<?= rand() ?>" class="mt-3 ml-3">
|
|
</a>
|
|
<?php else: ?>
|
|
<img src="/img/placeholder/user64x96.jpg" class="mt-3 ml-3">
|
|
<?php endif; ?>
|
|
</div>
|
|
|
|
<div class="form-group" style="display:flex;">
|
|
<label class="ml-2 mt-4" style="width:130px; text-align:left;" for="name"><h4>Rolle:</h4></label>
|
|
<h4 class="mt-4"><?= e($user->role) ?></h4>
|
|
</div>
|
|
|
|
<?php if ($current && ($current->isAdmin() || (int) $current->id === (int) $user->id)): ?>
|
|
<a href="/member/<?= e($user->id) ?>/edit" class="btn btn-danger col-2 mb-2 float-right mr-2">Bearbeiten</a>
|
|
<?php endif; ?>
|
|
<a href="/member" class="btn btn-primary col-2 mb-2 float-left">Zurück</a>
|
|
</form>
|
|
</div>
|