-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathemployee.php
160 lines (125 loc) · 5.82 KB
/
employee.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
<?php include('emp-up-deletephp.php')?>
<!DOCTYPE html>
<html lang="en">
<title>Employee Data</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="css/w3.css">
<link rel="stylesheet" href="css/font.css">
<style>
body,h1,h2,h3,h4,h5 {font-family: "Poppins", sans-serif}
body {font-size:16px;}
.w3-half img{margin-bottom:-6px;margin-top:16px;opacity:0.8;cursor:pointer}
.w3-half img:hover{opacity:1}
table {
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
border-collapse: collapse;
width: 100%;
}
td,th {
border: 1px solid #ddd;
padding: 8px;
}
tr:nth-child(even){background-color: #f2f2f2;}
tr:hover {background-color: #ddd;}
th {
padding-top: 12px;
padding-bottom: 12px;
text-align: left;
background-color: #4CAF50;
color: white;
}
</style>
<body>
<!-- Sidebar/menu -->
<nav class="w3-sidebar w3-aqua w3-collapse w3-top w3-large w3-padding" style="z-index:3;width:300px;font-weight:bold;" id="mySidebar"><br>
<div class="w3-container w3-dark-grey">
<h4>Menu</h4>
</div>
<img src="images/payroll.png" alt="Snow" style="width:100%;padding-top: 15px;padding-bottom: 15px">
<div class="w3-container w3-dark-grey">
<h4>Payroll system</h4>
</div>
<a href="javascript:void(0)" onclick="w3_close()" class="w3-button w3-hide-large w3-display-topleft" style="width:100%;font-size:22px">Close Menu</a>
<div class="w3-container">
</div>
<div class="w3-bar-block">
<dl>
<dt><a href="home.php" onclick="w3_close()" class="w3-bar-item w3-button w3-hover-white">Home</a> </dt>
<dt><a href="department.php" onclick="w3_close()" class="w3-bar-item w3-button w3-hover-white">Department</a> </dt>
<dd></dd>
<dt><a href="employee.php" onclick="w3_close()" class="w3-bar-item w3-button w3-hover-white w3-red"> Employee </a></dt>
<dt><a href="employee-payment.php" onclick="w3_close()" class="w3-bar-item w3-button w3-hover-white">Payment Parameters</a> </dt>
<dt><a href="employee-payslip.php" onclick="w3_close()" class="w3-bar-item w3-button w3-hover-white">Pay slip</a> </dt>
<dt><a href="employee-setsalary.php" onclick="w3_close()" class="w3-bar-item w3-button w3-hover-white">Set salary</a> </dt>
<dt><a href="employee-payhistory.php" onclick="w3_close()" class="w3-bar-item w3-button w3-hover-white">Payment history</a> </dt>
</dl>
</div>
</nav>
<!-- Top menu on small screens -->
<header class="w3-container w3-top w3-hide-large w3-red w3-xlarge w3-padding">
<a href="javascript:void(0)" class="w3-button w3-red w3-margin-right" onclick="w3_open()">☰</a>
<span>Payroll system</span>
</header>
<!-- Overlay effect when opening sidebar on small screens -->
<div class="w3-overlay w3-hide-large" onclick="w3_close()" style="cursor:pointer" title="close side menu" id="myOverlay"></div>
<!-- !PAGE CONTENT! -->
<div class="w3-main" style="margin-left:290px;margin-right:-10px;margin-top: -5px;margin-bottom: 0px">
<!-- Header -->
<div class="w3-display-container w3-text-blue" style="font-size: 50px">
<img src="images/banner.jpg" alt="Lights" style="width:100%" style="height: 150px">
<div class="w3-display-middle w3-large" > <h1 >Welcome to Payroll system</h1></div>
</div>
<div class="w3-container">
<h4>Employee Data</h4>
<a href="employee-add.php" class="w3-button w3-blue w3-right">Add employee <span class="w3-text-red">+</span></a>
<br><br>
<table>
<tr><th>Employee id</th>
<th>Name</th>
<th>Email</th>
<th>Salary</th>
<th>Provident fund</th>
<th>Loan</th>
<th>Job title</th>
<th>Department</th>
<th colspan="2">Action</th></tr>
<?php while($row=mysqli_fetch_array($result)) {?>
<tr>
<td><?php echo $row['Employee_id']; ?></td>
<td><?php echo $row['Name']; ?></td>
<td><?php echo $row['Email']; ?></td>
<td><?php echo $row['salary']; ?></td>
<td><?php echo $row['pfund']; ?></td>
<td><?php echo $row['loan']; ?></td>
<td><?php echo $row['jobtitle']; ?></td>
<td><?php echo $row['Depart_id']; ?></td>
<td><a href="employee-update.php?edit=<?php echo $row['Employee_id']; ?>" class="w3-button w3-teal" >Edit</a></td>
<td><a href="emp-up-deletephp.php?del=<?php echo $row['Employee_id']; ?>" class="w3-button w3-red">Delete</a></td>
</tr>
<?php } ?>
</table>
</div>
</div>
<!-- W3.CSS Container -->
<div class="w3-dark-grey w3-container w3-padding-32" style="margin-top:75px;padding-right:58px"><p class="w3-right">Reference <a href="https://www.w3schools.com/w3css/default.asp" title="W3.CSS" target="_blank" class="w3-hover-opacity">w3school</a></p></div>
<script>
// Script to open and close sidebar
function w3_open() {
document.getElementById("mySidebar").style.display = "block";
document.getElementById("myOverlay").style.display = "block";
}
function w3_close() {
document.getElementById("mySidebar").style.display = "none";
document.getElementById("myOverlay").style.display = "none";
}
// Modal Image Gallery
function onClick(element) {
document.getElementById("img01").src = element.src;
document.getElementById("modal01").style.display = "block";
var captionText = document.getElementById("caption");
captionText.innerHTML = element.alt;
}
</script>
</body>
</html>