123 lines
3.2 KiB
PHP
123 lines
3.2 KiB
PHP
<?php include "db.php"; ?>
|
|
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>Manage Records</title>
|
|
|
|
|
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
|
|
|
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap-icons/font/bootstrap-icons.css" rel="stylesheet">
|
|
<link rel="stylesheet" href="manage_records.css">
|
|
<script src="https://code.jquery.com/jquery-3.7.1.min.js"></script>
|
|
|
|
</head>
|
|
<body class="p-4">
|
|
|
|
<div class="container">
|
|
|
|
<div class="d-flex justify-content-between align-items-center mb-4">
|
|
|
|
<!-- LEFT SIDE -->
|
|
<div class="d-flex align-items-center gap-3">
|
|
<h3 class="mb-0">All Records</h3>
|
|
|
|
<select id="statusFilter" class="form-select form-select-sm status-filter" style="width:150px;">
|
|
<option value="">All Status</option>
|
|
<option value="active">Active</option>
|
|
<option value="inactive">Inactive</option>
|
|
<option value="trash">Trash</option>
|
|
|
|
</select>
|
|
|
|
<!-- GLOBAL SEARCH -->
|
|
<input type="text" id="searchInput" class="form-control form-control-sm"
|
|
placeholder="Search anything..." style="width:220px;">
|
|
</div>
|
|
|
|
<!-- RIGHT SIDE -->
|
|
|
|
|
|
<div class="d-flex gap-2">
|
|
<button id="bulkToggle" class="btn btn-secondary">
|
|
<i class="bi bi-check2-square"></i> Bulk Select
|
|
</button>
|
|
<a href="index.php" class="btn btn-dark">
|
|
<i class="bi bi-house"></i> Home
|
|
</a>
|
|
|
|
<a href="record.php" class="btn btn-primary">
|
|
<i class="bi bi-plus-circle"></i> Add Record
|
|
</a>
|
|
|
|
<button id="bulkDelete" class="btn btn-danger">
|
|
<i class="bi bi-trash"></i> Delete Selected
|
|
</button>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<table class="table table-bordered align-middle">
|
|
<thead class="table-dark">
|
|
<tr>
|
|
<th class="select-column d-none"><input type="checkbox" id="checkAll"></th>
|
|
<th class="sort" data-column="id">
|
|
ID <i class="sort-icon bi bi-arrow-down-up"></i>
|
|
</th>
|
|
|
|
<th class="sort" data-column="name">
|
|
Name <i class="sort-icon bi bi-arrow-down-up"></i>
|
|
</th>
|
|
|
|
<th class="sort" data-column="email">
|
|
Email <i class="sort-icon bi bi-arrow-down-up"></i>
|
|
</th>
|
|
|
|
<th>Phone</th>
|
|
|
|
<th class="sort" data-column="status">
|
|
Status <i class="sort-icon bi bi-arrow-down-up"></i>
|
|
</th>
|
|
|
|
<th>Action</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody id="table-data">
|
|
</tbody>
|
|
|
|
</table>
|
|
<div id="pagination-area" class="mt-3"></div>
|
|
</div>
|
|
|
|
<!-- EDIT MODAL -->
|
|
<div class="modal fade" id="editModal">
|
|
<div class="modal-dialog">
|
|
<div class="modal-content" id="editContent"></div>
|
|
</div>
|
|
</div>
|
|
|
|
<script src="ajax.js?v=<?php echo time(); ?>"></script>
|
|
|
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
|
|
|
|
<!-- TOAST NOTIFICATION -->
|
|
<div class="position-fixed bottom-0 end-0 p-3" style="z-index:9999">
|
|
<div id="liveToast" class="toast align-items-center text-bg-success border-0" role="alert">
|
|
<div class="d-flex">
|
|
<div class="toast-body" id="toastMsg">
|
|
Data restored successfully
|
|
</div>
|
|
<button type="button" class="btn-close btn-close-white me-2 m-auto" data-bs-dismiss="toast"></button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
</body>
|
|
</html>
|