JezK
Edit File: mywarehouse.php
<?php include_once("./app/checkSession.php"); if(empty($_SESSION['user_id'])&& $_SESSION['user_id']=='') { header("Location: ../owner_login.php"); } include("header.php"); ?> <style> .previous{ border-radius: 7px !important; background-color: #3663c8 !important; border-color: #3663c8 !important; font-weight: bold; color:white !important ; } .next{ border-radius: 7px !important; background-color: #3663c8 !important; border-color: #3663c8 !important; font-weight: bold; color:white !important ; } </style> <div class="container"> <div class="container mt-3 px-md-4 px-0"> <div class="row px-2"> <div class="col-md-6 col-lg-4 px-4"> <h5><?php echo $lang['MY_WAREHOUSE'] ?></h5> </div> <div class="col-md-4"> </div> <div class="col-md-4"> <!-- <div class="input-group search-button mb-2" style="margin-right:10px;"> <input class="form-control border-right-0 border align-self-right border-rad-left" type="text" value="" id="myInput"> <span class="input-group-append"> <button class="btn btn-outline-secondary border-left-0 border border-rad-right" type="button"> <i class="fa fa-search"></i> </button> </span> --> </div> </div> </div> </div> <div class="container "> <div class="table-responsive p-md-4 p-0 myquotation-table"> <table id="example" class="display bg-white tbl-border table-borderless nowrap mywarehouseTable"> <thead> <tr> <th style="width:190px;"><?php echo $lang['WAREHOUSE_NUMBER'] ?></th> <th style="width:190px;"><?php echo $lang['WAREHOUSE_NAME'] ?></th> <!-- <th>Country</th> --> <th style="width:170px;"><?php echo $lang['CITY'] ?></th> <th style="width:170px;"><?php echo $lang['STATUS'] ?></th> <th style="width:170px;"><?php echo $lang['ACTION'] ?></th> </tr> </thead> <tbody> </tbody> </table> </div> </div> <div class="container position-relative"> <div class="row export_csv"> <div class="col-md-3 offset-md-6 button-alignment"> <a href="export_warehouse.php?type=-1" id="export" class="btn btn-primary mobile-alignment"><i class="fa fa-download"></i><span class="pl-2"><?php echo $lang['EXPORT.XLSX'] ?></span></a> </div> </div> </div> </div> <!-- footer --> <?php include("footer.php"); ?> <!-- <script src="js/jquery.min.js"></script> --> <!-- <script src="js/jquery.pagination.min.js"></script> --> <!----> <style type="text/css"> /* #example tr.active td{ background-color: #ffd5d5; } */ </style> <script> jQuery(document).ready(function() { // alert('hello') jQuery('#example').DataTable( { "processing": true, "dataSrc": "", "dom": 'Bfrtip', "dom": 'Rlfrtlip', language: { search: '', searchPlaceholder: "<?php echo $lang['SEARCH'] ?>", paginate: {previous: '<?php echo $lang['PREV'] ?>',next: '<?php echo $lang['NEXT'] ?>'}}, "pagingType": "full_numbers", "bProcessing": true, "bServerSide": true, "sAjaxSource": "app/mywarehouse-ajax.php", "ordering": false, "fnDrawCallback": function( oSettings ) { rowCount=oSettings.json.iTotalRecords; if(rowCount<1){ $("#export").addClass("d-none") } }, "aoColumns": [ { mData: 'warehouse_number' } , { mData: 'warehouse_name' }, // { // mData: 'country_name' // }, { mData: 'warehouse_city' }, { mData: 'warehouse_status' }, { mData: 'action' } ] } ); } ); $(document).ready(function() { jQuery('#example2').DataTable( { dom: 'Bfrtip', language: { search: '', searchPlaceholder: "Search", paginate: {previous: 'Prev',next: 'Next'} , paginate: {previous: 'Prev',next: 'Next'}}, buttons: [ { extend: 'excel', text: '<i class="fa fa-file-text-o"></i>Export to csv', } ] } ); } ); </script> <style> #export { margin-bottom:-35px; } div#example_length { display: none; } </style> <script src="https://code.jquery.com/jquery-3.5.1.js" type="text/javascript"></script> <script src="https://cdn.datatables.net/1.10.22/js/jquery.dataTables.min.js" type="text/javascript"></script> <script src="https://cdn.datatables.net/buttons/1.6.5/js/dataTables.buttons.min.js" type="text/javascript"></script> <script src="https://cdn.datatables.net/buttons/1.6.5/js/buttons.flash.min.js" type="text/javascript"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js" type="text/javascript"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/pdfmake.min.js" type="text/javascript"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/vfs_fonts.js" type="text/javascript"></script> <script src="https://cdn.datatables.net/buttons/1.6.5/js/buttons.html5.min.js" type="text/javascript"></script> <script src="https://cdn.datatables.net/buttons/1.6.5/js/buttons.print.min.js" type="text/javascript"></script> <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.22/css/jquery.dataTables.min.css"> <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/buttons/1.6.5/css/buttons.dataTables.min.css">