-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreports3.php
113 lines (98 loc) · 3.9 KB
/
reports3.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
<?php
include('./db_connect.php');
session_start();
if(isset($_SESSION['name']));
$query="SELECT * FROM staff ";
$result=mysqli_query($conn,$query);
?>
<!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><a href="reports2.php">
<button type="button" class="btn btn-outline-primary">Loan Details</button></a>
<a href="generatePdf.php">
<button type="button" class="btn btn-outline-primary">Download PDF</button></a>
</div>
</div>
<h1 align="center" style="color:deepskyblue;">Staff Details</h1>
<br>
<div class="card-body">
<div class ="table-responsive">
<table class="table table-hover">
<thead>
<tr>
<td>Staff ID</td>
<td>Firtsname</td>
<td>LastName</td>
<td>Rolename</td>
<td>NationalID</td>
<td>Phonenumber</td>
<td>Email</td>
<td>Address</td>
<td>TaxID</td>
<td>Approval Status</td>
<td>Edit</td>
<td>Delete</td>
</tr>
</thead>
<tbody>
<?php
while($row=mysqli_fetch_assoc($result))
{
$StaffID =$row['staffID'];
$Firstname =$row['firstname'];
$Lastname =$row['lastname'];
$Rolename =$row['role_name'];
$NationalID =$row['nationalID'];
$Phonenumber=$row['phonenumber'];
$Email =$row['email'];
$Address =$row['address'];
$TaxID =$row['tax_id'];
$Approvalstatus=$row['approval_status'];
?>
<tr>
<td><?php echo $StaffID ?></td>
<td><?php echo $Firstname ?></td>
<td><?php echo $Lastname ?></td>
<td><?php echo $Rolename ?></td>
<td><?php echo $NationalID ?></td>
<td><?php echo $Phonenumber ?></td>
<td><?php echo $Email ?></td>
<td><?php echo $Address ?></td>
<td><?php echo $TaxID ?></td>
<td class="text-center">
<?php if($row['approval_status'] == 1): ?>
<span class="badge badge-warning">Accepted</span>
<?php elseif($row['approval_status'] == 2): ?>
<span class="badge badge-info">Rejected</span>
<?php endif; ?>
</td>
<td><a href="edit.php?GetID=<?php echo $StaffID ?>">Edit</a></td>
<td><a href="delete.php?Del=<?php echo $StaffID ?>">Delete</a></td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
<div><a href="Manager.php">
<button type="button" class="btn btn-outline-primary">Go Back</button></a>
</div>