the_mechanic/app/Views/user_list_super_admin.php
2024-09-25 09:12:05 +05:30

59 lines
2.9 KiB
PHP
Executable File

<?php include('layout/header.php'); ?>
<div class="container-fluid">
<div class="row">
<div class="col-12">
<div class="page-title-box page-title-box-alt">
<h4 class="page-title">User List</h4>
<div class="page-title-right">
<ol class="breadcrumb m-0">
<li class="">
<a href="<?= base_url() . "new_user_super_admin/".$branch_id; ?>" class="btn btn-primary waves-effect" > <i class="ri-add-line"></i></a>
</li>
</ol>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-12">
<div class="card">
<div class="card-body">
<table id="datatable-buttons" class="table dt-responsive nowrap w-100">
<thead>
<tr>
<th>#</th>
<th>Name</th>
<th>email</th>
<th>Mobile</th>
<th>Role</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php foreach ($users as $value) :
if ($value['isactive'] == 1) : ?>
<tr>
<td><?= $value['user_id']; ?></td>
<td><?= $value['name']; ?></td>
<td><?= $value['email']; ?></td>
<td><?= $value['mobile_no']; ?></td>
<td><?= $roleModel->getRoleNameById($value['role']); ?></td> <!-- Call the model method -->
<td>
<a href="<?= base_url("edit_user_super_admin/" . $value['user_id']) ?>" class="edit-button"><i class="ri-pencil-line" style="font-size:20px;"></i></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a href="<?= "delete_user/" . $value['user_id']; ?>" class="delete-button"><i class="ri-delete-bin-line" style="font-size:20px;"></i></a>
</td>
<?php endif?>
<?php endforeach; ?>
</tr>
</tbody>
</table>
</div> <!-- end table-responsive-->
</div>
</div> <!-- end card -->
</div> <!-- end col -->
<?php include('layout/footer.php'); ?>
</div>