-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathon_working.php
167 lines (137 loc) · 5.1 KB
/
on_working.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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
<?php
include ('header.php');
include ('Connection.php');
$conn = mysqli_connect($dbhost, $username, $password, $dbname);
$sql = "SELECT * FROM application";
if (!empty($_SESSION))
{
$result = mysqli_query($conn, $sql);
if (mysqli_num_rows($result) > 0) {
// output data of each row
while($row = mysqli_fetch_assoc($result)) {
//echo "id: " . $row["id"]. " - Name: " . $row["cityinput"]. " " . $row["zipinput"]. "<br>";
if($row['userid']==$_SESSION['userid'])
{
?>
<?php
if($row['status']=="reject")
{
?>
<div class="alert alert-danger alert-dismissible">
<?php echo $row["formid"]." " . $row["firstnameinput"]." " .$row["panid"]; ?>
<button type="submit" name="delete" id="delete" class="btn btn-sm btn-danger pull-right btn-space">Delete</button>
</div>
<?php
}
elseif($row['status']=="pending")
{
?>
<div class="alert alert-warning alert-dismissible">
<?php echo $row["formid"]." " . $row["firstnameinput"]." " .$row["panid"]; ?>
<!--<button type="submit" name="pending" id="pending" class="btn btn-sm btn-warning pull-right btn-space"> Pending</button>-->
<button type="submit" name="pending" id="pending" class="btn btn-sm btn-warning pull-right btn-space"> Info</button>
</div>
<?php
}
elseif($row['status']=="approve")
{
?>
<div class="alert alert-success alert-dismissible">
<?php echo $row["formid"]." " . $row["firstnameinput"]." " .$row["panid"]; ?>
<!--<button type="submit" name="approve" id="approve" class="btn btn-sm btn-success pull-right btn-space"> Approve</button>-->
<a href="pa.php" class="btn btn-sm btn-success pull-right btn-space" role="button">Pay</a>
<?php
}
else {
?>
<div class="alert alert-info alert-dismissible">
<?php echo $row["formid"]." " . $row["firstnameinput"]." " .$row["panid"]; ?>
</div>
<?php
}
}
?>
<!--<button type "button" href="#" class="btn btn-sm btn-primary pull-right btn-space" data-toggle="modal" data-target="#myModal">Application</a>-->
</div>
<!-- Modal -->
<div class="modal fade" id="myModal" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">Application</h4>
</div>
<div class="modal-body">
<p>
<div class="table-responsive">
<table class="table table-user-information table-bordered">
<tbody>
<tr>
<td>ID:</td>
<td><?php echo $row['formid'] ?></td>
</tr>
<tr>
<td>Name:</td>
<td> <?php echo $row['firstnameinput'] . ', ' . $row['lastnameinput']; ?></td>
</tr>
<tr>
<td>Date of Birth:</td>
<td><?php echo $row['birthinput'] ?></td>
</tr>
<tr>
<td>Gender:</td>
<td><?php echo $row['radios'] ?></td>
</tr>
<tr>
<td>ZIP Code:</td>
<td><?php echo $row['zipinput'] ?></td>
</tr>
<tr>
<td>PAN No:</td>
<td><?php echo $row['panid']?></td>
</tr>
<tr>
<td>Stree Name:</td>
<td><?php echo $row['streetinput']?></td>
</tr>
<tr>
<td>Address:</td>
<td><?php echo $row['statebasic'] . ' ,' . $row['cityinput'] ?></td>
</tr>
<tr>
<td>Email:</td>
<td><a href="mailto:<?php echo $row['emailinput'] ?>"><?php echo $row['emailinput'] ?></a></td>
</tr>
<tr>
<td>Loan amount:</td>
<td>
<?php echo $row['selectbasic1'] ?> <span class="glyphicon glyphicon-tasks"></span><br><br>
<?php echo $row['selectbasic2'] ?> <span class="glyphicon glyphicon-usd"></span>
</td>
</tr>
<tr>
<td>Detail:</td>
<td><?php echo $row['comment']?></td>
</tr>
</tbody>
</table>
</div>
</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<?php
}
} else {
?>
<div class="alert alert-success">
<strong>OOOPs</strong> Not any application available
</div>
<?php
}
}