ok
Direktori : /home2/selectio/www/lilyexpresslive/software/admin/ |
Current File : /home2/selectio/www/lilyexpresslive/software/admin/api-error_log.php |
<?php require_once('header.php'); ?> <!--<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>--> <script type="text/javascript"> $(document).ready(function(){ $('#select_all').on('click',function(){ if(this.checked){ $('.checkbox').each(function(){ this.checked = true; }); }else{ $('.checkbox').each(function(){ this.checked = false; }); } }); $('.checkbox').on('click',function(){ if($('.checkbox:checked').length == $('.checkbox').length){ $('#select_all').prop('checked',true); }else{ $('#select_all').prop('checked',false); } }); $('#btnadd').click(function(){ var checkValues = $('input[name=checkboxlist]:checked').map(function() { return $(this).val(); }).get(); if(checkValues!=""){ // alert(checkValues); $.ajax({ url: 'error-log-multi-delete.php', type: 'post', data: {pod_ids:checkValues}, dataType: 'json', success:function(response){ // alert(response[0]['status']); if(response[0]['status']==1) { alert('Selected Error Log Has Been Deleted !!'); getData(); } else{ alert('Failed To Delete !!'); getData(); } } }); } else{ alert('No Value Selected'); } getData(); }); function getData(){ var from= $('#from').val(); var to= $('#to').val(); var dataTable = $('#employee-grid').DataTable( { "processing": true, "serverSide": true, "destroy":true, "order": [[0, 'desc']], "ajax":{ url :"data-tables/error-log-data-table.php", // json datasource data: {from:from,to:to}, type: "post", // method , by default get error: function(){ // error handling $(".employee-grid-error").html(""); $("#employee-grid").append('<tbody class="employee-grid-error"><tr><th colspan="3">No data found in the server</th></tr></tbody>'); $("#employee-grid_processing").css("display","none"); } } } ); } getData(); $('#get_filter').on('click', function(){ var from_date= $('#from').val(); var to= $('#to').val(); if(from_date && to){ getData(); } else { alert('Select a Date !!'); } } ); }); </script> <section class="content-header" style="background-color: white;"> <div class="row"> <div class="col-md-12" style="text-align: center;"> <h4><i class="fa fa-info-circle"></i> Api Error Log Details</h4> </div> </div> <div class="row"> <div style="padding-bottom: 25px;padding-top: 10px;"> <div class="col-md-2" style="text-align: center;"> <b>From</b> </div> <div class="col-md-2" style="text-align: center;"> <b>To</b> </div> <div class="col-md-5" style="text-align: center;"> <b>Action</b> </div> </div> <div style="padding-bottom: 25px;padding-top: 10px;"> <div class="col-md-3" style="text-align: center;"> <input type="datetime-local" class="form-control" id="from" value="<?php echo date("Y-m-d H-i-s") ?>" name="from"> </div> <div class="col-md-3" style="text-align: center;"> <input type="datetime-local" class="form-control" id="to" value="<?php echo date("Y-m-d H-i-s") ?>" name="to"> </div> <div class="col-md-5" style="text-align: left;"> <span class="btn btn-success btn-sm" id="get_filter"><i class="fa fa-filter"></i> Filter</span> </div> </div> </div> </section> <section class="content" style="background-color: white;"> <div class="row"> <div class="col-md-12"> <div class="box box-info"> <div class="box-body table-responsive"> <table id="employee-grid" class="table table-bordered table-striped"> <thead> <tr> <th width="30">SL</th> <th data-sortable="false"><i class="fa fa-check"></i><input type="checkbox" class='checkbox' id="select_all" /></th> <th>Type</th> <th>Message</th> <th>Date</th> </tr> </thead> </table> </div> </div> <?php if($clientType=="Admin"){ ?><center><button id='btnadd' class=" btn btn-danger btn-sm">Delete Error Log</button></center <?php }?> </div> </div> </section> <div class="modal fade" id="confirm-delete" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> <h4 class="modal-title" id="myModalLabel">Delete Confirmation</h4> </div> <div class="modal-body"> <p>Are you sure want to delete this item?</p> </div> <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button> <a class="btn btn-danger btn-ok">Delete</a> </div> </div> </div> </div> <?php require_once('footer.php'); ?>