golf_backend/app/Views/users_list.php
2023-06-06 15:25:27 +05:30

77 lines
5.0 KiB
PHP

<!-- start page title -->
<div class="row">
<div class="col-12">
<div class="page-title-box page-title-box-alt">
<h4 class="page-title">Users</h4>
<div class="page-title-right">
<ol class="breadcrumb m-0">
<li class="breadcrumb-item"><a href="<?= base_url() ?>user_add">
<button type="button" class="btn btn-primary waves-effect waves-light">Add</button>
</a></li>
<!-- <li class="breadcrumb-item"><a href="javascript: void(0);">Tables</a></li>
<li class="breadcrumb-item active">Datatables</li> -->
</ol>
</div>
</div>
</div>
</div>
<!-- end page title -->
<div class="row">
<div class="col-12">
<div class="card">
<div class="card-body">
<!-- <h4 class="header-title">Buttons example</h4>
<p class="text-muted font-13 mb-4">
</p> -->
<table id="datatable-buttons" class="table table-striped dt-responsive nowrap w-100">
<thead>
<tr>
<th>Name</th>
<th>Mobile</th>
<th>Email</th>
<th>Role</th>
<!-- <th>Address</th> -->
<th>Status</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php foreach ($userList as $row)
{ ?>
<tr>
<td><?php echo $row['name'];?></td>
<td><?php echo $row['mobile'];?></td>
<td><?php echo $row['email'];?></td>
<td><?php echo $row['role'];?></td>
<!-- <td><?php echo $row['address'].",".$row['city_name'].",".$row['state_name'].",".$row['country_name']." - ".$row['pincode'].",";?></td> -->
<td><?php if($row['is_active'] == 1){ echo "Active"; }else{ echo "Deactive"; }?></td>
<td><a href="<?= base_url() ?>user_edit/<?php echo md5($row['id']);?>"><i class="mdi mdi-lead-pencil" style="font-size:18px;"></i></a>
<?php if ($row['is_active'] == 1) { ?>
<a href="<?= base_url() ?>user_deactivate/<?php echo md5($row['id']);?>"><i class="mdi mdi-account-check-outline" title="Deactivate" style="font-size:18px;"></i></a>
<?php }
else { ?>
<a href="<?= base_url() ?>user_activate/<?php echo md5($row['id']);?>"><i class="mdi mdi-account-cancel-outline" title="Activate" style="font-size:18px;"></i></a>
<?php }
?></td>
</tr>
<?php } ?>
</tbody>
</table>
</div> <!-- end card body-->
</div> <!-- end card -->
</div><!-- end col-->
</div>
<!-- end row-->