
   <div class="page-content" >


                        <div class="row">
                         <?php
                                $message = $this->session->userdata('message');
                                if (!empty($message)) {
                                    ?>
                                    <div class="alert alert-block alert-success">
                                        <h6 class="lighter arial green" style="text-align:center;"><b>
                                                <?php echo $message;
                                                $this->session->unset_userdata('message');
                                                ?>
                                            </b></h6>
                                    </div>
                                    <?php
                                }
                                $errormessage = $this->session->userdata('errormessage');
                                if (!empty($errormessage)) {
                                    ?>
                                    <div class="alert alert-block alert-danger">
                                        <h6 class="lighter arial red" style="text-align:center;"><b>
                                                <?php echo $errormessage;
                                                $this->session->unset_userdata('errormessage');
                                                ?>
                                            </b></h6>
                                    </div>
                                    <?php
                                }
                                ?>

                    <?php if(!empty($allEmployee)){?>
                            <div class="col-xs-12">
                                <!-- PAGE CONTENT BEGINS -->
              <?php $adminLebel=$this->session->userdata('admin_level');?>



                                <div class="row">
                                    <div class="col-xs-12">


                                        <div class="clearfix">
                                            <div class="pull-right tableTools-container"></div>
                                        </div>
                                        <div class="table-header" style="text-align:center;">
                                            <?php if(isset($inactive)){?>
                                                In-Active Employee List
                                            <?php }else{?>
                                                Active Employee List
                                            <?php }?>
                                        </div>

                                        <!-- div.table-responsive -->

                                        <!-- div.dataTables_borderWrap -->
                                        <div>
                                            <table id="dynamic-table" class="table table-striped table-bordered table-hover">
                                                <thead>
                                                    <tr style="color:red;">

                                                        <th style="color:red;">Serial</th>
                                                        <th>EmployeeId & Name</th>
                                                        <th>Mobile</th>

                                                        <th>
                                                            Email
                                                        </th>

                                                        <th >Photo</th>
                                                        <th>
                                                            EmployeeAccess
                                                        </th>
                                                        <th>Action</th>

                                                    </tr>
                                                </thead>

                                                <tbody>

                <?php
                $i=0;
                foreach($allEmployee as $value){?>

                                                    <tr>


                                                        <td>
                                                            <?php echo ++$i;?>
                                                        </td>
                                        <td style="color:red;">Id :&nbsp;&nbsp;<?php echo $value['userId'];?><br/> Name:&nbsp;&nbsp;<a
                                                    href="<?php echo admin_url()?>/employeesetup/view_profile/<?php echo $value['userId'];?> "> <?php echo $value['userName'];?></a>
                                                    <!--<br>Leave (2020) - CL:00, ML:00 &nbsp; &nbsp; <a href="<?php // echo admin_url()?>/employeesetup/leaves/<?php // echo $value['userId'];?>"><i class="ace-icon fa fa-eye-slash bigger-130"></i> Leaves </a>-->
                                                    
                                                        </td>
                                                        <td ><?php echo $value['mobile'];?></td>
                                                        <td><?php  echo $value['email'];?></td>
                                                        </td>
                                            <td >
                                            <?php if(!empty($value['photo'])){?>
        <img  src="<?php if(file_exists($value['photo'])){ echo base_url().$value['photo'];}else{ echo base_url()."uploadimage/customerImage/logo1.png"; }?> " width="50">
                            <?php }?>
                                            </td>
                                            <td>
                                            <?php  foreach(getUserType() as $key=>$val){if($value['userType']==$key){echo $val;}}?>
                                            </td>

                                                        <td>
                                                            <div class="hidden-sm hidden-xs action-buttons">

                                                                <?php if($adminLebel==1){?>
                                                                <a class="green" href="<?php echo admin_url()?>/employeesetup/edit_employee/<?php echo $value['userId'];?> ">
                                                                    <i class="ace-icon fa fa-pencil bigger-130"></i>
                                                                </a>

                                                                <a class="red" href="<?php echo admin_url()?>/employeesetup/delete_employee/<?php echo $value['userId'];?> " onclick="return ConfirmDelete()">
                                                                    <i class="ace-icon fa fa-trash-o bigger-130"></i>
                                                                </a>
                                                                
                                                                <?php }?>
                                                                <a class="red" href="<?php echo admin_url()?>/employeesetup/view_profile/<?php echo $value['userId'];?> ">
                                                                    <i class="ace-icon fa fa-user  bigger-130"></i>
                                                                </a>
                                                                <br>
                                                                <?php if(isset($inactive)){?>
                                                                    <a class="green" href="<?php echo admin_url()?>/employeesetup/activeUser/<?php echo $value['userId'];?> ">
                                                                        Make Active
                                                                    </a>
                                                                <?php }?>
                                                            </div>

                                                        </td>
                                                    </tr>

                   <?php }?>


                                                </tbody>
                                            </table>
                                        </div>
                                    </div>
                                </div>


                                </div><!-- PAGE CONTENT ENDS -->
                                <?php }?>
                            </div><!-- /.col -->
                        </div><!-- /.row -->
