-
Notifications
You must be signed in to change notification settings - Fork 0
/
viewLoans.php
34 lines (34 loc) · 1.21 KB
/
viewLoans.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?php
session_start();
require_once('config.php');
require_once('autoload.php');
Helper_Access::rejectIfLogout();
$loans = Model_Loan::getAllLoans();
?>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
<style>
table {
border-collapse: collapse;
}
th, td {
border: 1px solid black;
padding: 5px 5px 5px 5px;
}
</style>
</head>
<body>
<?php include 'search.php'; ?>
<table>
<thead><th>Numéro du prêt</th><th>Client</th><th>Date de début</th><th>Date de fin</th><th>Motif</th></thead>
<tbody>
<?php foreach($loans as $loan) { ?>
<tr><td><a href="printPage.php?id=<?php echo $loan->getId(); ?>"><?php echo $loan->getId();?></a></td><td><a href="viewCustomer.php?id=<?php echo $loan->getCustomer();?>"><?php echo $loan->getCustomer();?></a></td><td><?php echo $loan->getBegindate();?></td><td><?php echo $loan->getEnddate(); ?></td><td><?php echo $loan->getReason();?></td></tr>
<?php } ?>
</tbody>
</table>
</body>
</html>