generated from EddieHubCommunity/template
-
Notifications
You must be signed in to change notification settings - Fork 1
/
checkStatus.php
137 lines (119 loc) · 4.47 KB
/
checkStatus.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
137
<?php
session_start();
if(!isset($_SESSION['loggedin'])||$_SESSION['loggedin']!=true)
{
header("location: login.php");
exit;
}
if($_SESSION['isAdmin']==1){
header("location: admin.php");
exit;
}
include '_dbconnect.php';
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta content="width=device-width, initial-scale=1.0" name="viewport">
<title>LoanDB</title>
<!-- Favicons -->
<link href="assets/images/iconlogo.png" rel="icon" type="image/ico">
<!-- Google Fonts -->
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,600,600i,700,700i|Raleway:300,300i,400,400i,500,500i,600,600i,700,700i|Poppins:300,300i,400,400i,500,500i,600,600i,700,700i" rel="stylesheet">
<!-- Vendor CSS Files -->
<link href="assets/vendor/aos/aos.css" rel="stylesheet">
<link href="assets/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="assets/vendor/bootstrap-icons/bootstrap-icons.css" rel="stylesheet">
<link href="assets/vendor/boxicons/css/boxicons.min.css" rel="stylesheet">
<link href="assets/vendor/glightbox/css/glightbox.min.css" rel="stylesheet">
<link href="assets/vendor/swiper/swiper-bundle.min.css" rel="stylesheet">
<!-- Template Main CSS File -->
<link href="assets/css/style.css" rel="stylesheet">
</head>
<body>
<!-- ======= Header ======= -->
<header id="header" class="d-flex align-items-center">
<div class="container d-flex align-items-center justify-content-between">
<div class="logo d-flex navbar-brand">
<img src="assets/images/iconlogo.png" alt="">
<h1 class="mt-3 px-2"><a href="index.php">LoanDB</a></h1>
<!-- <a href="index.html"><img src="assets/images/profile.png" alt="" class="img-fluid"></a> -->
</div>
<nav id="navbar" class="navbar">
<ul>
<li><a class="active" href="user.php">Home</a></li>
<li><a class="login" href="logout.php">Logout</a></li>
</ul>
<i class="bi bi-list mobile-nav-toggle"></i>
</nav><!-- .navbar -->
</div>
</header><!-- End Header -->
<?php
$name = $_SESSION['fname'];
$username = $_SESSION['username'];
$sql = "SELECT city,branch,type,doc,verification,DATE_FORMAT(date, '%D %b, %Y') as date,formno FROM loanforms WHERE username = '$username' AND verification != 'Approved'";
$result = mysqli_query($conn, $sql);
$num_rows = mysqli_num_rows($result);
if($num_rows==0){
echo "
<div class='container my-auto'>
<div class='h1 text-center' style='padding-top: 250px'>Apply for a Loan first!</div>
</div>
";
}
else{
echo '
<div class="container my-4 p-3">
<table class="table table-bordered" id="myTable">
<thead>
<tr>
<th scope="col">S.No</th>
<th scope="col">Name</th>
<th scope="col">Loan Type</th>
<th scope="col">City</th>
<th scope="col">Branch</th>
<th scope="col">Date</th>
<th scope="col">Status</th>
<th scope="col" style="text-align: center">Your Form</th>
</tr>
</thead>
<tbody>
';
$sno = 0;
while ($row = mysqli_fetch_assoc($result)) {
$sno = $sno + 1;
echo "<tr>
<th scope='row'>" . $sno . "</th>
<td>" . $name . "</td>
<td>" . $row['type'] . "</td>
<td>" . $row['city'] . "</td>
<td>" . $row['branch'] . "</td>
<td>" . $row['date'] . "</td>";
if($row['verification']=='Rejected'){
$show = 'danger';
}
if($row['verification']=='Processing'){
$show = 'warning';
}
echo"
<td style= 'text-align: center'> <button class='btn btn-".$show." btn-sm' type='button'>".$row['verification']."</button></td>
<td style= 'text-align: center'> <a href='downloadApplications.php?file=".$row['doc']."' class='btn btn-primary btn-sm' type='button'>Download</a></td>
</tr>";
}
}
?>
</tbody>
</table>
</div>
<script type="text/javascript">
window.__be = window.__be || {};
window.__be.id = "60d0da8fdfb37d0007b3c5f3";
(function() {
var be = document.createElement('script'); be.type = 'text/javascript'; be.async = true;
be.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'cdn.chatbot.com/widget/plugin.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(be, s);
})();
</script>
</body>
</html>