        <div class="page-body">
          <div class="container-fluid">
            <div class="page-title">
              <div class="row">
                <div class="col-6">
                  <h3>Logs</h3>
              </div>
            </div>
          </div>
          <!-- Container-fluid starts-->
          <div class="container-fluid">
            <div class="row">
              <div class="col-sm-12">
                <div class="card">
                  <div class="card-header">
                  <div class="row">
                  <div class="col-sm-6">
                    <h5>Logs</h5>
                  </div>
                  <div class="col-sm-6 text-right">
                    <!-- <button id="delete_all" class="btn btn-danger btn-rounded"><i class="fa fa-trash"></i> Delete Selected</button> -->
                   </div>
                 </div>
                  </div>
                  <div class="card-body">
                    <div class="table-responsive" id="tb">
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
          <!-- Container-fluid Ends-->
        </div>
        </div>

<script>
$(document).ready(function(){  
$("#tb").html('<div class="text-center"><img src="loader.gif"></div>')
  $.ajax({
      url: "<?= base_url('admin/viewLogs'); ?>",
      method: "POST",
      data: '',
      success:function(res){
          $('#tb').html(res);
      }
  });
});
function deleteLog(id)
{
  if (confirm('Are you sure?') == true) {
    $.ajax({
        url: "<?= base_url('admin/deleteLogs'); ?>",
        method: "POST",
        data: {
            id:id
        },
        success:function(res){
          $('#tb').html(res);
        }
    });
  }
};
$('#delete_all').click(function(){
    var checkbox = $('.delete_checkbox:checked');
    var table = 'logs';
        if(checkbox.length > 0)
        {
          if (confirm('Are you sure?') == true) {
            var checkbox_value = [];
            $(checkbox).each(function(){
                checkbox_value.push($(this).val());
            });
            $.ajax({
                url:"<?= base_url('dashboard/multipleDel'); ?>",
                method:"POST",
                data:{checkbox_value:checkbox_value,table:table},
                success:function(res)
                {
                  $('.removeRow').fadeOut(1500);
                }
            })
          }
        }
        else
        {
        alert('Select atleast one record');
        }
})
</script>