-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathindividual_verify.php
136 lines (120 loc) · 4.67 KB
/
individual_verify.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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
<?php
include_once "inc/header.php";
include_once "inc/sidebar.php";
if (isset($_GET['loan_id'])) {
$loan_id = $_GET['loan_id'];
}
?>
<h3 class="page-heading mb-4">Loan verification page</h3>
<div class="row mb-2">
<div class="col-md-6 mb-4">
<div class="card">
<div class="card-body">
<h5 class="card-title">Borrower Details</h5>
<div class="table-responsive table-sales">
<table class="table">
<?php
$all = $ml->getLoanById($loan_id);
if ($all) {
$row = $all->fetch_assoc();
}
?>
<tbody>
<tr>
<td>Name: </td>
<td class="text-right">
<?php echo $row['name']; ?>
</td>
</tr>
<tr>
<td>Expected Loan: </td>
<td class="text-right">
<?php echo $row['expected_loan']; ?> tk
</td>
</tr>
<tr>
<td>Total Loan(including interest): </td>
<td class="text-right">
<?php echo $row['total_loan']; ?> tk
</td>
</tr>
<tr>
<td>EMI: </td>
<td class="text-right">
<?php echo $row['emi_loan']; ?> tk/month
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<div class="col-md-6 mb-4">
<div class="card">
<div class="card-body">
<h5 class="card-title">Verify loan</h5>
<?php
if ($_SERVER['REQUEST_METHOD'] == 'POST' ) {
$role_id = $_POST['role'];
$getStatus = $ml->getLoanVerificationStatus($loan_id, $role_id);
if ($getStatus) {
echo $getStatus;
}
}
?>
<form action="" class="form" method="POST" >
<?php
$role = Session::get('role');
?>
<input type="hidden" name="role" value="<?php echo $role; ?>">
<div class="form-check">
<label class="form-check-label" for="checkbox104">Verifyed by Verifier
<input type="checkbox" name="verify_list[]" class="form-check-input" id="checkbox104"
<?php if ($row['status'] >=1 ) {
echo "checked";
} ?> <?php if ($row['status'] != 0 || $role != 1){
echo "disabled";
} ?> ></label>
</div>
<div class="form-check">
<label class="form-check-label" for="checkbox105">Verifyed by Branch Officer
<input type="checkbox" name="verify_list[]" class="filled-in form-check-input" id="checkbox105"
<?php if ($row['status'] >=2 ) {
echo "checked";
} ?> <?php if ($row['status'] != 1 || $role != 2){
echo "disabled";
} ?> ></label>
</div>
<div class="form-check">
<label class="form-check-label" for="checkbox106">Verifyed by Head Officer
<input type="checkbox" name="verify_list[]" class="form-check-input" id="checkbox106"
<?php if ($row['status'] >=3 ) {
echo "checked";
} ?> <?php if ($row['status'] != 2 || $role != 3){
echo "disabled";
} ?> ></label>
</div>
<hr>
<div class="for-group">
<input type="submit" class="btn btn-primary btn-sm" value="Verify"
<?php if ($row['status'] >=3 ) echo "disabled"; ?>
<?php if ($row['status'] > 0 && $role == 1){
echo "disabled";
} ?>
<?php if ($row['status'] != 1 && $role == 2){
echo "disabled";
} ?>
<?php if ($row['status'] != 2 && $role == 3){
echo "disabled";
} ?>
>
</div>
</form>
</div>
</div>
</div>
</div>
<?php
include_once "inc/footer.php";
?>