-
Notifications
You must be signed in to change notification settings - Fork 0
/
viewloans.php
65 lines (63 loc) · 2.2 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
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
<?php include('template/head.php'); ?>
<?php include('class/view.php'); ?>
<?php
$display = new display();
$result=$display->disp_all_loans("loans");
// print_r(mysqli_fetch_assoc($result));
?>
<ol class="breadcrumb">
<li class="breadcrumb-item">
<a href="dashboard.php">Dashboard</a>
</li>
<li class="breadcrumb-item active">All loans</li>
</ol>
<div class="card">
<div class="card-header">
<i class="fa fa-list"></i> Loans
</div>
<div class="card-body">
<div class="table-responsive">
<table class="table table-bordered" id="dataTable" width="100%" cellspacing="0">
<thead>
<tr>
<th>Member name</th>
<th>Loan No</th>
<th>Amount</th>
<th>Installment</th>
<th>Loan date</th>
<th>Closing date</th>
<th>Status</th>
<th></th>
</tr>
</thead>
<tbody>
<?php while($row=mysqli_fetch_assoc($result)){ ?>
<tr>
<td><?php echo $row['member_name']; ?></td>
<td><?php echo $row['loan_no']; ?></td>
<td>Rs. <?php echo $row['loan_amount']; ?></td>
<td>Rs. <?php echo $row['installment']; ?></td>
<td><?php echo $display->date_ymd($row['loan_date']); ?></td>
<td><?php echo $display->date_ymd($row['closing_date']); ?></td>
<td><div class="<?php if($row['status']=='active') echo 'text-success'; else echo 'text-danger'; ?>"><?php echo $row['status']; ?></div></td>
<td class="text-right" style="width: 90px;">
<div class="btn-group" role="group">
<button id="profileoptions" type="button" class="btn btn-sm btn-secondary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Options
</button>
<div class="dropdown-menu" aria-labelledby="profileoptions">
<a class="dropdown-item" href="profile.php?mem=<?php echo $row['mem_id']; ?>&loan=<?php echo $row['loan_id']; ?>">View</a>
<?php if ($row['status']!='closed'): ?>
<a class="dropdown-item" href="pay_installment.php?loan=<?php echo $row['loan_id']; ?>">Pay Installment</a>
<?php endif ?>
</div>
</div>
</td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
</div>
</div>
<?php include('template/foot.php'); ?>