<?php
if (file_exists(upload_path.'employees/' . $employee_ID . '.jpg')) {
    $filename =upload_url.'employees/' . $employee_ID . '.jpg';
} else {
    $filename = SITE_LINK.'img/profiles/avatar.jpg';
}

//echo"<pre>";
//die(print_r($Content));
?>
<?php // echo "<pre>";die(print_r($patientDetails))                 ?>
<!--<link href="Theme/plugins/boostrapv3/css/bootstrap.min.css" rel="stylesheet">--> 
<style >

    table td ,th{
        border:1px solid black !important;
        font-size:15px;
        padding:4px;
    }
    table td.td-head{
        width: 30%;
        color: #2c2c2c;
        text-transform: uppercase;
        font-weight: 600;
        font-family: 'Montserrat';
        font-size: 13px;
    }

    .bold-div{
        font-weight: 900 !important;
        width:20%;
    }
    @media print{

        table td ,th{
            border:1px solid black !important;
            font-size:15px;
            padding:4px;
        }
        table td.td-head,table th.th-head{
            width: 30%;
            color: #2c2c2c;
            text-transform: uppercase;
            padding:0px;
            /*font-weight: 600;*/
            font-family: 'Montserrat';
            font-size: 18px !important;
        }

        html,body,.table>tbody>tr>td{
            font-size: 18px;
                padding:4px;
        }
        h4{display:initial !important;}
        .bold-div{
            font-weight: 700 !important;
            width:20%;
        }
        .card-label{
            font-size: 18px !important;
            font-weight: 700!important;
        }
    }
</style>
<body  onload="window.print()">
    <!--<body  >-->
    <div class="wrapper">
        <div class="panel ">
            <div class="panel-body">
                <div class="col-md-12">
                    <div class="row">
                        <div class="col-xs-12">

                            <div class="col-xs-6 col-sm-6 col-md-6">
                                <h3 class="text-center bold-div"><?php echo CommonLanguage::getMessage('personal_profile') ?></h3>
                            </div>
                            <div class=" col-xs-4 col-sm-3 col-md-3 form-group " style="border:2px solid #000;font-size:16px;">
                                <div class="col-xs-12 col-sm-12 col-md-12">
                                    <h5 class="card-label"><?php echo CommonLanguage::getMessage('Name') ?> : <span><?php echo $Content[0]["Employee_Name"] ?></span></h5>

                                </div>
                                <div class="col-xs-12 col-sm-12 col-md-12">
                                    <h5 class="card-label"><?php echo CommonLanguage::getMessage('dob') ?> : <span><?php echo $Content[0]["Employee_DOB"] ?></span> </h5> 

                                </div>
                                <div class="col-xs-12 col-sm-12 col-md-12">
                                    <h5 class="card-label"><?php echo CommonLanguage::getMessage('work_id') ?> : <span><?php echo $Content[0]["Employee_Work_ID"] ?></span></h5> 

                                </div>

                            </div>
                        </div>
                    </div>
                </div>
                <br>
                <div class="col-md-12">
                    <div class="row">
                        <div class="col-xs-12">
                            <div class="col-xs-12" style='border:1px solid #000'>
                                <h4 class="bold-div"><?php echo CommonLanguage::getMessage('personal_profile') ?> </h4>
                            </div>
                            <table class="table ">
                                <tr>
                                    <td class='bold-div'><?php echo CommonLanguage::getMessage('Name') ?>  </td>
                                    <td class="text-center"><?php echo $Content[0]["Employee_Name"] ?></td>
                                    <td class='bold-div'><?php echo CommonLanguage::getMessage('second_lang_name') ?>  </td>
                                    <td class="text-center"><?php echo $Content[0]["second_lang_name"] ?></td>
                                   


                                </tr>

                                <tr>
                                     <td class='bold-div'><?php echo CommonLanguage::getMessage('work_id') ?></td>
                                    <td class="text-center"><?php echo $Content[0]["Employee_Work_ID"] ?></td>
                                    <td class='bold-div'><?php echo CommonLanguage::getMessage('dob') ?> </td>
                                    <td class="text-center"><?php echo $Content[0]["Employee_DOB"] ?></td>
                                   

                                </tr>
                                <tr>
                                     <td class='bold-div'><?php echo CommonLanguage::getMessage('blood_group') ?> </td>
                                    <td class="text-center "><?php echo $Content[0]['BloodType_Name'] ?></td>
                                    <td class='bold-div'><?php echo CommonLanguage::getMessage('record_number') ?> </td>
                                    <td class="text-center"><?php echo $Content[0]['Employee_RecordNumber'] ?></td>
                                </tr>
                                <tr>
                                    
                                    <td class='bold-div'><?php echo CommonLanguage::getMessage('marital_status') ?> </td>
                                    <td class="text-center"><?php echo $Content[0]['Merital_Status_Name'] ?></td>
                                    <td class='bold-div'><?php echo CommonLanguage::getMessage('address') ?> </td>
                                    <td class="text-center "><?php echo $Content[0]['Country_Name'] . ' ' . $Content[0]['Employee_StreetAddress1'] ?></td>
                             

                                </tr>
                                <tr>
                                           <td class='bold-div'><?php echo CommonLanguage::getMessage('phone') ?> </td>
                                    <td class="text-center"><?php echo $Content[0]['Employee_HomePhone'] ?></td>
                                    <td class='bold-div'><?php echo CommonLanguage::getMessage('mobile_phone') ?> </td>
                                    <td class="text-center"><?php echo $Content[0]['Employee_MobilePhone'] ?></td>
                                  


                                </tr>
                                <tr>  <td class='bold-div'><?php echo CommonLanguage::getMessage('nssf') ?>  </td>
                                    <td class="text-center"><?php echo CommonLanguage::getMessage($Content[0]["is_nssf"] ? 'yes' : 'no') ?></td>
                                    <td class='bold-div'><?php echo CommonLanguage::getMessage('social_security') ?></td>
                                    <td class="text-center"><?php echo $Content[0]["Employee_SocialSecurity"] ?></td>
                                </tr>
                                <tr>
                                    
                                    <td class='bold-div'><?php echo CommonLanguage::getMessage('social_security_date') ?> </td>
                                    <td class="text-center"><?php echo $Content[0]["Employee_SocialSecurity_Date"] ?></td>
                                    <td class='bold-div'><?php echo CommonLanguage::getMessage('emp_edu') ?>  </td>
                                    <td class="text-center"><?php echo $Content[0]["Employee_Education"] ?></td>


                                </tr>
                                <tr>
                                    
                                    <td class='bold-div'><?php echo CommonLanguage::getMessage('emp_major') ?></td>
                                    <td class="text-center"><?php echo $Content[0]["Employee_Major"] ?></td>
                                    <td class='bold-div'><?php echo CommonLanguage::getMessage('department') ?>  </td>
                                    <td class="text-center"><?php echo $Content[0]["Branch_Name"] ?></td>
                                    

                                </tr>
                                <tr>
                                    <td class='bold-div'><?php echo CommonLanguage::getMessage('job') ?></td>
                                    <td class="text-center"><?php echo $Content[0]["Job_Name"] ?></td>
                                    <td class='bold-div'><?php echo CommonLanguage::getMessage('basic_salary') ?> </td>
                                    <td class="text-center"><?php echo!empty($Content[0]["basic_salary"]) ? $Content[0]["basic_salary"] . ' ' . $Content[0]['basic_currency_symbol'] : $Content[0]['Paygrade_Value'] . ' ' . $Content[0]['Currency_Symbol'] ?></td>
                                  
                                </tr>
                                <tr>
                                      <td class='bold-div'><?php echo CommonLanguage::getMessage('start_date') ?> </td>
                                    <td class="text-center"><?php echo $Content[0]["Employee_StartDate"] ?></td>
                                    <td class='bold-div'><?php echo CommonLanguage::getMessage('shift') ?>  </td>
                                    <td class="text-center"><?php echo $Content[0]["Shift_Name"] ?></td>


                                </tr>
                                <tr>
                                    <td class='bold-div'><?php echo CommonLanguage::getMessage('bank_name') ?> </td>
                                    <td class="text-center "><?php echo $Content[0]['bank_name'] ?></td>
                                    <td class='bold-div'><?php echo CommonLanguage::getMessage('bank_account') ?> </td>
                                    <td class="text-center"><?php echo $Content[0]['bank_account'] ?></td>
                                </tr>
                                <tr>
                                    <td class='bold-div'><?php echo CommonLanguage::getMessage('emp_type') ?> </td>
                                    <td class="text-center"><?php
                                        switch ($Content[0]["IS_Employee"]) {
                                            case 0:
                                                echo CommonLanguage::getMessage('not_IS_Employee');
                                                break;
                                            case 1:
                                                echo CommonLanguage::getMessage('IS_Employee');
                                                break;
                                            case 2:
                                                echo CommonLanguage::getMessage('sing_emp');
                                                break;
                                            case 3:
                                                echo CommonLanguage::getMessage('temp_emp');
                                                break;
                                        }
                                        ?></td>
                                     <td class='bold-div'><?php echo CommonLanguage::getMessage('Location') ?></td>
                                    <td class="text-center"><?php echo $Content[0]["Location_Name"] ?></td>
                                </tr>
                                
                                   
                            </table>
                        </div>
                    </div>

                    <div class="row">
                        <div class="col-xs-12">
                            <div class="col-xs-12" style='border:1px solid #000'>
                                <h4 class="bold-div"><?php echo CommonLanguage::getMessage('wife_info') ?> </h4>
                            </div>
                            <table class="table ">
                                <tr>
                                    <td class='bold-div'><?php echo CommonLanguage::getMessage('Name') ?>  </td>
                                    <td class="text-center"><?php echo $Content[0]["Employee_Wife_Name"] ?></td>
                                    <td class='bold-div'><?php echo CommonLanguage::getMessage('dob') ?></td>
                                    <td class="text-center"><?php echo $Content[0]["Employee_Wife_DOB"] ?></td>
                                    <td class='bold-div'><?php echo CommonLanguage::getMessage('nationality') ?> </td>
                                    <td class="text-center"><?php echo $Content[0]["Wife_Nationality"] ?></td>

                                </tr>

                                <tr>
                                    <td class='bold-div'><?php echo CommonLanguage::getMessage('wife_works') ?> </td>
                                    <td class="text-center "><?php
                                        switch ($Content[0]["Wife_Works"]) {
                                            case 0:
                                                echo CommonLanguage::getMessage('no');
                                                break;
                                            case 1:
                                                echo CommonLanguage::getMessage('yes');
                                                break;
                                            case 2:
                                                echo CommonLanguage::getMessage('others');
                                                break;
                                            case 3:
                                                echo CommonLanguage::getMessage('husband_foreign_nationality');
                                                break;
                                        }
                                        ?></td>
                                    <td class='bold-div'><?php echo CommonLanguage::getMessage('Employee_Wife_Phone') ?> </td>
                                    <td class="text-center"><?php echo $Content[0]['Employee_Wife_Phone'] ?></td>
                                    <td class='bold-div'> </td>
                                    <td class="text-center "></td>
                                </tr>


                            </table>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-xs-12">
                            <div class="col-xs-12" style='border:1px solid #000'>
                                <h4 class="bold-div"><?php echo CommonLanguage::getMessage('emergency_contact') ?> </h4>
                            </div>
                            <table class="table ">
                                <tr>
                                    <th class='text-center'><?php echo CommonLanguage::getMessage('Name') ?></th>
                                    <th class='text-center'><?php echo CommonLanguage::getMessage('relationship') ?></th>
                                    <th class='text-center'><?php echo CommonLanguage::getMessage('Phone') ?></th>
                                    <th class='text-center'><?php echo CommonLanguage::getMessage('mobile_phone') ?></th>
                                </tr>
                                <?php if (empty($emp_emergency)) { ?>
                                    <tr>
                                        <td class="text-center" colspan="4"><?php echo CommonLanguage::getMessage('none') ?></td>
                                    </tr>
                                <?php } else { ?>

                                    <?php foreach ($emp_emergency as $em) { ?>
                                        <tr>
                                            <td class="text-center"><?php echo $em["Contact_Name"] ?></td>
                                            <td class="text-center"><?php echo $em['Relation_Name'] ?></td>
                                            <td class="text-center"><?php echo $em['EmergencyContact_HomePhone'] ?></td>
                                            <td class="text-center"><?php echo $em['EmergencyContact_MobilePhone'] ?></td>
                                        </tr>
                                        <?php
                                    }
                                }
                                ?>
                            </table>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-xs-12">
                            <div class="col-xs-12" style='border:1px solid #000'>
                                <h4 class="bold-div"><?php echo CommonLanguage::getMessage('hr_pers_child') ?> </h4>
                            </div>
                            <table class="table ">
                                <tr>
                                    <th class='text-center'><?php echo CommonLanguage::getMessage('Name') ?></th>
                                    <th class='text-center'><?php echo CommonLanguage::getMessage('dob') ?></th>
                                    <th class='text-center'><?php echo CommonLanguage::getMessage('child_school') ?></th>
                                    <th class='text-center'><?php echo CommonLanguage::getMessage('child_school_type') ?></th>
                                    <th class='text-center'><?php echo CommonLanguage::getMessage('child_class') ?></th>
                                </tr>
                                <?php if (empty($child_emp)) { ?>
                                    <tr>
                                        <td class="text-center" colspan="5"><?php echo CommonLanguage::getMessage('none') ?></td>
                                    </tr>
                                <?php } else { ?>

                                    <?php foreach ($child_emp as $em) { ?>
                                        <tr>
                                            <td class="text-center"><?php echo $em["child_name"] ?></td>
                                            <td class="text-center"><?php echo $em['child_dob'] ?></td>
                                            <td class="text-center"><?php echo $em['child_school'] ?></td>
                                            <td class="text-center"><?php echo $em['school_type_name'] ?></td>
                                            <td class="text-center"><?php echo $em['child_class'] ?></td>
                                        </tr>
                                        <?php
                                    }
                                }
                                ?>
                            </table>
                        </div>
                    </div>


                </div>

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