<div class="row">
    <div class="col-sm-12">
        <div class="panel panel-bd">

            <div class="panel-heading">
                <div class="panel-title">
                    <h4>
                        <?php if($letter == "1"){
                            echo "Offer Letter";
                        } elseif ($letter == "2"){
                            echo "NDA";
                        }elseif ($letter == "3"){
                            echo "Contractual Agreement";
                        }?>
                    </h4>
                </div>
            </div>
            <div class="panel-body">
                <div class="form-group row">
                    <div class="col-sm-3">
                        <?php if($letter == "1"){
                            $model_load = "#AddModal";
                            $button_text = "Generate Offer Letter";
                        } elseif ($letter == "2"){
                            $model_load = "#NdaModal";
                            $button_text = "Generate NDA Letter";
                        }elseif ($letter == "3"){
                            $model_load = "#CaModal";
                            $button_text = "Generate Contractual Agreement";
                        }
                        ?>
                        <a data-toggle="modal" data-target="<?php echo $model_load?>" id="edit" class="btn btn-success w-md m-b-5"> <?php echo $button_text ?> </a>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<!-- Offer Letter -->
<div id="AddModal" class="modal fade" role="dialog">
    <div class="modal-dialog modal-lg">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal">&times;</button>
                <center><strong><h4><i class='fa fa-certificate' aria-hidden='true'></i> Offer Letter </h4></strong></center>
            </div>
            <div class="modal-body">
                <div class="row">
                    <div class="col-sm-12 col-md-12">
                        <div class="panel">
                            <div class="panel-heading">
                                <div class="panel-title">
                                </div>
                            </div>
                            <div class="panel-body">
                                <?php echo  form_open_multipart('reports/Onboarding_controller/add_appointment_letter') ?>
                                <?php $required = 'required';
                                ?>
                                <div class="row">
                                    <div class="col-sm-4">
                                        <div class="form-group">
                                            <label for="first_name" ><?php echo "First Name"?> <sup
                                                        class="color-red">*</sup></label>
                                            <input type="text" name="firstname" id="firstname" class="form-control" placeholder="First Name" <?php echo $required?> >
                                        </div>
                                    </div>
                                    <div class="col-sm-4" >
                                        <div class="form-group">
                                            <label for="last_name"><?php echo "Last Name"?><sup
                                                        class="color-red">*</sup></label>
                                            <input type="text" name="lastname" id="lastname" class="form-control" placeholder="Select Date" value="<?php echo (!empty($date)?$date:'');?>" autocomplete="off" <?php echo $required?>>
                                        </div>
                                    </div>
                                    <div class="col-sm-4" >
                                        <div class="form-group">
                                            <label for="gender"><?php echo "Gender"?> <sup
                                                        class="color-red">*</sup></label>
                                            <select name="gender" id="gender" class="form-control" <?php echo $required?>>
                                                <option value="0" disabled selected> <?php echo "Gender" ?> </option>
                                                <option value="1"> Male</option>
                                                <option value="2"> Female</option>
                                            </select>
                                        </div>
                                    </div>
                                </div>
                                <div class="row">
                                    <div class="col-sm-11">
                                        <div class="form-group">
                                            <label for="working_schedule" class="panel-title"><?php echo "Working Schedule"?></label>
                                        </div>
                                    </div>
                                </div>
                                <div class="row">
                                    <div class="col-sm-2">
                                        <div class="form-group">
                                            <select name="job_type" id="job_type" class="form-control" <?php echo $required?>>
                                                <option value="0" disabled selected> <?php echo "Job Type"?> </option>
                                                <option value="1"> Full Time</option>
                                                <option value="2"> Part Time</option>
                                            </select>
                                        </div>
                                    </div>
                                    <div class="col-sm-3">
                                        <div class="form-group">
                                            <select name="start_day" id="start_day" class="form-control" <?php echo $required?>>
                                                <option value="0" disabled selected> <?php echo "Start Day"?> </option>
                                                <option value="1"> Monday </option>
                                                <option value="2"> Tuesday</option>
                                                <option value="3"> Wednesday</option>
                                                <option value="4"> Thursday</option>
                                                <option value="5"> Friday</option>
                                                <option value="6"> Saturday</option>
                                                <option value="7"> Sunday</option>
                                            </select>
                                        </div>
                                    </div>
                                    <div class="col-sm-3">
                                        <div class="form-group">
                                            <select name="end_day" id="end_day" class="form-control" <?php echo $required?>>
                                                <option value="0" disabled selected> <?php echo "End Day"?> </option>
                                                <option value="1"> Monday </option>
                                                <option value="2"> Tuesday</option>
                                                <option value="3"> Wednesday</option>
                                                <option value="4"> Thursday</option>
                                                <option value="5"> Friday</option>
                                                <option value="6"> Saturday</option>
                                                <option value="7"> Sunday</option>
                                            </select>
                                        </div>
                                    </div>
                                    <div class="col-sm-2">
                                        <div class="form-group">
                                            <select name="start_time" id="start_time" class="form-control" <?php echo $required?>>
                                                <option value="0" disabled selected> <?php echo "Start Time"?> </option>
                                                <option value="1"> 12:00 PM</option>
                                                <option value="2"> 1:00 PM</option>
                                                <option value="3"> 2:00 PM</option>
                                                <option value="4"> 3:00 PM</option>
                                                <option value="5"> 4:00 PM</option>
                                                <option value="6"> 5:00 PM</option>
                                                <option value="7"> 6:00 PM</option>
                                                <option value="8"> 7:00 PM</option>
                                                <option value="9"> 8:00 PM</option>
                                                <option value="10"> 9:00 PM</option>
                                                <option value="11"> 10:00 PM</option>
                                                <option value="12"> 11:00 PM</option>
                                                <option value="13"> 12:00 AM</option>
                                                <option value="14"> 1:00 AM</option>
                                                <option value="15"> 12:00 AM</option>
                                                <option value="16"> 3:00 AM</option>
                                                <option value="17"> 4:00 AM</option>
                                                <option value="18"> 5:00 AM</option>
                                                <option value="19"> 6:00 AM</option>
                                                <option value="20"> 7:00 AM</option>
                                                <option value="21"> 8:00 AM</option>
                                                <option value="22"> 9:00 AM</option>
                                                <option value="23"> 10:00 AM</option>
                                                <option value="24"> 11:00 AM</option>
                                            </select>
                                        </div>
                                    </div>
                                    <div class="col-sm-2">
                                        <div class="form-group">
                                            <select name="end_time" id="end_time" class="form-control" <?php echo $required?>>
                                                <option value="0" disabled selected> <?php echo "End Time"?> </option>
                                                <option value="1"> 12:00 PM</option>
                                                <option value="2"> 1:00 PM</option>
                                                <option value="3"> 2:00 PM</option>
                                                <option value="4"> 3:00 PM</option>
                                                <option value="5"> 4:00 PM</option>
                                                <option value="6"> 5:00 PM</option>
                                                <option value="7"> 6:00 PM</option>
                                                <option value="8"> 7:00 PM</option>
                                                <option value="9"> 8:00 PM</option>
                                                <option value="10"> 9:00 PM</option>
                                                <option value="11"> 10:00 PM</option>
                                                <option value="12"> 11:00 PM</option>
                                                <option value="13"> 12:00 AM</option>
                                                <option value="14"> 1:00 AM</option>
                                                <option value="15"> 12:00 AM</option>
                                                <option value="16"> 3:00 AM</option>
                                                <option value="17"> 4:00 AM</option>
                                                <option value="18"> 5:00 AM</option>
                                                <option value="19"> 6:00 AM</option>
                                                <option value="20"> 7:00 AM</option>
                                                <option value="21"> 8:00 AM</option>
                                                <option value="22"> 9:00 AM</option>
                                                <option value="23"> 10:00 AM</option>
                                                <option value="24"> 11:00 AM</option>
                                            </select>
                                        </div>
                                    </div>
                                </div>
                                <div class="row">
                                    <div class="col-sm-4" >
                                        <div class="form-group">
                                            <label for="last_name"><?php echo "Email Address"?><sup
                                                        class="color-red">*</sup></label>
                                            <input type="email" name="user_email" id="user_email" class="form-control" placeholder="Email Address" value="<?php echo (!empty($date)?$date:'');?>" autocomplete="off" <?php echo $required?>>
                                        </div>
                                    </div>
                                    <div class="col-sm-4" >
                                        <div class="form-group">
                                            <label for="position"><?php echo "Position"?> <sup
                                                        class="color-red">*</sup></label>
                                            <select name="position" id="position" class="form-control" <?php echo $required?>>
                                                <option value=""></option>
                                                <?php foreach($designation as $des){?>
                                                    <option value="<?php echo $des->pos_id ?>"> <?php echo $des->position_name ?>  </option>
                                                <?php }?>
                                            </select>
                                        </div>
                                    </div>
                                    <div class="col-sm-4">
                                        <div class="form-group">
                                            <label for="department"><?php echo "Department "?> <sup
                                                        class="color-red">*</sup></label>
                                            <?php echo form_dropdown('department_id', $departments, $department_id, ' class="form-control"') ?>
                                        </div>
                                    </div>
                                </div>
                                <div class="row">
                                    <div class="col-sm-4" >
                                        <div class="form-group">
                                            <label for="project_manager"><?php echo "Project Manager"?> <sup
                                                        class="color-red">*</sup></label>
                                            <!--                        --><?php //echo form_dropdown('department_id', $departments, $department_id, ' class="form-control"') ?>
                                            <select name="project_manager" id="project_manager" class="form-control" <?php echo $required?>>
                                                <option value=""></option>
                                                <?php foreach($employe as $emp){?>
                                                    <option value="<?php echo $emp->employee_id ?>"> <?php echo $emp->first_name.' '.$emp->last_name ?>  </option>
                                                <?php }?>
                                            </select>
                                        </div>
                                    </div>
                                    <div class="col-sm-4">
                                        <div class="form-group">
                                            <label for="date" class=""><?php echo "Joining date"?><sup
                                                        class="color-red">*</sup></label>
                                            <input type="text" name="joning_date" id="joning_date"  class="form-control datepicker" placeholder="Select Date" value="<?php echo (!empty($date)?$date:'');?>" autocomplete="off" <?php echo $required?>>
                                        </div>
                                    </div>
                                    <div class="col-sm-4">
                                        <div class="form-group">
                                            <label for="date" class=""><?php echo "Hiring Date"?></label>
                                            <input type="text" name="hiring_date" id="hiring_date"  class="form-control datepicker" placeholder="Select Date" value="<?php echo (!empty($date)?$date:'');?>" autocomplete="off">
                                        </div>
                                    </div>
                                </div>
                                <div class="row">
                                    <div class="col-sm-4">
                                        <div class="form-group">
                                            <label for="response_date" class=""><?php echo "Response Date"?><sup
                                                        class="color-red">*</sup></label>
                                            <input type="text" name="response_date" id="response_date" class="form-control datepicker" placeholder="Select Date" value="<?php echo (!empty($date)?$date:'');?>" autocomplete="off" <?php echo $required?>>
                                        </div>
                                    </div>
                                    <div class="col-sm-4">
                                        <div class="form-group">
                                            <label for="salary" class=""><?php echo "Salary"?><sup
                                                        class="color-red">*</sup></label>
                                            <input type="number" class="form-control" name="salary" id="salary" placeholder="Rate" autocomplete="off" <?php echo $required?>>
                                        </div>
                                    </div>
                                    <div class="col-sm-4">
                                        <div class="form-group">
                                            <label for="revised_salary" class=""><?php echo "Revised Salary"?></label>
                                            <input type="number" class="form-control" name="revised_salary" id="revised_salary" placeholder="Revosed Rate" autocomplete="off">
                                        </div>
                                    </div>
                                </div>
                                <div class="form-group form-group-margin text-right">
                                    <button type="reset" class="btn btn-primary w-md m-b-5"><?php echo display('reset') ?></button>
                                    <button type="submit"  class="btn btn-success w-md m-b-5"><?php echo display('save') ?></button>
                                </div>
                                <?php echo form_close() ?>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<!-- NDA Letter -->
<div id="NdaModal" class="modal fade" role="dialog">
    <div class="modal-dialog modal-lg">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal">&times;</button>
                <center><strong><h4><i class='fa fa-certificate' aria-hidden='true'></i> NDA Letter </h4></strong></center>
            </div>
            <div class="modal-body">
                <div class="row">
                    <div class="col-sm-12 col-md-12">
                        <div class="panel">
                            <div class="panel-heading">
                                <div class="panel-title">

                                </div>
                            </div>
                            <div class="panel-body">
                                <?php echo  form_open_multipart('reports/Onboarding_controller/add_nda_letter') ?>
                                <?php $required = 'required'; ?>
                                <div class="row">
                                    <div class="col-sm-4">
                                        <div class="form-group">
                                            <label for="first_name" ><?php echo "First Name"?> <sup
                                                        class="color-red">*</sup></label>
                                            <input type="text" name="firstname" id="firstname" class="form-control" placeholder="First Name" <?php echo $required?> >
                                        </div>
                                    </div>
                                    <div class="col-sm-4" >
                                        <div class="form-group">
                                            <label for="last_name"><?php echo "Last Name"?><sup
                                                        class="color-red">*</sup></label>
                                            <input type="text" name="lastname" id="lastname" class="form-control" placeholder="Select Date" value="<?php echo (!empty($date)?$date:'');?>" autocomplete="off" <?php echo $required?>>
                                        </div>
                                    </div>
                                    <div class="col-sm-4" >
                                        <div class="form-group">
                                            <label for="gender"><?php echo "Gender"?> <sup
                                                        class="color-red">*</sup></label>
                                            <!--                        --><?php //echo form_dropdown('department_id', $departments, $department_id, ' class="form-control"') ?>
                                            <select name="gender" id="gender" class="form-control" <?php echo $required?>>
                                                <!--                                                <option value=""> --><?php //echo display('gender_select')?><!-- </option>-->
                                                <option value="0" disabled selected> <?php echo "Gender"?> </option>
                                                <option value="1"> Male</option>
                                                <option value="2"> Female</option>
                                            </select>
                                        </div>
                                    </div>
                                </div>
                                <div class="row">
                                    <div class="col-sm-4" >
                                        <div class="form-group">
                                            <label for="last_name"><?php echo "Email Address"?><sup
                                                        class="color-red">*</sup></label>
                                            <input type="email" name="user_email" id="user_email" class="form-control" placeholder="Email Address" value="<?php echo (!empty($date)?$date:'');?>" autocomplete="off" <?php echo $required?>>
                                        </div>
                                    </div>
                                    <div class="col-sm-4">
                                        <div class="form-group">
                                            <label for="effective_date" class=""><?php echo "Effective Date"?><sup
                                                        class="color-red">*</sup></label>
                                            <input type="text" name="effective_date" id="effective_date" class="form-control datepicker" placeholder="Select Date" value="<?php echo (!empty($date)?$date:'');?>" autocomplete="off" <?php echo $required?>>
                                        </div>
                                    </div>
                                </div>

                                <div class="form-group form-group-margin text-right">
                                    <button type="reset" class="btn btn-primary w-md m-b-5"><?php echo display('reset') ?></button>
                                    <button type="submit"  class="btn btn-success w-md m-b-5"><?php echo display('save') ?></button>
                                </div>
                                <?php echo form_close() ?>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<!-- Contractual Agreement -->
<div id="CaModal" class="modal fade" role="dialog">
    <div class="modal-dialog modal-lg">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal">&times;</button>
                <center><strong><h4><i class='fa fa-certificate' aria-hidden='true'></i> Contractual Agreement </h4></strong></center>
            </div>
            <div class="modal-body">
                <div class="row">
                    <div class="col-sm-12 col-md-12">
                        <div class="panel">
                            <div class="panel-heading">
                                <div class="panel-title">

                                </div>
                            </div>
                            <div class="panel-body">
                                <?php echo  form_open_multipart('reports/Onboarding_controller/add_contractual_agreement') ?>
                                <?php $required = 'required'; ?>
                                <div class="row">
                                    <div class="col-sm-4">
                                        <div class="form-group">
                                            <label for="first_name" ><?php echo "First Name"?> <sup
                                                        class="color-red">*</sup></label>
                                            <input type="text" name="firstname" id="firstname" class="form-control" placeholder="First Name" <?php echo $required?> >
                                        </div>
                                    </div>
                                    <div class="col-sm-4" >
                                        <div class="form-group">
                                            <label for="last_name"><?php echo "Last Name"?><sup
                                                        class="color-red">*</sup></label>
                                            <input type="text" name="lastname" id="lastname" class="form-control" placeholder="Select Date" value="<?php echo (!empty($date)?$date:'');?>" autocomplete="off" <?php echo $required?>>
                                        </div>
                                    </div>
                                    <div class="col-sm-4" >
                                        <div class="form-group">
                                            <label for="gender"><?php echo "Gender"?> <sup
                                                        class="color-red">*</sup></label>
                                            <!--                        --><?php //echo form_dropdown('department_id', $departments, $department_id, ' class="form-control"') ?>
                                            <select name="gender" id="gender" class="form-control" <?php echo $required?>>
                                                <!--                                                <option value=""> --><?php //echo display('gender_select')?><!-- </option>-->
                                                <option value="0" disabled selected> <?php echo "Gender"?> </option>
                                                <option value="1"> Male</option>
                                                <option value="2"> Female</option>
                                            </select>
                                        </div>
                                    </div>
                                </div>
                                <div class="row">
                                    <div class="col-sm-4">
                                        <div class="form-group">
                                            <label for="father_name" ><?php echo "Father Name"?> <sup
                                                        class="color-red">*</sup></label>
                                            <input type="text" name="father_name" id="father_name" class="form-control" placeholder="Father Name" <?php echo $required?> >
                                        </div>
                                    </div>
                                    <div class="col-sm-4">
                                        <div class="form-group">
                                            <label for="cnic">CNIC<sup
                                                        class="color-red ">*</sup></label>
                                            <input type="number" class="form-control" name="cnic" id="cnic"
                                                   placeholder="Employee CNIC Number" <?php echo $required?>>
                                        </div>
                                    </div>
                                    <div class="col-sm-4">
                                        <div class="form-group">
                                            <label for="dob" class=""><?php echo "Date of Birth"?><sup
                                                        class="color-red">*</sup></label>
                                            <input type="text" name="dob" id="dob" class="form-control datepicker" placeholder="Select Date" value="<?php echo (!empty($date)?$date:'');?>" autocomplete="off" <?php echo $required?>>
                                        </div>
                                    </div>
                                </div>
                                <div class="row">
                                    <div class="col-sm-4" >
                                        <div class="form-group">
                                            <label for="last_name"><?php echo "Email Address"?><sup
                                                        class="color-red">*</sup></label>
                                            <input type="email" name="user_email" id="user_email" class="form-control" placeholder="Email Address" value="<?php echo (!empty($date)?$date:'');?>" autocomplete="off" <?php echo $required?>>
                                        </div>
                                    </div>
                                    <div class="col-sm-4">
                                        <div class="form-group">
                                            <label for="effective_date" class=""><?php echo "Effective Date"?><sup
                                                        class="color-red">*</sup></label>
                                            <input type="text" name="effective_date" id="effective_date" class="form-control datepicker" placeholder="Select Date" value="<?php echo (!empty($date)?$date:'');?>" autocomplete="off" <?php echo $required?>>
                                        </div>
                                    </div>
                                    <div class="col-sm-4">
                                        <div class="form-group">
                                            <label for="Address"><?php echo "Address" ?></label>
                                            <textarea class="form-control"
                                                      name="address" id="address"
                                                      placeholder="Reason For Leaving" <?php echo $required?>></textarea>
                                        </div>
                                    </div>
                                </div>
                                <div class="row">
                                    <div class="col-sm-11" >
                                        <div class="form-group">
                                            <label for="description_of_services"><?php echo "DESCRIPTION OF SERVICES" ?></label>
                                            <textarea class="form-control"
                                                      name="description_of_services" id="description_of_services"
                                                      placeholder="Enter DESCRIPTION OF SERVICES"></textarea>
                                        </div>
                                    </div>
                                    <div class="col-sm-11">
                                        <div class="form-group">
                                            <label for="payment"><?php echo "PAYMENT" ?></label>
                                            <textarea class="form-control"
                                                      name="payment" id="payment"
                                                      placeholder="Enter PAYMENT Block"></textarea>
                                        </div>
                                    </div>
                                </div>

                                <div class="form-group form-group-margin text-right">
                                    <button type="reset" class="btn btn-primary w-md m-b-5"><?php echo display('reset') ?></button>
                                    <button type="submit"  class="btn btn-success w-md m-b-5"><?php echo display('save') ?></button>
                                </div>
                                <?php echo form_close() ?>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<?php

if($letter == "1"){?>
    <?php //if(true){?>
    <div class="row">
        <div class="col-sm-12 col-md-12 employee-form">
            <div class="panel">
                <div class="panel-body">
                    <table width="100%" class="datatable table table-striped table-bordered table-hover">
                        <thead class="tableheads">
                        <tr>
                            <th class="">sl</th>
                            <th class="">Name</th>
                            <th class="">Email</th>
                            <th class="">Position</th>
                            <th class="">Joining Date</th>
                            <th class="">Salary</th>
                            <th class="">Action</th>
                        </tr>
                        </thead>
                        <tbody>
                        <?php if(empty($results)){?>
                            <tr><td colspan="8" class="text-center"> No Result Found </td></tr>
                        <?php }else{
                            $sl = 1;
                            foreach ($results as $result) {

                                ?>
                                <tr>
                                    <td class=""><?php echo $sl;?></td>
                                    <td class=""><?php echo $result->first_name.' '.$result->last_name;?></td>
                                    <td class=""><?php echo $result->user_email;?></td>
                                    <td class=""><?php echo $result->position_name;?></td>
                                    <td class=""><?php echo  date("Y-m-d", strtotime($result->joining_date));?></td>
                                    <td><?php echo $result->salary;?></td>
                                    <td> <a href="<?php echo $result->offer_letter_path ?>"
                                            class="btn btn btn-success"> View </a>
                                        <!--                                         <a href="--><?php //echo base_url("reports/Onboarding_controller/delete_offer_letter/$result->id")?><!--"-->
                                        <!--                                           class="btn btn btn-danger"> del </a>-->
                                    </td>
                                </tr>
                                <?php $sl++;}}?>
                        </tbody>
                        <tfoot></tfoot>
                    </table>
                </div>
            </div>
        </div>
    </div>
<?php }
elseif ($letter == "2"){?>
    <div class="row">
        <div class="col-sm-12 col-md-12 employee-form">
            <div class="panel">
                <div class="panel-body">
                    <table width="100%" class="datatable table table-striped table-bordered table-hover">
                        <thead class="tableheads">
                        <tr>
                            <th class="">Sl</th>
                            <th class="">Name</th>
                            <th class="">Email</th>
                            <th class="">Effective Date</th>
                            <th class="">Action</th>
                        </tr>
                        </thead>
                        <tbody>
                        <?php if(empty($results)){?>
                            <tr><td colspan="8" class="text-center"> No Result Found </td></tr>
                        <?php }else{
                            $sl = 1;
                            foreach ($results as $result) {?>
                                <tr>
                                    <td class=""><?php echo $sl;?></td>
                                    <td class=""><?php echo $result->first_name.' '.$result->last_name;?></td>
                                    <td class=""><?php echo $result->user_email;?></td>
                                    <td class=""><?php echo  date("Y-m-d", strtotime($result->effective_date));?></td>
                                    <td class=""> <a href="<?php echo $result->offer_letter_path ?>"
                                                     class="btn btn btn-success"> View </a>
                                        <!--                                        <a href="--><?php //echo base_url("reports/Onboarding_controller/delete_nda_letter/$result->id")?><!--"-->
                                        <!--                                           class="btn btn btn-danger"> del </a>-->
                                    </td>
                                </tr>
                                <?php $sl++;}}?>
                        </tbody>
                        <tfoot></tfoot>
                    </table>
                </div>
            </div>
        </div>
    </div>
<?php } elseif ($letter == "3"){ ?>
    <div class="row">
        <div class="col-sm-12 col-md-12 employee-form">
            <div class="panel">
                <div class="panel-body">
                    <table width="100%" class="datatable table table-striped table-bordered table-hover">
                        <thead class="tableheads">
                        <tr>
                            <th class="">sl</th>
                            <th class="">Name</th>
                            <th class="">Email</th>
                            <th class="">CNIC</th>
                            <th class="">Father Name</th>
                            <!--                            <th class="">Effective Date</th>-->
                            <th class="">Action</th>
                        </tr>
                        </thead>
                        <tbody>
                        <?php if(empty($results)){?>
                            <tr><td colspan="8" class="text-center"> No Result Found </td></tr>
                        <?php }else{
                            $sl = 1;
                            foreach ($results as $result) {?>
                                <tr>
                                    <td class=""><?php echo $sl;?></td>
                                    <td class=""><?php echo $result->first_name.' '.$result->last_name;?></td>
                                    <td class=""><?php echo $result->user_email;?></td>
                                    <td class=""><?php echo $result->cnic;?></td>
                                    <td class=""><?php echo $result->father_name;?></td>
                                    <!--                                    <td class="">--><?php //echo  date("Y-m-d", strtotime($result->effective_date));?><!--</td>-->
                                    <td> <a href="<?php echo $result->offer_letter_path ?>"
                                            class="btn btn btn-success"> View </a>
                                        <!--                                        <a href="--><?php //echo base_url("reports/Contractual_agreement_controller/delete_agreement_letter/$result->id")?><!--"-->
                                        <!--                                           class="btn btn btn-danger"> del </a>-->
                                    </td>
                                </tr>
                                <?php $sl++;}}?>
                        </tbody>
                        <tfoot></tfoot>
                    </table>
                </div>
            </div>
        </div>
    </div>
<?php }?>

<script src="https://cdn.ckeditor.com/ckeditor5/11.0.1/classic/ckeditor.js"></script>
<script>
    ClassicEditor
        .create( document.querySelector( '#description_of_services' ) )
        .catch( error => {
            console.error( error );
        } );

</script>

<script>
    ClassicEditor
        .create( document.querySelector( '#payment' ) )
        .catch( error => {
            console.error( error );
        } );

</script>

<!--<script>-->
<!--    new FroalaEditor('textarea#description_of_services')-->
<!--</script>-->