File: /var/www/html/taxicamera/old/application/views/admin/log/log_list.php
<div class="main-content">
<div class="content-wrapper">
<div class="container-fluid">
<!-- Basic form layout section start -->
<section id="basic-form-layouts">
<div class="row">
<div class="col-md-12">
<div class="card">
<div class="card-header">
<div class="page-title-wrap">
<h4 class="card-title">Activity Log</h4>
</div>
</div>
<div class="card-body">
<div class="px-3">
<div id="report_list_div">
<div class="row">
<div class="table-responsive custom_table_area export_table_area">
<table class="table table-striped table-bordered export_btn_dt c_table_style notification_table log_table">
<thead>
<tr>
<th>SL No.</th>
<th>Activity</th>
<th>Description</th>
<th>Activity Done By</th>
<th>Role</th>
<th>Activity Date</th>
<th>Activity Time</th>
</tr>
</thead>
<tbody>
<?php if(!empty($log_list)): ?>
<?php foreach($log_list as $key => $list): ?>
<tr>
<td><?php echo $key+1; ?></td>
<td><a href="<?php echo base_url().$list['log_link']; ?>"><?php echo $list['log_title'];?></a></td>
<td><?php echo $list['log_description'];?></td>
<?php if($list['action_done_by'] == '0'){
$action_done_by_name = 'Admin';
$role = 'Admin';
} else{
$action_done_by_name = isset($list['action_done_by_name'])?$list['action_done_by_name']:'';
$role = isset($list['role'])?$list['role']:'';
} ?>
<td><?php echo $action_done_by_name ;?></td>
<td><?php echo $role;?></td>
<td><?php echo date('d/m/Y',strtotime($list['log_dt']));?></td>
<td><?php echo date('h:i:s A',strtotime($list['log_dt']));?></td>
</tr>
<?php endforeach; ?>
<?php else: ?>
<tr>
<td colspan="7">No data found</td>
</tr>
<?php endif; ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- // Basic form layout section end -->
</div>
</div>
</div>
<script>
$(document).ready(function() {
var now = new Date();
var date = now.getFullYear() + "-" + now.getMonth() + "-" + now.getDate();
$('.log_table').DataTable({
pageLength: 100,
dom: 'Bfrtip',
buttons: [{
extend: 'excel',
text: 'Download Excel',
className: 'btn btn-outline-primary mr-1',
filename: 'LOG_list_' + date,
exportOptions: {
columns: [0,1,2,3,4,5,6]
}
}
//'copy', 'csv', 'excel', 'pdf', 'print'
]
});
});
</script>