JezK
Edit File: warehouse.php
<?php include("./app/checkSession.php"); if(empty($_SESSION['name'])&&$_SESSION['name']==""){ echo "<script>window.location.href='index.php'</script>"; } include("header.php"); include_once("../master_admin/app/adminObj.php"); $warehouse_list=$adminObj->getWarehouseList(); print_r ($warehouse_list); ?> <!-- side block --> <link href="css/demo.css" type="text/css" rel="stylesheet"> <style> i.fa.fa-check-circle,i.fa.fa-circle.text-warning,i.fa.fa-ban.text-danger{ font-size: 18px !important; color: green; } </style> <!-- side block --> <div class="container first-position"> <div class="container position-2"> <div class="row px-md-2 px-0"> <div class="tophead col-md-2"> <h6>Warehouses</h6> </div> <div class="tophead col-md-1"> <!-- <h6>Warehouses</h6> --> <button type="submit" class="btn btn-primary pointer">Grid View</button> </div> <div class="tophead col-md-2 ml-5"> <!-- <h6>Warehouses</h6> --> <button type="submit" class="btn btn-primary pointer ">List View</button> </div> </div> </div> <div class="table-width col-sm-9"> <div class="table-responsive"> <table id="data" class="display table-borderless no-padding" style="width:100%" cellspacing="0" cellpadding="0"> <thead> <tr> <th colspan="1"></th> </tr> <tr> <td> <?php $sql= "select * from uflexit_master_wareHouse"; $rows = $adminObj->db->get_results($sql); $totalRecord = count($rows); if($totalRecord>0) { $j=1; foreach($rows as $fetch) { $query="select * from uflexit_countries where country_id='".$fetch['warehouse_country_id']."'"; $row=$adminObj->db->get_row($query); ?> <a href="warehousedetails.php?id=<?php echo $fetch['warehouse_id']; ?>"><div class="col-sm-4 pl-0 pr-2"> <div class="col-sm-12 card shadow border-10 px-0"> <?php if($fetch['warehouse_logo']=='' || $fetch['warehouse_logo']=='NULL') { ?> <img class="card-img-top" src="images/logo.png" alt="Card image" style="width:100%" height="180px"> <?php }else { ?> <img class="card-img-top" src="../uploads/warehouse_imgs/<?php echo $fetch['warehouse_logo']; ?>" alt="Card image" style="width:100%" height="180px"> <?php } ?> <div class="card-body"> <h6 class="card-title"><?php echo $fetch['warehouse_name']; ?></h6> <p class="card-text text-dark"> <img src="images/location.png"> <?php echo $fetch['warehouse_address'] ?>, <?php echo $row['country_name'] ?> </p> <a class="p-2" href=''><i title="Active" class="fa fa-check-circle text-success" aria-hidden="true"></i></a> <a class="p-2" href=''><i title="Inactive" class="fa fa-circle text-warning" aria-hidden="true"></i></a> <a class="p-2" href=''><i title="Reject" class="fa fa-ban text-danger" aria-hidden="true"></i></a> </div> </div> </div></a> <?php } } ?> <!-- </td> <td> --> <!-- <div class="col-sm-4 pl-0 pr-2"> <div class="col-sm-12 card shadow border-10 px-0"> <img class="card-img-top" src="images/logo.png" alt="Card image" style="width:100%" height="180px"> <div class="card-body"> <h6 class="card-title">John Doe</h6> <p class="card-text text-dark"> <img src="images/location.png"> text dummy </p> </div> </div> </div> --> <!-- </td> <td> --> <!-- <div class="col-sm-4 pl-0 pr-2"> <div class="col-sm-12 card shadow border-10 px-0"> <img class="card-img-top" src="images/logo.png" alt="Card image" style="width:100%" height="180px"> <div class="card-body"> <h6 class="card-title">John Doe</h6> <p class="card-text text-dark"> <img src="images/location.png"> text dummy </p> </div> </div> </div> --> <!-- <div class="col-sm-4 pl-0 pr-2"> <div class="col-sm-12 card shadow border-10 px-0"> <img class="card-img-top" src="images/logo.png" alt="Card image" style="width:100%" height="180px"> <div class="card-body"> <h6 class="card-title">John Doe</h6> <p class="card-text text-dark"> <img src="images/location.png"> text dummy </p> </div> </div> </div> --> </td> </tr> </thead> <tbody class="d-none"> <tr> <td colspan="1"></td> </tr> <tr> <td colspan="1"></td> </tr> </tbody> </table> </div> <div class="table-responsive p-md-4 p-0"> <table id="example" class="display bg-white tbl-border table-borderless" style="width:100%"> <thead> <tr> <th>Sno</th> <th>Warehouse Name</th> <th>Warehouse Number</th> <th>Warehouse Country</th> <th>Warehouse Address</th> <th>State</th> <th>Action</th> </tr> </thead> <tbody> <?php $sql= "select * from uflexit_master_wareHouse"; $rows = $adminObj->db->get_results($sql); $totalRecord = count($rows); if($totalRecord>0) { $j=1; foreach($rows as $fetch) { if ($fetch['warehouse_status'] == 0){ $status = "Inactive"; }else if($fetch['warehouse_status'] == 1){ $status = "Active"; }else if($fetch['warehouse_status'] == 2){ $status = "Rejected"; } $query="select * from uflexit_countries where country_id='".$fetch['warehouse_country_id']."'"; $row=$adminObj->db->get_row($query); // print_r($row); ?> <tr> <td><?php echo $j++; ?></td> <td><?php echo $fetch['warehouse_name'] ?></td> <td><?php echo $fetch['warehouse_number'] ?></td> <td><?php echo $row['country_name'] ?></td> <td><?php echo $fetch['warehouse_address'] ?></td> <td><?php echo $status ?></td> <td class="d-flex"> <a class="p-2" href='warehouseActive.php?id=<?php echo $fetch["warehouse_id"];?>'><i title="Active" class="fa fa-check-circle text-success" aria-hidden="true"></i></a> <a class="p-2" href='warehouseInactive.php?id=<?php echo $fetch["warehouse_id"];?>'><i title="Inactive" class="fa fa-circle text-warning" aria-hidden="true"></i></a> <a class="p-2" href='warehouseReject.php?id=<?php echo $fetch["warehouse_id"];?>'><i title="Reject" class="fa fa-ban text-danger" aria-hidden="true"></i></a></td> </tr> <?php } } ?> </tbody> </table> </div> </div> <div class="custom-template col-sm-3"> <div class="custom-content"> <nav class="navbar navbar-expand-sm navbar-default nav-side"> <ul class="nav navbar-nav w-100"> <li class="menu-item-has-children dropdown bg-list-color px-3 my-1" > <a href="#" class="dropdown-toggle text-primary" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Storage Type</a> <ul class="sub-menu children dropdown-menu bg-list-color mb-3 pl-md-0" > <form action="" class="font-small"> <div class="form-check my-2"> <label class="form-check-label" for="all"> <input type="radio" class="form-check-input wh-18" id="all" name="storage_type" value="all">All </label> </div> <div class="form-check my-2"> <label class="form-check-label" for="no_pallets"> <input type="radio" class="form-check-input wh-18" id="no_pallets" name="storage_type" value="no_pallets">No Pallets </label> </div> <div class="form-check my-2"> <label class="form-check-label" for="pallet_period"> <input type="radio" class="form-check-input wh-18" id="pallet_period" name="storage_type" value="pallet_period">Pallet Period </label> </div> <div class="form-check my-2"> <label class="form-check-label" for="amt_space"> <input type="radio" class="form-check-input wh-18" id="amt_space" name="storage_type" value="amt_space">Amt Space(sqm) </label> </div> <div class="form-check my-2"> <label class="form-check-label" for="space_period"> <input type="radio" class="form-check-input wh-18" id="space_period" name="storage_type" value="space_period">Space Period </label> </div> <div id="collapse" style="display:none"> <div class="form-check my-2"> <label class="form-check-label" for="dummy1"> <input type="radio" class="form-check-input wh-18" id="dummy1" name="storage_type" value="dummy1">dummy1 </label> </div> <div class="form-check my-2"> <label class="form-check-label" for="dummy2"> <input type="radio" class="form-check-input wh-18" id="dummy2" name="storage_type" value="dummy2">dummy2 </label> </div> </div> <a href="#collapse" class="nav-toggle pl-3 ml-1 text-primary f-13">View All</a> </form> </ul> </li> <li class="menu-item-has-children dropdown bg-list-color px-3 my-1"> <a href="#" class="dropdown-toggle text-primary" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Category</a> <ul class="sub-menu children dropdown-menu bg-list-color mb-3 pl-md-0"> <form action="" class="font-small"> <div class="form-check my-2"> <label class="form-check-label" for="radio3"> <input type="radio" class="form-check-input wh-18" id="radio3" name="optradio" value="option3">Option 1 </label> </div> <div class="form-check my-2"> <label class="form-check-label" for="radio4"> <input type="radio" class="form-check-input wh-18" id="radio4" name="optradio" value="option4">Option 2 </label> </div> </form> </ul> </li> <li class="menu-item-has-children dropdown bg-list-color px-3 my-1"> <a href="#" class="dropdown-toggle text-primary" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Services</a> <ul class="sub-menu children dropdown-menu bg-list-color mb-3 pl-md-0"> <form action="" class="font-small"> <div class="form-check my-2"> <label class="form-check-label" for="radio5"> <input type="radio" class="form-check-input wh-18" id="radio5" name="optradio" value="option5">Option 1 </label> </div> <div class="form-check my-2"> <label class="form-check-label" for="radio6"> <input type="radio" class="form-check-input wh-18" id="radio6" name="optradio" value="option6">Option 2 </label> </div> </form> </ul> </li> </ul> </nav> </div> <div class="custom-toggle d-md-none d-block"> <i class="fa fa-bars mt-2 pt-1"></i> </div> </div> </div> <!-- footer --> <?php include("footer.php"); ?> <!-- <script src="js/jquery.min.js"></script> --> <!-- <script src="js/jquery.pagination.min.js"></script> --> <!----> <script> $(document).ready(function() { $('#example, #data').DataTable({ language: { searchPlaceholder: "Search " }, "processing": true, "dataSrc": "", "sDom": 'Bfrtip', buttons: [ { extend: 'csvHtml5', text: '<i class="fa fa-file-text-o"></i>Export to csv', titleAttr: 'CSV' }, ], }); }); var toggle_customSidebar = false, custom_open = 0; if (!toggle_customSidebar) { var toggle = $('.custom-template .custom-toggle'); toggle.on('click', (function() { if (custom_open == 1) { $('.custom-template').removeClass('open'); toggle.removeClass('toggled'); custom_open = 0; } else { $('.custom-template').addClass('open'); toggle.addClass('toggled'); custom_open = 1; } })); toggle_customSidebar = true; } $('.nav-toggle').click(function () { var collapse_content_selector = $(this).attr('href'); var toggle_switch = $(this); $(collapse_content_selector).toggle(function () { if ($(this).css('display') == 'none') { toggle_switch.html('View All'); } else { toggle_switch.html('Hide'); } }); }); </script>