⚝
One Hat Cyber Team
⚝
Your IP:
216.73.217.37
Server IP:
15.235.14.176
Server:
Linux server2.ihostph.com 4.18.0-553.30.1.el8_10.x86_64 #1 SMP Tue Nov 26 02:30:26 EST 2024 x86_64
Server Software:
Apache
PHP Version:
8.1.34
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
home
/
gracious
/
hris.graciousphils.com
/
hradmin
/
View File Name :
hrevaluationlist.php
<?php session_start(); error_reporting(0); include('includes/config.php'); if(strlen($_SESSION['alogin'])==0) { header('location:index.php'); } else{ ?> <!DOCTYPE html> <html lang="en"> <head> <!-- Title --> <title>List of Employee</title> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/> <meta charset="UTF-8"> <meta name="description" content="Responsive Admin Dashboard Template" /> <meta name="keywords" content="admin,dashboard" /> <meta name="author" content="Steelcoders" /> <!-- Styles --> <link rel="stylesheet" href="includes/assets/bootstrap.min.css"> <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.12.1/css/dataTables.bootstrap5.min.css"/> <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/responsive/2.3.0/css/responsive.bootstrap5.min.css"/> </head> <?php include('includes/sidebar.php');?> <body> <div class="container" style="padding-top: 150px;"> <div class="col-md-12"> <form> <div class="card"> <div class="card-header bg-success text-white"> Evaluation List </div> <div class="card-body"> <table id="example" class="table table-bordered nowrap Responsive" style="width:100%"> <thead class="bg-dark text-white"> <tr> <tr> <th>#</th> <th>Employee Code</th> <th>Full Name</th> <th>Department</th> <th>From</th> <th>To</th> <th>Category A Score</th> <th>Category B Score</th> <th>Category C Score</th> <th>Category D Score</th> <th>Total Score</th> <th>Score Equivalent</th> <th>AM's Signature</th> <th>Head's Signature</th> <th>Action</th> </tr> </thead> <tbody class="bg-white text-dark"> <?php $sql = "SELECT tbl_evaluation.id,tbl_evaluation.Empid,tbl_evaluation.Emp_Name,tbl_evaluation.Emp_Department,tbl_evaluation.Emp_Company,tbl_evaluation.Date_Covered,tbl_evaluation.Date_Covered_From, tbl_evaluation.Kalidad1,tbl_evaluation.Kalidad2,tbl_evaluation.Kalidad3,tbl_evaluation.Kalidad4,tbl_evaluation.Kalidad5, tbl_evaluation.Pakikitungo1,tbl_evaluation.Pakikitungo2,tbl_evaluation.Pakikitungo3,tbl_evaluation.Pakikitungo4,tbl_evaluation.Pakikitungo5, tbl_evaluation.Paguugali1,tbl_evaluation.Paguugali2,tbl_evaluation.Paguugali3,tbl_evaluation.Paguugali4,tbl_evaluation.Paguugali5, tbl_evaluation.Katangian1,tbl_evaluation.Katangian2,tbl_evaluation.Katangian3,tbl_evaluation.Katangian4,tbl_evaluation.Katangian5, tbl_evaluation.Positive,tbl_evaluation.Negative,tbl_evaluation.Suggestion,tbl_evaluation.Staff_Comment,tbl_evaluation.Officer_Empid,tbl_evaluation.Head_Empid, tbl_evaluation.Manager_Empid,tbl_evaluation.emp_isRead,tbl_evaluation.Manager_isRead,tbl_evaluation.Head_isRead,tbl_evaluation.Date_Created, tblemployees.EmpId, tblemployees.My_Signature,tblemployees.FirstName,tblemployees.MiddleName,tblemployees.LastName,tblemployees.Position,tblemployees.Position_Level FROM tbl_evaluation, tblemployees WHERE tbl_evaluation.Empid = tblemployees.EmpId and tbl_evaluation.Head_isRead = '1' and tbl_evaluation.emp_isRead = '1' and tblemployees.Position_Level <= 2"; $query = $dbh -> prepare($sql); $query->execute(); $results=$query->fetchAll(PDO::FETCH_OBJ); $cnt=1; if($query->rowCount() > 0) { foreach($results as $result) { $ams = $result->Manager_Empid; $heads = $result->Head_Empid; ?> <tr> <td><?php echo htmlentities($result->id);?></td> <td><?php echo htmlentities($result->Empid);?></td> <td><?php echo htmlentities($result->Emp_Name);?></td> <td><?php echo htmlentities($result->Emp_Department);?></td> <td><?php echo htmlentities($result->Date_Covered_From);?></td> <td><?php echo htmlentities($result->Date_Covered);?></td> <?php $kalidadtotal = (($result->Kalidad1 + $result->Kalidad2 + $result->Kalidad3 + $result->Kalidad4)/4) * 0.35;?> <td><?php echo round($kalidadtotal, PHP_ROUND_HALF_DOWN) . " " . "Points"?></td> <?php $pakikitungototal = (($result->Pakikitungo1 + $result->Pakikitungo2 + $result->Pakikitungo3)/3) * 0.20;?> <td><?php echo round($pakikitungototal, PHP_ROUND_HALF_DOWN) . " " . "Points"?></td> <?php $paguugalitotal = (($result->Paguugali1 + $result->Paguugali2 + $result->Paguugali3 + $result->Paguugali4)/4) * 0.20;?> <td><?php echo round($paguugalitotal, PHP_ROUND_HALF_DOWN) . " " . "Points"?></td> <?php $katangiantotal = (($result->Katangian1 + $result->Katangian2 + $result->Katangian3)/3) * 0.25;?> <td><?php echo round($katangiantotal, PHP_ROUND_HALF_DOWN) . " " . "Points"?></td> <?php $kalidadtotal = (($result->Kalidad1 + $result->Kalidad2 + $result->Kalidad3 + $result->Kalidad4)/4) * 0.35;?> <?php $pakikitungototal = (($result->Pakikitungo1 + $result->Pakikitungo2 + $result->Pakikitungo3)/3) * 0.20;?> <?php $paguugalitotal = (($result->Paguugali1 + $result->Paguugali2 + $result->Paguugali3 + $result->Paguugali4)/4) * 0.20;?> <?php $katangiantotal = (($result->Katangian1 + $result->Katangian2 + $result->Katangian3)/3) * 0.25;?> <?php $overalltotal = $kalidadtotal + $pakikitungototal + $paguugalitotal + $katangiantotal ?> <td><?php echo round($overalltotal, PHP_ROUND_HALF_DOWN) . " " . "Points"?></td> <?php if ($overalltotal >= 10) { ?> <td><span class="badge bg-success rounded-pill">OUTSTANDING</span></td> <?php }elseif ($overalltotal <= 9 and $overalltotal >= 8) { ?> <td><span class="badge bg-info rounded-pill">VERY SATISFACTORY</span></td> <?php }elseif ($overalltotal >= 7){ ?> <td><span class="badge bg-warning rounded-pill">SATISFACTORY</span></td> <?php }elseif ($overalltotal < 7 and $overalltotal >= 5){ ?> <td><span class="badge bg-secondary rounded-pill">BELOW SATISFACTORY</span></td> <?php }elseif ($overalltotal < 5 and $overalltotal >= 1){ ?> <td><span class="badge bg-danger rounded-pill">UNSTATISFACTORY</span></td> <?php } ?> <?php if ($result->Manager_Empid == 'N/A' and $result->Manager_isRead == 0) { ?> <td style="color: red;"> N/A </td> <?php }else if ($result->Manager_Empid != 'N/A' and $result->Manager_isRead == 0) { ?> <td style="color: red;">Pending</td> <?php }else if ($result->Manager_Empid != 'N/A' and $result->Manager_isRead == 1){ $sql = "SELECT * from tblemployees where EmpId = :ams"; $query = $dbh -> prepare($sql); $query->bindParam(':ams',$ams,PDO::PARAM_STR); $query->execute(); $results=$query->fetchAll(PDO::FETCH_OBJ); $cnt=1; if($query->rowCount() > 0) { foreach($results as $resultss) { ?> <td><img src="../signatureupload/<?php echo htmlentities($resultss->My_Signature)?>" class="img-thumbnail" style="width: 30%; height:30%;"><br><?php echo htmlentities($resultss->FirstName . " " . $resultss->MiddleName . " " . $resultss->LastName)?></td> <?php }}} ?> <?php if ($result->Head_Empid == '0' and $result->Head_isRead == 0) { ?> <td style="color:red;">Pending</td> <?php }elseif($result->Head_Empid != '0' and $result->Head_isRead == 0){ ?> <td style="color:red;">Pending</td> <?php }elseif($result->Head_Empid != '0' and $result->Head_isRead == 1){ ?> <?php $heads = $result->Head_Empid; $sql = "SELECT * from tblemployees where EmpId = :heads"; $query = $dbh -> prepare($sql); $query->bindParam(':heads',$heads,PDO::PARAM_STR); $query->execute(); $results=$query->fetchAll(PDO::FETCH_OBJ); $cnt=1; if($query->rowCount() > 0) { foreach($results as $resultsss) { ?> <td><img src="../signatureupload/<?php echo htmlentities($resultsss->My_Signature);?>" class="img-thumbnail" style="width: 30%; height:30%;"><br><?php echo htmlentities($resultsss->FirstName . " " . $resultsss->MiddleName . " " . $resultsss->LastName)?></td> <?php }}} ?> <td><a href="staffevaluation.php?evid=<?php echo htmlentities($result->id);?>">View</a></td> </tr> <?php $cnt++;}}?> </tbody> </table> </div> <div class="card-footer bg-success"> </div> </div> </form> </div> </div> <script type="text/javascript" src="https://cdn.datatables.net/1.12.1/js/jquery.dataTables.min.js"></script> <script type="text/javascript" src="https://cdn.datatables.net/1.12.1/js/dataTables.bootstrap5.min.js"></script> <script type="text/javascript" src="https://cdn.datatables.net/responsive/2.3.0/js/dataTables.responsive.min.js"></script> <script type="text/javascript" src="https://cdn.datatables.net/responsive/2.3.0/js/responsive.bootstrap5.js"></script> <script type="text/javascript"> $(document).ready(function() { var table = $('#example').DataTable( { responsive: true } ); } ); </script> </body> </html> <?php } ?>