-
Notifications
You must be signed in to change notification settings - Fork 26
Expand file tree
/
Copy pathAccept_Reject_hr.php
More file actions
140 lines (108 loc) · 5.03 KB
/
Copy pathAccept_Reject_hr.php
File metadata and controls
140 lines (108 loc) · 5.03 KB
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
<?php
include_once 'header_h.php';
?>
<?php
include_once 'roles.php';
?>
<?php
/*
if( isset( $_SESSION['counter'] ) ) {
$_SESSION['counter'] += 1;
}else {
$_SESSION['counter'] = 1;
}
$sc=$_SESSION['counter'];
//if ($sc>=1)
//{
//echo "<input name="b1" disabled="">";
//}*/
?>
<!--
<script type="text/javascript">
$(input).click(function (event) {if($(this).hasClass('disabled')){alert('clicked');}else {alert('not disabled.=)');}});
</script>-->
<form action="#" method="post" id="ar">
<section class="content">
<div class="container-fluid">
<div class="block-header">
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
<div class="card">
<div class="header">
<h2>
<b>ACCEPT/REJECT LEAVES LIST</b>
</h2>
<!--div class="col-sm-12 ">
<div class="dataTables_filter" id="DataTables_Table_0_filter">
<label>Search:
<input class="form-control" aria-controls="DataTables_Table_0" type="search" placeholder="">
</label>
-->
<div class="body table-responsive">
<table class="table table-bordered" name="acceptrejectleaveslist">
<thead>
<tr>
<th>EMPLOYEE ID</th>
<th>EMPLOYEE NAME</th>
<th>LEAVE TYPE</th>
<th>LEAVE REASON DESCRIPTION</th>
<th>LEAVE FROM DATE</th>
<th>LEAVE TO DATE</th>
<th>ACTION TAKEN BY ID</th>
<!-- <th>BALANCE SICK LEAVES</th>>-->
<!-- <th>BALANCE CASUAL LEAVES </th>>-->
<!--<th>HALF DAY LEAVE</th>-->
<th>ACCEPT / REJCT</th>
</tr>
</thead>
<tbody>
<?php
$eid=$_SESSION['employee_id'];
$q1="Select * from employee where Employee_id='$eid' ";
$status1 = mysqli_query($connection_obj,$q1);
$q="Select * from employee_leaves where ";
$status = mysqli_query($connection_obj,$q);
if($status)
{
while ($row = mysqli_fetch_assoc($status))
{
if($row['Status'] == '0')
{
echo "<tr>";
echo "<td><b>".$row['Employee_id']."</b></td>";
echo "<td><b>".$row['Employee_name']."</td>";
echo "<td><b>".$row['Leave_type']."</b></td>";
echo "<td><b>".$row['Leave_reason_description']."</b></td>";
echo "<td><b>".$row['Leave_from_date']."</td>";
echo "<td><b>".$row['Leave_to_date']."</td>";
echo "<td><b>".$row['Action_taken_by_id']."</td>";
//echo "<td>".$row['Balance_sick_leave']."</td>";
// echo "<td>".$row['Balance_casual_leave']."</td>";
//echo "<td>".$row['Half_day_leave']."</td>";
$_SESSION['lr']=$row['Leave_reason_description'];
echo "<div class='row clearfix demo-icon-container'>";
echo "<td> <a href=accept.php?id=".$row['Employee_id']."><button type='button' name='accept' class='btn btn-primary waves-effect'>Accept</button><br>";
echo "<a href=reject.php?id=".$row['Employee_id']."><button type='button' name='reject' class='btn btn-primary waves-effect'>REJECT</button></td>";
}
}
echo " </div></td>
<th></th>
</tr>
</tbody> </table>";
}
else
{
echo " error";
}
?>
</div>
</div>
</div>
</div>
<center>
<input class="btn btn-primary waves-effect" name="close" type="submit" value="CLOSE" formaction="./dashbord.php">
</center>
</section>
</form>
<?php
include_once 'footer_h.php';
?>