 <div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <div class="content-header">
      <div class="container-fluid">
        <div class="row mb-2">
          <div class="col-sm-6">
            <h1 class="m-0 text-dark">All Employee</h1>
          </div><!-- /.col -->
          <div class="col-sm-6">
            <ol class="breadcrumb float-sm-right">
              <li class="breadcrumb-item"><a href="<?php echo base_url() ?>admin/admin/dashboard">Dashboard</a></li>
              <li class="breadcrumb-item"><a href="#">Employee</a></li>
              <li class="breadcrumb-item active">All Employee</li>

            </ol>
          </div><!-- /.col -->
        </div><!-- /.row -->
      </div><!-- /.container-fluid -->
    </div>
    <!-- /.content-header -->
    <!-- Main content -->
    <section class="content">
      <div class="container-fluid">
        <div class="card card-default">
          <div class="card-header">
            <h3 class="card-title">View All Employee</h3>
            <div class="card-tools">
              <a href="<?php echo base_url()?>/admin/employee/add_new_employee" class="btn btn-success btn-sm"><i class="fa fa-plus" aria-hidden="true"></i> Add Employee</a>
            </div>
          </div>
            <!-- /.card-header -->
            <div class="card-body">
              <table id="example1" class="table table-bordered table-striped">
                <thead>
                <tr>
                  <th>Employee ID</th>
                  <th>Employee Photo</th>
                  <th>Employee Name</th>
                  <th>Details</th>
                  <th>Role</th>
                  <th>Address</th>
                  <th></th>
                </tr>
                </thead>
                <tbody>
                <?php $i=1; foreach ($all_employee as $employee):?>
                <tr>
                  <td><?php echo $i ?></td>
                  <td><img src="<?php echo base_url(); ?><?php echo $employee->user_photo ?>" width="70px"></td>
                  <td><?php echo $employee->user_name ?></td>
                  <td>
                    Mob. : <b><?php echo $employee->user_mobile ?></b>
                    <br/>
                    Email : <b><?php echo $employee->user_email ?></b>
                    <br/>
                    Joining Date : <b><?php echo date('d-m-Y', strtotime($employee->user_created_at)); ?></b>
                    <br/>
                    Payment Type : 
                    <b>
                      <?php if($employee->employee_pay_type == 1): ?>
                        Incentive Basis (<?php echo $employee->employee_pay_value; ?> %)
                      <?php elseif($employee->employee_pay_type == 2): ?>
                        Hourly Basis (Rs. <?php echo $employee->employee_pay_value; ?>)
                      <?php else: ?>
                        Monthly Basis (Rs. <?php echo $employee->employee_pay_value; ?>)
                      <?php endif;?>
                    </b>
                    <br/>
                    Online : 
                    <?php if($employee->user_is_online == 0):?>
                      <span class="badge badge-danger">No</span>
                    <?php else:?>
                      <span class="badge badge-success">Yes</span>
                    <?php endif;?>
                  </td>
                  <td><?php echo $employee->user_role ?></td>
                  <td><?php echo $employee->user_village ?>, <?php echo $employee->user_taluka ?>, <?php echo $employee->user_dist ?>, <?php echo $employee->user_state ?> - <?php echo $employee->user_pin_code ?></td>
                  <td>
                    <div class="input-group mb-3">
                      <div class="input-group-prepend">
                        <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
                        Action
                        </button>
                        <div class="dropdown-menu">
                          <a class="dropdown-item" onclick="return confirm('Are you sure?')" href="<?php echo base_url(); ?>/admin/admin/login/<?php echo $employee->user_id ?>"><i class="fas fa-sign-in-alt"></i>&nbsp;&nbsp;Login</a>
                          <div class="dropdown-divider"></div>
                          <a class="dropdown-item" href="<?php echo base_url(); ?>/admin/employee/edit_employee/<?php echo $employee->user_id ?>"><i class="fas fa-edit"></i>&nbsp;&nbsp;Edit</a>
                          <div class="dropdown-divider"></div>
                          <a class="dropdown-item" onclick="return confirm('Are you sure?')" href="<?php echo base_url(); ?>/admin/employee/delete_employee/<?php echo $employee->user_id ?>"><i class="fas fa-trash"></i>&nbsp;&nbsp;Delete</a>
                        </div>
                      </div>
                    </div>
                  </td>
                </tr>
                <?php $i++; ?>
                <?php endforeach; ?>
                </tbody>
              </table>
            </div>
          </div>
      </div><!--/. container-fluid -->
    </section>
    <!-- /.content -->
  </div>
