1
0
Fork 0
This repository has been archived on 2024-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
Accommodation_Management/view/manager.php

43 lines
1.7 KiB
PHP
Raw Normal View History

2021-01-14 19:01:32 +01:00
<?php
require_once('template/head.php');
?>
<div class="container-fluid section">
2021-01-18 13:36:04 +01:00
<div class="row">
<div class="col-md-10"><h2>Gestions des réservations</h2></div>
<div class="col-md-2"><a href="<?=genURL('reservation')?>" class="btn btn-success">Ajouter une Reservation</a></div>
</div>
2021-01-14 19:01:32 +01:00
<table class="table table-hover">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">Nom de logement</th>
<th scope="col">Adresse</th>
<th scope="col">Type</th>
<th scope="col">Service(s)</th>
<th scope="col">Nombre de Reservation(s)</th>
<th scope="col">Action</th>
</tr>
</thead>
<tbody>
<?php
foreach ($hotels as $hotel){
?>
<tr>
<th scope="row"><?=$hotel->getId()?></th>
<td><?=htmlspecialchars($hotel->getName())?></td>
<td><?=htmlspecialchars($hotel->getAddress()) . ', ' . $hotel->getPostalCode() ?></td>
<td><?=htmlspecialchars($hotel->getType())?></td>
<td><?=$hotel->getServices() ? htmlspecialchars(join(',',$hotel->getServices())) : "Aucun" ?></td>
2021-01-16 16:12:28 +01:00
<td><?=count(AccomodationReservation::fetchByAccomodationId($hotel->getId()))?></td>
2021-01-14 19:01:32 +01:00
<td><a href="<?=genURL('manager/' . $hotel->getId() . '/view')?>" class="btn btn-primary">Editer une reservation</a></td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
<?php
require_once('template/footer.php');
?>