47 lines
1.4 KiB
PHP
47 lines
1.4 KiB
PHP
|
<?php include('includes/header.php'); ?>
|
||
|
<div>
|
||
|
<div class="card card-body p-4">
|
||
|
<div class="row">
|
||
|
<div class="col-8">
|
||
|
<h3 class="fw-semibold mb-4">Formulare</h3>
|
||
|
</div>
|
||
|
<div class="col-4">
|
||
|
<a href="forms-create.php" class="btn btn-info mx-1 float-end"> <i class="ti ti-plus"></i> Hinzufügen</a>
|
||
|
</div>
|
||
|
</div>
|
||
|
<?= alertMessage(); ?>
|
||
|
<div class="table-responsive">
|
||
|
<table class="table table-hover">
|
||
|
<thead>
|
||
|
<tr>
|
||
|
<th></th>
|
||
|
</tr>
|
||
|
</thead>
|
||
|
<tbody>
|
||
|
<?php
|
||
|
$forms = getAll('id,name','tbl_forms');
|
||
|
|
||
|
if(mysqli_num_rows($forms) > 0){
|
||
|
foreach ($forms as $formEntry) {
|
||
|
?>
|
||
|
|
||
|
<tr onmouseover="this.style.backgroundColor='#f5f5f5'; this.style.cursor='pointer';" onmouseout="this.style.backgroundColor='';" onclick="window.location.href='forms-edit.php?id=<?= $formEntry['id']; ?>';">
|
||
|
<td><?= $formEntry['name']; ?></td>
|
||
|
</tr>
|
||
|
|
||
|
<?php
|
||
|
}
|
||
|
} else {
|
||
|
?>
|
||
|
<tr>
|
||
|
<td colspan="3">Keine Einträge gefunden</td>
|
||
|
</tr>
|
||
|
<?php
|
||
|
}
|
||
|
?>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
<?php include('includes/footer.php'); ?>
|