-
Notifications
You must be signed in to change notification settings - Fork 1
/
salary.php
159 lines (92 loc) · 4.35 KB
/
salary.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
<?php include('inc/form.php'); ?>
<?php include('inc/header.php'); session_start();?>
<nav id="nav-menu-container">
<ul class="nav-menu">
<li class="menu-has-children"><a href=""><?php echo $_SESSION['uname']; ?></a>
<ul>
<li><a href="#">Change password</a></li>
<li><a href="logout.php?logout='1'">Logout</a></li>
</ul>
</li>
</ul>
</nav><!-- #nav-menu-container -->
</div>
</header><!-- #header -->
<!--==========================
Intro Section
============================-->
<section id="view_report">
<div class="container">
<div class="section-header wow fadeInUp">
<br><br><br><br>
<a href="account.php"><h2>Back to Account</a>
<h3>View Salary Details</h3>
</div>
<div class="row">
<div class="col-lg-3 col-md-6 wow fadeInUp">
<div class="member">
<div class="member-info">
<div class="member-info-content">
<br><br>
</div>
</div>
</div>
</div>
<div class="col-lg-3 col-md-6 wow fadeInUp" data-wow-delay="0.1s">
<div class="member">
<div class="member-info">
<div class="member-info-content">
<h3></h3>
<?php
$emp_reg_id=$_SESSION['uname'];
$query="SELECT * FROM employee_payment_details where emp_reg_id='$emp_reg_id'";
$result=mysqli_query($db,$query);
if (mysqli_num_rows($result)>0){
while ($row3=mysqli_fetch_assoc($result)){
echo "<h1";
echo "<option value=".$row3['emp_reg_id'].">"."Registration ID :",$row3['emp_reg_id']."</option>";
echo "<option value=".$row3['basic_salary'].">"."Basic Salary :",$row3['basic_salary']."</option>";
echo "<option value=".$row3['bonus_amount'].">"."Bonus amount :",$row3['bonus_amount']."</option>";
echo "<option value=".$row3['tax'].">"."Tax percentage :",$row3['tax']."</option>";
}
}
if ($_SESSION['role']=="admin"){
echo "<form method=\"POST\" action=\"filter.php\">";
echo "<br><br>View Employees salary details";
echo "<label for=\"emp_reg_id\"><b>Registration ID</b></label>";
echo "<input type=\"text\" placeholder=\"Enter registration ID \" name=\"emp_reg_id\" required>";
echo "<div class=\"clearfix\">
<button type=\"submit\" class=\"btn btn-success\" name=\"view_salary\">View Salary »</button>
</div>";
}
?>
</div>
</div>
</div>
</div>
<div class="col-lg-3 col-md-6 wow fadeInUp" data-wow-delay="0.2s">
<div class="member">
<div class="member-info">
<div class="member-info-content">
</div>
</div>
</div>
</div>
<div class="col-lg-3 col-md-6 wow fadeInUp" data-wow-delay="0.3s">
<div class="member">
<div class="member-info">
<div class="member-info-content">
</div>
</div>
</div>
</div>
</div>
</div>
</section><!-- #team -->
<!--==========================
Contact Section
============================-->
</main>
<!--==========================
Footer
============================-->