71 lines
3.6 KiB
PHP
71 lines
3.6 KiB
PHP
<div class="row">
|
|
<div class="col-12">
|
|
<div class="card">
|
|
<div class="card-body">
|
|
<!-- <div class="float-right">
|
|
<a href="<?= base_url() . "new_scheme/0" ?>" class="btn btn-primary"><i class="ri-currency-line"></i> Add Scheme </a>
|
|
</div>--><!-- end col -->
|
|
<br>
|
|
<h4 class="header-title mb-3"><?= $page_name; ?></h4>
|
|
<?php if (session()->getFlashdata('success') || session()->getFlashdata('error')) : ?>
|
|
<?php if (session()->getFlashdata('success')) : ?>
|
|
<div class="alert alert-success alert-dismissible fade show" role="alert">
|
|
<?= session('success') ?>
|
|
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
|
|
<span aria-hidden="true">×</span>
|
|
</button>
|
|
</div>
|
|
<?php endif; ?>
|
|
<?php if (session()->getFlashdata('error')) : ?>
|
|
<div class="alert alert-danger alert-dismissible fade show" role="alert">
|
|
<?= session('error') ?>
|
|
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
|
|
<span aria-hidden="true">×</span>
|
|
</button>
|
|
</div>
|
|
<?php endif; ?>
|
|
<?php endif; ?>
|
|
<div class="table-responsive">
|
|
<!-- <table id="datatable-buttons" class="table dt-responsive w-100"> -->
|
|
<table id="scroll-horizontal-datatable_scheme" class="table w-100 nowrap">
|
|
<thead class="thead-light">
|
|
<tr>
|
|
<th hidden></th>
|
|
<th>Scheme Name</th>
|
|
<th>Price</th>
|
|
<th>Duration</th>
|
|
<th hidden>Category</th>
|
|
<th>Action</th>
|
|
</tr>
|
|
</thead>
|
|
<?php foreach ($scheme as $row) : ?>
|
|
<tr>
|
|
<td hidden><?= $row['book_id']; ?></td>
|
|
<td><?= $row['title']; ?></td>
|
|
<td><?= $row['price']; ?></td>
|
|
<td><?= $row['duration']; ?></td>
|
|
<td hidden><?= $row['category_name']; ?></td>
|
|
<td>
|
|
<a href="<?= base_url() . "new_scheme/" . $row['book_id']; ?>" class="edit-button"><i class="ri-pencil-line"></i></a>
|
|
<!-- <a href="<?= base_url() . "delete_scheme/" . $row['book_id']; ?>" class="delete-button"><i class="ri-delete-bin-line"></i></a> -->
|
|
</td>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div> <!-- end card body-->
|
|
</div> <!-- end card -->
|
|
</div><!-- end col-->
|
|
</div><!-- end row-->
|
|
<script>
|
|
$(document).ready(function() {
|
|
$('#scroll-horizontal-datatable_scheme').DataTable({
|
|
"order": [
|
|
[0, "desc"]
|
|
] // 4 is the column index of "created_on" in your table
|
|
// Other DataTables configuration options
|
|
});
|
|
});
|
|
</script>
|