119 lines
5.7 KiB
PHP
119 lines
5.7 KiB
PHP
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
|
|
<meta name="description" content="" />
|
|
<meta name="author" content="" />
|
|
<title>List User</title>
|
|
<!-- Favicon-->
|
|
<link rel="icon" type="image/x-icon" href="assets/favicon.ico" />
|
|
<!-- Core theme CSS (includes Bootstrap)-->
|
|
<link href=<?php echo base_url()."css/styles.css"?> rel="stylesheet" />
|
|
</head>
|
|
<style>
|
|
table {
|
|
font-family: arial, sans-serif;
|
|
border-collapse: collapse;
|
|
width: 100%;
|
|
}
|
|
|
|
td, th {
|
|
border: 1px solid #dddddd;
|
|
text-align: left;
|
|
padding: 8px;
|
|
}
|
|
|
|
tr:nth-child(even) {
|
|
background-color: #dddddd;
|
|
}
|
|
</style>
|
|
<body>
|
|
<div class="d-flex" id="wrapper">
|
|
<!-- Sidebar-->
|
|
<div class="border-end bg-white" id="sidebar-wrapper">
|
|
<div class="sidebar-heading border-bottom bg-light">Start Bootstrap</div>
|
|
<div class="list-group list-group-flush">
|
|
<a class="list-group-item list-group-item-action list-group-item-light p-3" href="#!">Dashboard</a>
|
|
<a class="list-group-item list-group-item-action list-group-item-light p-3" href="#!">Shortcuts</a>
|
|
<a class="list-group-item list-group-item-action list-group-item-light p-3" href="#!">Overview</a>
|
|
<a class="list-group-item list-group-item-action list-group-item-light p-3" href="#!">Events</a>
|
|
<a class="list-group-item list-group-item-action list-group-item-light p-3" href="#!">Profile</a>
|
|
<a class="list-group-item list-group-item-action list-group-item-light p-3" href="#!">Status</a>
|
|
</div>
|
|
</div>
|
|
<!-- Page content wrapper-->
|
|
<div id="page-content-wrapper">
|
|
<!-- Top navigation-->
|
|
<nav class="navbar navbar-expand-lg navbar-light bg-light border-bottom">
|
|
<div class="container-fluid">
|
|
<button class="btn btn-primary" id="sidebarToggle">Toggle Menu</button>
|
|
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation"><span class="navbar-toggler-icon"></span></button>
|
|
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
|
<ul class="navbar-nav ms-auto mt-2 mt-lg-0">
|
|
<li class="nav-item active"><a class="nav-link" href="#!">Home</a></li>
|
|
<li class="nav-item"><a class="nav-link" href="#!">Link</a></li>
|
|
<li class="nav-item dropdown">
|
|
<a class="nav-link dropdown-toggle" id="navbarDropdown" href="#" role="button" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Dropdown</a>
|
|
<div class="dropdown-menu dropdown-menu-end" aria-labelledby="navbarDropdown">
|
|
<a class="dropdown-item" href="#!">Action</a>
|
|
<a class="dropdown-item" href="#!">Another action</a>
|
|
<div class="dropdown-divider"></div>
|
|
<a class="dropdown-item" href="#!">Something else here</a>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
<!-- Page content-->
|
|
<div class="container-fluid">
|
|
<h1 class="mt-4">List User</h1>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>ID</th>
|
|
<th>Username</th>
|
|
<th>First Name</th>
|
|
<th>Last Name</th>
|
|
<th>Email</th>
|
|
<th>Mobile Number</th>
|
|
<th>Active</th>
|
|
<th>Updated By</th>
|
|
<th>Created By</th>
|
|
<th>Created At</th>
|
|
<th>Updated At</th>
|
|
<th>Action</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<!-- Loop through users and display each row -->
|
|
<?php
|
|
// print_r($users);die();
|
|
foreach ($users as $user): ?>
|
|
<tr>
|
|
<td><?= $user['id']; ?></td>
|
|
<td><?= $user['username']; ?></td>
|
|
<td><?= $user['firstname']; ?></td>
|
|
<td><?= $user['lastname']; ?></td>
|
|
<td><?= $user['email']; ?></td>
|
|
<td><?= $user['mobile_no']; ?></td>
|
|
<td><?= $user['is_active'] ? 'Yes' : 'No'; ?></td>
|
|
<td><?= $user['updated_by_name']; ?></td>
|
|
<td><?= $user['created_by_name']; ?></td>
|
|
<td><?= change_date_format($user['created_at'],'Y-m-d H:i:s','D,M d,Y h:i a'); ?></td>
|
|
<td><?= change_date_format($user['updated_at'],'Y-m-d H:i:s','D,M d,Y h:i a'); ?></td>
|
|
<td><a href=<?php echo base_url().'user/list/'.$user['id']?>>Edit</a> | <a href=<?php echo base_url().'user/delete/'.$user['id']?>>Delete</a></td>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<script src=<?php echo base_url()."js/bootstrap.bundle.min.js"?>> </script>
|
|
<!-- Core theme JS-->
|
|
<script src=<?php echo base_url()."js/scripts.js"?>></script>
|
|
</body>
|
|
</html>
|