-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathview_report.php
215 lines (153 loc) · 7.5 KB
/
view_report.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
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
<?php include('inc/form.php'); ?>
<?php include('inc/header.php'); ?>
<nav id="nav-menu-container">
<ul class="nav-menu">
<?php session_start(); if ($_SESSION['role']!="local_user"){
echo "<li><a href=\"#view_report\">View Report</a></li>"; }?>
<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 Report</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">
<h3>Filter By</h3>
<form method="POST" action="filter.php">
<label for="department"><b>Department</b></label><br>
<select name="department">
<?php
$db = mysqli_connect('localhost', 'root', '', 'hrm');
$sql=("SELECT name,dep_id FROM department");
$result=mysqli_query($db,$sql);
if (mysqli_num_rows($result)>0){
while ($row3=mysqli_fetch_assoc($result)){
echo "<option value=".$row3['name'].">".$row3['name']."</option>";
}
}?>
</select>
<div class="clearfix"><br>
<button type="submit" class="btn btn-success" name="Filter_dep">Filter by department »</button>
</div>
</form><br>
<h3>Filter By</h3>
<form method="POST" action="filter.php">
<label for="branch"><b>Branch</b></label><br>
<select name="branch">
<?php
$db = mysqli_connect('localhost', 'root', '', 'hrm');
$sql=("SELECT name,branch_id FROM branch");
$result=mysqli_query($db,$sql);
if (mysqli_num_rows($result)>0){
while ($row3=mysqli_fetch_assoc($result)){
echo "<option value=".$row3['name'].">".$row3['name']."</option>";
}
}?>
</select>
<div class="clearfix"><br>
<button type="submit" class="btn btn-success" name="Filter_branch">Filter by department »</button>
</div>
</form>
<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>Filter By</h3>
<form method="POST" action="filter.php">
<label for="job_title"><b>Job Title</b></label><br>
<select name="job_title">
<?php
$db = mysqli_connect('localhost', 'root', '', 'hrm');
$sql=("SELECT distinct job_title FROM employee_job_details");
$result=mysqli_query($db,$sql);
if (mysqli_num_rows($result)>0){
while ($row3=mysqli_fetch_assoc($result)){
echo "<option value=".$row3['job_title'].">".$row3['job_title']."</option>";
}
}?>
</select>
<div class="clearfix"><br>
<button type="submit" class="btn btn-success" name="Filter_job">Filter by Job Title »</button>
</div>
</form>
</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">
<h3>Filter By</h3>
<form method="POST" action="filter.php">
<label for="paygrade_id"><b>Paygrade </b></label><br>
<select name="paygrade_id">
<?php
$db = mysqli_connect('localhost', 'root', '', 'hrm');
$sql=("SELECT paygrade_id,name FROM paygrade_details");
$result=mysqli_query($db,$sql);
if (mysqli_num_rows($result)>0){
while ($row3=mysqli_fetch_assoc($result)){
echo "<option value=".$row3['paygrade_id'].">".$row3['name']."</option>";
}
}?>
</select>
<div class="clearfix"><br>
<button type="submit" class="btn btn-success" name="Filter_paygrade">Filter by Pay Grade »</button>
</div>
</form>
</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">
<h3>Filter By</h3>
Leave date
<form method="POST" action="filter.php">
<label for="from"><b>From </b></label><br>
<input type="date" name="From" placeholder="From date"><br>
<label for="to"><b>To </b></label><br>
<input type="date" name="to" placeholder="To date"><br>
<div class="clearfix"><br>
<button type="submit" class="btn btn-success" name="Filter_leave">Filter by Leave date »</button>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</section><!-- #team -->
<!--==========================
Contact Section
============================-->
</main>
<!--==========================
Footer
============================-->