⚝
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 :
leaveform-table.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>Leave Form</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 href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/5.1.3/css/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"/> <script type="text/javascript"> function printpage() { //Get the print button and put it into a variable var printButton = document.getElementById("printpagebutton"); //Set the print button visibility to 'hidden' printButton.style.visibility = 'hidden'; //Print the page content window.print() //Set the print button to 'visible' again //[Delete this line if you want it to stay hidden after printing] printButton.style.visibility = 'visible'; } </script> </head> <body class="bg-white"> <div class="container-fluid"> <input id="printpagebutton" type="button" value="Print this page" onclick="printpage()"/> <table class="table table-bordered"> <thead class="table-white table-bordered text-black"> <tr> <th>#</th> <th>Bio</th> <th>Name</th> <th>Company</th> <th>L.Type</th> <th>L.Category</th> <th>Date</th> <th>Filed Date From</th> <th>Filed Date To</th> <th>Total Days</th> <th>USED NCL</th> <th>USED CL</th> <th>Leave Pay</th> </tr> </thead> <tbody class="text-black"> <?php if (isset($_POST['convertpdf'])) { $comps = $_POST['company']; $froms = $_POST['datefrom']; $tos = $_POST['dateto']; $sql = "SELECT tbl_leaveform.id, tbl_leaveform.Empid, tbl_leaveform.Leave_Type, tbl_leaveform.Leave_Category, tbl_leaveform.Description, tbl_leaveform.Reliever, tbl_leaveform.Reliever_Status, tbl_leaveform.Superior, tbl_leaveform.Superior_Status, tbl_leaveform.Head, tbl_leaveform.Head_Status, tbl_leaveform.Application_Date, tbl_leaveform.Filed_Date_From, tbl_leaveform.Filed_Date_To, tbl_leaveform.Total_Number_Days, tbl_leaveform.Time_From, tbl_leaveform.Time_To, tbl_leaveform.Total_Time, tbl_leaveform.HR_Officer, tbl_leaveform.Reviewed_By, tbl_leaveform.Leave_Pay, tbl_leaveform.Leave_Status, tblemployees.EmpId, tblemployees.My_Signature, tblemployees.FirstName, tblemployees.MiddleName, tblemployees.LastName, tblemployees.Position, tblemployees.My_Signature, tblemployees.PostImage, tblemployees.Company, tblemployees.Non_Convertible, tblemployees.Convertible, tbl_leaveform_history.Leave_id, tbl_leaveform_history.Less_On_Non_Con, tbl_leaveform_history.Less_On_Con, tbl_leaveform_history.Non_Con_Existing, tbl_leaveform_history.Con_Existing, tbl_leaveform_history.Balance_NCL, tbl_leaveform_history.Balance_CL FROM tbl_leaveform, tblemployees, tbl_leaveform_history WHERE tbl_leaveform.Empid = tblemployees.EmpId AND tbl_leaveform.id = tbl_leaveform_history.Leave_id AND tbl_leaveform.Leave_Status = 7 AND tblemployees.Company = :comps AND tbl_leaveform.Filed_Date_From >= :froms AND tbl_leaveform.Filed_Date_To <= :tos"; $query = $dbh->prepare($sql); $query->bindParam(':comps', $comps, PDO::PARAM_STR); $query->bindParam(':froms', $froms, PDO::PARAM_STR); $query->bindParam(':tos', $tos, PDO::PARAM_STR); $query->execute(); $results = $query->fetchAll(PDO::FETCH_OBJ); $cnt = 1; if($query->rowCount() > 0) { foreach ($results as $result) { ?> <tr> <td><?php echo htmlentities($cnt); ?></td> <td><?php echo htmlentities($result->Empid); ?></td> <td><?php echo htmlentities($result->LastName . ", " . $result->FirstName); ?></td> <?php if ($result->Company == 'Gracious Group Lending Philippines Corp.') { ?> <td><?php echo 'GGLPC'; ?></td> <?php }elseif ($result->Company == 'Faithful Servant Business Holdings Corp.') { ?> <td><?php echo 'FSBH'; ?></td> <?php } ?> <td><?php echo htmlentities($result->Leave_Type); ?></td> <td><?php echo htmlentities($result->Leave_Category); ?></td> <td><?php echo htmlentities($result->Application_Date); ?></td> <td><?php echo htmlentities($result->Filed_Date_From); ?></td> <td><?php echo htmlentities($result->Filed_Date_To); ?></td> <td><?php echo htmlentities($result->Total_Number_Days); ?></td> <td><?php echo htmlentities($result->Less_On_Non_Con); ?></td> <td><?php echo htmlentities($result->Less_On_Con); ?></td> <?php if ($result->Leave_Pay == 1) { ?> <td><?php echo 'With Pay'; ?></td> <?php }elseif ($result->Leave_Pay == 2) { ?> <td><?php echo 'W/out Pay'; ?></td> <?php } ?> </tr> <?php $cnt++; } } } ?> </tbody> </table> </div> <script src="https://code.jquery.com/jquery-3.6.4.min.js"></script> <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> </body> </html> <?php }?>