118 lines
6.3 KiB
PHP
118 lines
6.3 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">Members</h4>
|
||
<div class="page-title-right">
|
||
<ol class="breadcrumb m-0">
|
||
<li class="breadcrumb-item"><a href="<?= base_url() ?>member_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>Status</th>
|
||
<th>Action</th>
|
||
</tr>
|
||
</thead>
|
||
|
||
|
||
<tbody>
|
||
<?php foreach ($Membersdata as $row)
|
||
{ ?>
|
||
<tr>
|
||
<td><?php echo $row['name'];?></td>
|
||
<td><?php echo $row['mobile'];?></td>
|
||
<td><?php echo $row['email'];?></td>
|
||
<td><?php if($row['is_active'] == 1){ echo "Active"; }else{ echo "Deactive"; }?></td>
|
||
<td><a href="<?= base_url() ?>member_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() ?>member_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() ?>member_activate/<?php echo md5($row['id']);?>"><i class="mdi mdi-account-cancel-outline" title="Activate" style="font-size:18px;"></i></a>
|
||
<?php } ?>
|
||
|
||
<i class="mdi mdi-eye-outline credit_usage" id="<?php echo md5($row['id']);?>" style="font-size:18px;" title="Transactions"></i>
|
||
</td>
|
||
|
||
|
||
</tr>
|
||
<?php } ?>
|
||
|
||
</tbody>
|
||
</table>
|
||
|
||
</div> <!-- end card body-->
|
||
</div> <!-- end card -->
|
||
</div><!-- end col-->
|
||
</div>
|
||
<!-- end row-->
|
||
|
||
<!-- Modal content for the Large example -->
|
||
<div class="modal fade" id="bs-example-modal-lg" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true">
|
||
<div class="modal-dialog modal-lg">
|
||
<div class="modal-content">
|
||
<div class="modal-header">
|
||
<h4 class="modal-title" id="myLargeModalLabel">Transaction Details</h4>
|
||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||
</div>
|
||
<div class="modal-body" id="model-table">
|
||
|
||
|
||
</div>
|
||
</div>
|
||
</div><!-- /.modal-content -->
|
||
</div><!-- /.modal-dialog -->
|
||
</div><!-- /.modal -->
|
||
|
||
|
||
|
||
|
||
<script>
|
||
$(document).on('click','.credit_usage',function(){
|
||
|
||
var member_id = $(this).closest('i').attr('id');
|
||
$.ajax({
|
||
url:"<?= base_url(); ?>/transactions_list/"+member_id,
|
||
method: 'GET',
|
||
success: function(response) {
|
||
|
||
$('#model-table').html(response);
|
||
$('#bs-example-modal-lg').modal('show');
|
||
},
|
||
error: function(xhr, status, error) {
|
||
// Handle the error here
|
||
console.error(error);
|
||
}
|
||
});
|
||
});
|
||
</script>
|
||
|
||
|
||
|
||
|