<?php 
include('../dbconnect.php');
?>
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>

    <!-- Bootstrap core CSS-->
    <link href="../vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">

    <!-- Custom fonts for this template-->
    <link href="../vendor/fontawesome-free/css/all.min.css" rel="stylesheet" type="text/css">

    <!-- Page level plugin CSS-->
    <link href="../vendor/datatables/dataTables.bootstrap4.css" rel="stylesheet">

    <!-- Custom styles for this template-->
    <link href="../css/sb-admin.css" rel="stylesheet">
    <link href="../css/style.css" rel="stylesheet">
    <link rel="icon" href="../images/logo.jpg" type="image/gif" sizes="16x16">

    <style>
    .leaveform {

        font-size: 20px;

    }
    </style>

</head>

<body>
    <div id="leaveform" class="leaveform">
        <div class="container">

            <div class="row">
                <div class="col-lg-12">
                    <div class="align-middle">
                        <img src="../images/logo.jpg" class="float-left p-3" alt="" height="150px" width="150px">
                        <br>

                        <h1 style="font-size: 60px"> &nbsp ATV International ROHQ</h1>
                        <br>
                        <hr style="border: 2px solid black">

                    </div>

                    <h2 class="text-center">LEAVE FORM</h2>
                    <br>


                </div>
                <div class="col-4 p-3">
                    <b>NAME: </b>
                </div>
                <div class="col-4 p-3">
                    <b>EMPLOYEE ID: </b>
                </div>
                <div class="col-4 p-3">
                    <b>TEAM / DEPARTMENT: </b>
                </div>

                <div class="col-6">
                    <table class="table table-bordered table-sm">
                        <tr>
                            <td></td>
                            <td> <b> # Days/HRS </b></td>
                            <td class="text-center"> <i class="fa fa-check"></i> </td>

                        </tr>
                        <tr>
                            <td>Emergency Leave</td>
                            <td> </td>
                            <td> </td>

                        </tr>
                        <tr>
                            <td>Sick Leave</td>
                            <td> </td>
                            <td> </td>
                        </tr>
                        <tr>
                            <td>Vacation Leave</td>
                            <td> </td>
                            <td> </td>
                        </tr>
                        <tr>
                            <td>LWOP - Unpaid Leave</td>
                            <td> </td>
                            <td> </td>

                        </tr>

                        <?php
                            $leave = "SELECT * FROM pto WHERE name IN('Bereavement','Magna Carta') GROUP BY name ";
                            $leaveres = mysqli_query($conn, $leave);
                            while($leaverow = mysqli_fetch_assoc($leaveres)){
                                echo '<tr><td>'.$leaverow['name'].' Leave </td>
                                <td> </td>
                                <td> </td>
                                </tr>';
                            }
                        
                        ?>




                    </table>
                    <br>
                </div>
                <div class="col-6">
                    <table class="table table-bordered table-sm">
                        <tr>
                            <td></td>
                            <td> <b> # Days/HRS </b></td>
                            <td class="text-center"> <i class="fa fa-check"></i> </td>

                        </tr>

                        <?php
                            $leave = "SELECT * FROM pto WHERE name != 'Paid Time Off' AND name !='Magna Carta' AND name != 'Bereavement' GROUP BY name ";
                            $leaveres = mysqli_query($conn, $leave);
                            while($leaverow = mysqli_fetch_assoc($leaveres)){
                                echo '<tr><td>'.$leaverow['name'].' Leave </td>
                                <td> </td>
                                <td> </td>
                                </tr>';
                            }
                        
                            ?>
                        <td colspan='3'>Note/Comment/Reason: </td>

                    </table>



                </div>
                <div class="col-12 border border-secondary">
                    <div class="row">
                        <div class="col-6">
                            LEAVE DATE:

                        </div>
                        <div class="col-6">

                            # of Approved Leave

                        </div>
                    </div>



                </div>

                <div class="col-12 border-right border-left border-bottom border-secondary">
                    <div class="row">
                        <div class="col-6">
                            EMPLOYEE'S SIGNATURE OVER PRINTED NAME <br>
                            DATE FILED

                        </div>
                        <div class="col-6">

                            :<br>
                            :

                        </div>
                    </div>



                </div>
                <div class="col-12 border-right border-left border-bottom border-secondary">
                    <div class="row">
                        <div class="col-6">
                            NOTED BY: <br>
                            IMMEDIATE SUPERVISOR <br>
                            DATE FILED

                        </div>
                        <div class="col-6">

                            :<br>
                            : <br>
                            :

                        </div>
                    </div>



                </div>
                <div class="col-12 border-right border-left border-bottom border-secondary">
                    <div class="row">
                        <div class="col-6">

                            Yves Emor G. Marcelo <br>
                            DATE FILED

                        </div>
                        <div class="col-6">


                            : <br>
                            :

                        </div>
                    </div>



                </div>


                <div class="col-12 p-4">
                    <p class="text-center">( FOR HUMAN RESOURCES ONLY )</p>
                    (<i class="fa fa-check"></i> ) Approved ( ) Disapproved (If Approval is NOT RECOMMENDED, attach
                    explanation) <br> <br>
                    Lorem ipsum dolor sit, amet consectetur adipisicing elit. Sapiente voluptates blanditiis voluptate
                    tempore unde iusto aliquam ad excepturi iste, quam maiores cumque eum vero ipsum fugiat obcaecati
                    facere! Vel, quod.
                </div>


                <div class="col-6">
                    _________________________________<br>

                    Human Resources Depart/Date
                    <br>
                    <br>

                    Leave File Number _____________


                </div>
                <div class="col-6 text-right">
                    ____________________________<br>
                    REMAINING PTO CREDITS

                    <br>
                    <br>
                    Date Hire __________________
                </div>


                <div class="col-12 p-3 text-center">
                    <hr style="border: 2px solid black">
                    <b>ATV International ROHQ </b> <br>
                    <small>3rd floor Yupangco Bldg. 1606 Investment Dr cor Trade Ave., <br>
                        Madrigal Business Park Ayala Alabang Muntinlupa City
                        Tel No. 632.551.55.88
                    </small>

                </div>




            </div>
        </div>
    </div>

    <?php  mysqli_close($conn)?>
</body>

</html>