JezK
Edit File: pending_warehouse.php
<?php include_once("app/checkSession.php"); include("header.php"); $activeCount=$pendingCount=$rejectedCount=0; $id=$res=$val=$activewarehouses=$countryData=''; $activewarehouseList = array(); $countryList=$wareHouseAdminObj->getCountryList(); $warehouseDetails=$wareHouseAdminObj->fetchLoginAdminwarehousesPending($_SESSION['user_id']); ?> <div class="container"> <div class="row ml-4"> <a href="dashboard.php"> <img src="images/back_main.png" class="pl-3"></a> <div class="container first-position pl-0"> <div class="container mt-3 position-2"> <div class="row"> <div class="col-md-6 col-lg-4 col-sm-12 mt-3 "> <h5><?php echo $lang['PENDING_WAREHOUSES'];?></h5> </div> </div> </div> <div class="container pl-0"> <div class="table-responsive p-md-3 p-0 myquotation-table"> <table id="example" class="display bg-white tbl-border table-borderless pendingwarehouseTable" style="width:100%"> <thead> <tr> <th><?php echo $lang['SNO'];?></th> <th><?php echo $lang['WAREHOUSE_NUMBER'];?></th> <th><?php echo $lang['WAREHOUSE_NAME'];?></th> <th><?php echo $lang['WAREHOUSE_ID'];?></th> <th><?php echo $lang['COUNTRY'];?></th> <th><?php echo $lang['STATUS'];?></th> <th><?php echo $lang['ACTION'];?></th> </tr> </thead> <tbody> <?php $i=1; foreach($warehouseDetails as $activewarehouses) { ?> <tr> <td><?php echo $i++; ?></td> <td><?php if(isset($activewarehouses['warehouse_number']))echo $activewarehouses['warehouse_number'] ?></td> <td><?php if(isset($activewarehouses['warehouse_name']))echo $activewarehouses['warehouse_name'] ?></td> <td><?php if(isset($activewarehouses['warehouse_id']))echo $activewarehouses['warehouse_id'] ?></td><td> <?php if(isset($countryList) && count($countryList)>0) { foreach($countryList as $res) { $selected=''; if($res['country_id']==$activewarehouses['warehouse_country_id']) { $selected=$res['display_name']; if(isset($activewarehouses['warehouse_country_id'])) echo $selected; // echo $countryData; } } } ?></td> <td><?php if(isset($activewarehouses['warehouse_status'])){ if($id==0){echo '<span style="color:orange"> Pending </span>';}else if($id==1){echo '<span style="color:green"> Active </span>'; }}if($id==2){echo '<span style="color:red"> Rejected </span>'; }?></td> <td><a href="view-warehouse.php?wid=<?php echo $activewarehouses['warehouse_id'] ?>"> <i class="fa fa-eye icon icon-display" id="togglePassword" style="color:orange"></i></a></td> </tr> <?php } ?> </tbody> </table> </div> <div class="container position-relative"> <div class="row export_csv"> <div class="col-md-3 offset-md-9 pr-0 button-alignment"> <a id="export" href="export_warehouse.php?type=0" class="btn btn-primary mobile-alignment mt-4"><i class="fa fa-download"></i><span class="pl-2">EXPORT.XLSX</span></a> </div> </div> </div> </div> </div> <!-- footer --> <?php include("footer.php"); ?> <!-- <script src="js/jquery.min.js"></script> --> <!-- <script src="js/jquery.pagination.min.js"></script> --> <!----> <script> jQuery(document).ready(function() { jQuery('#example').DataTable( { "processing": false, "dataSrc": "", "sDom": 'Rfrtlip', 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/dashboard-ajax.php?id=0", "ordering": false, "fnDrawCallback": function( oSettings ) { rowCount=oSettings.json.iTotalRecords; if(rowCount<1){ $("#export").addClass("d-none") } }, "aoColumns": [{ mData: 'id' } , { mData: 'warehouse_number' } , { mData: 'warehouse_name', 'sClass':'text-capitalize' }, { mData: 'warehouse_id' }, { mData: 'display_name', }, { mData: 'status' }, { mData: 'action' } ] } ); } ); </script> <style> #export{ margin-bottom:-35px } table#example { width: 97% !important; } </style>