File: //var/www/html/qcr24/app/application/views/admin/driver/list.php
<main class="main users job-role-page" id="">
<div class="container">
<?php if ($this->session->flashdata('success_msg')) : ?>
<div class="alert alert-success">
<a href="" class="close" data-dismiss="alert" aria-label="close" title="close" style="position: absolute;right: 15px;font-size: 30px;color: red;top: 5px;">×</a>
<?php echo $this->session->flashdata('success_msg') ?>
</div>
<?php endif ?>
<?php if ($this->session->flashdata('error_msg')) : ?>
<div class="alert alert-danger">
<a href="" class="close" data-dismiss="alert" aria-label="close" title="close" style="position: absolute;right: 15px;font-size: 30px;color: red;top: 5px;">×</a>
<?php echo $this->session->flashdata('error_msg') ?>
</div>
<?php endif ?>
<!-- <h2 class="main-title">Job Role</h2> -->
<div class="row justify-content-between">
<div class="col-auto">
<h2 class="app-page-title mrg15B">List of Drivers / Customers</h2>
</div>
</div>
<div class="row">
<div class="col-lg-12">
<div class="users-table table-wrapper">
<table class="table" id="example">
<thead>
<tr class="users-table-info">
<th>
ID
</th>
<th>Driver / Customer Name
</th>
<th>
E-mail ID
</th>
<th>Password </th>
<th>Mobile </th>
<th>Full Address</th>
<th>Date of Birth</th>
<th>Driver License No. </th>
<th>Driver Expire </th>
<th>Status</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php if(!empty($drivers)){
$i=0;
foreach($drivers as $row){$i++;
?>
<tr>
<td><?=$i?></td>
<td><?=$row['first_name'].(!empty($row['middle_name'])?' '.$row['middle_name']:'').' '.$row['last_name']?></td>
<td><?=$row['email']?></td>
<td><?=$row['orginal_password']?></td>
<td><?=$row['mobile']?></td>
<td><?=(($row['flat_no'])?$row['flat_no'].',':'').(($row['street_no'])?$row['street_no'].',':'').(($row['street_name'])?$row['street_name'].',':'').(($row['suburb'])?$row['suburb'].',':'').(($row['pin'])?$row['pin']:'')?></td>
<td><?=($row['dob'])?date('d/m/Y',strtotime($row['dob'])):''?></td>
<td><?=$row['licence_no']?></td>
<td><?=($row['licence_expiry'])?date('d/m/Y',strtotime($row['licence_expiry'])):''?></td>
<td><span class="<?=(($row['status'] == 0)?'badge-pending':(($row['status'] == 1)?'badge-success':(($row['status'] == 2)?'badge-warning':(($row['status'] == 3)?'badge-info':'badge-danger'))))?>"><?=(($row['status'] == 0)?'Approval Pending':(($row['status'] == 1)?'Active':(($row['status'] == 2)?'Inactive':(($row['status'] == 3)?'Deleted':'Rejected'))))?></span></td>
<td>
<span class="p-relative">
<button class="dropdown-btn transparent-btn" type="button" title="More info">
<div class="sr-only">More info</div>
<i data-feather="more-horizontal" aria-hidden="true"></i>
</button>
<ul class="users-item-dropdown dropdown">
<?php if($row['status'] == 0){ ?>
<li>
<?php
if(check_user_permission($menu_id, 'edit_flag')){
?>
<a href="<?=base_url('admin/driver/validatedriver/'.$row['driver_id'])?>">Validate Driver</a>
<?php
}
?>
</li>
<?php } ?>
<li>
<?php
if(check_user_permission($menu_id, 'edit_flag') && (in_array($row['status'],array('1','2')))){
?>
<a href="<?=base_url('admin/driver/editdriver/'.$row['driver_id'])?>">Edit</a>
<?php
}
?>
</li>
<li>
<?php
if(check_user_permission($menu_id, 'edit_flag')){
?>
<a href="<?=base_url('admin/driver/viewdriver/'.$row['driver_id'])?>">View</a>
<?php
}
?>
</li>
</ul>
</span>
</td>
</tr>
<?php }
} ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</main>