-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreports2.php
95 lines (80 loc) · 3.16 KB
/
reports2.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<?php include('./db_connect.php');
session_start();
if(isset($_SESSION['name']));
$query="SELECT * FROM loans ";
$connect=mysqli_query($conn,$query);
$data=mysqli_fetch_assoc($connect);
$num=mysqli_num_rows($connect);
?>
<!DOCTYPE html>
<html>
<head>
<title>
</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.1/css/fontawesome.min.css">
<link rel="stylesheet" href="mydetails.css">
</head>
<body>
<div class="full-page">
<div class="navbar">
<div>
<a href=''>
<?php echo "Check details below ".($_SESSION['role'] == 2 ? " ".$_SESSION['username'] : $_SESSION['username'])."!" ?>
</a>
</div>
</div>
<h1 align="center" style="color:deepskyblue;">Loan Details</h1>
<br>
<div class="card-body">
<div class ="table-responsive">
<table class="table table-hover">
<thead>
<tr>
<th scope="col">Loan ID</th>
<th scope="col">Client ID</th>
<th scope="col">Loan Status</th>
<th scope="col">Application Date</th>
<th scope="col">Purpose</th>
<th scope="col">Loan Amount</th>
<th scope="col">Plan ID</th>
<th scope="col">Date Released</th>
<th scope="col">Reference Number</th>
<th scope="col">Loan TypeID</th>
</tr>
</thead>
<tbody>
<?php
if($num>0)
{
while($data=mysqli_fetch_assoc($connect)){
echo "
<tr>
<td>".$data['loanID']."</td>
<td>".$data['clientID']."</td>
<td>".$data['loan_status']."</td>
<td>".$data['application_date']."</td>
<td>".$data['purpose']."</td>
<td>".$data['loan_amount']."</td>
<td>".$data['planID']."</td>
<td>".$data['date_released']."</td>
<td>".$data['ref_number']."</td>
<td>".$data['loan_type_id']."</td>
</tr>
";
}
}
?>
</tbody>
</table>
</div>
<div><a href="Manager.php">
<button type="button" class="btn btn-outline-primary">Go Back</button></a>
</div>
</div>
</div>
</body>
</html>