<?php include 'topmost.php';?>
<!DOCTYPE html><html lang="en"><head>
<meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><meta name="description" content="">
<meta name="author" content="">

    <title>My Outlet</title>
    <?php  include 'toplinks.php';  ?>
</head>
<body id="page-top"><div id="wrapper"><?php  include 'menus.php';  ?>

        

<?php include 'top.php';   ?>



                <!-- End of Topbar -->

                <!-- Begin Page Content -->
                <div class="container-fluid">

                    <!-- Page Heading -->
                    <div class="d-sm-flex align-items-center justify-content-between mb-4">
<?php  include 'greet.php';  ?><?php  include 'process.php';  ?>

                       <!--  <a href="#" class="d-none d-sm-inline-block btn btn-sm btn-primary shadow-sm"><i
                                class="fas fa-download fa-sm text-white-50"></i> Generate Report</a> -->
                    </div>

                    <!-- Content Row -->


<?php include 'top_stats.php'; ?>

                    

<div class="row"><div class="col-md-12">
      
<div class="card shadow mb-4">
  <div class="card-header py-3 d-flex flex-row align-items-center justify-content-between bg-dark text-white"><h6 class="m-0 font-weight-bold text-white">Way Bill Cost &amp; Restrictions</h6>
 <div class="dropdown no-arrow"><a class="dropdown-toggle" href="#" role="button" id="dropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
 <i class="fas fa-ellipsis-v fa-sm fa-fw text-gray-400"></i></a>
<div class="dropdown-menu dropdown-menu-right shadow animated--fade-in" aria-labelledby="dropdownMenuLink"><a class="dropdown-item" href="#" data-toggle="modal" data-target="#filterPay"><i class="fa fa-filter text-dark"> Filter</i></a>
<button class="dropdown-item" id="export"><i class="fa fa-file text-dark"> Export</i></button>
</div></div></div>
<div class="card-body table-responsive">



<table class="table table-bordered table2excel" id="dataTable" width="100%" cellspacing="0">
   

<thead ><tr class="small"><th>S/N</th><th>STATE</th><th>LGA</th><th>COST</th><th>Status</th><th>Action</th></tr></thead>
    
<?php  $count= 1;
foreach(QueryDB("SELECT * FROM lga") as $rows){
echo '<tr class="small" style="">
<td>'.$count.'</td>
<td >'.getState($rows['state_id']).' </td>
<td >'.($rows['name']).' </td>
<td >'.($rows['way_bill_cost']).' </td>
<td >'; if($rows['status']==0){ echo 'Av'; }else{ echo 'Unv';} echo '</td>
<td ><button data-toggle="modal" data-target="#filterPay'.$count.'" class="btn btn-warning btn-sm"><i class="fa fa-edit text-dark"></i></button> </td>
';?>

<div class="modal fade" id="filterPay<?php echo $count; ?>" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true"><div class="modal-dialog modal-center modal-sm" role="document"><div class="modal-content"><div class="modal-header bg-secondary text-white"><h5 class="modal-title " id="exampleModalLabel">#Change Status</h5><button class="close" type="button" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button></div><div class="modal-body">
<form action="" method="POST">
    <input type="hidden" name="where" value="<?php echo $rows['id']; ?>">
    <p><?php  echo $rows['name'].' in '.getState($rows['state_id']);    ?></p>
<div class="form-group col-md-12 col-12 mt-3">
    <input type="number" name="cost" class="form-control" value="<?php echo $rows['way_bill_cost']; ?>">
</div>
<div class="form-group col-md-12 col-12 mt-3"><select class="form-control" name="status"><option value="">-Status-</option><option value="0" <?php  if($rows['status']==0){ echo 'selected';}  ?>>Active</option><option value="1" <?php  if($rows['status']==1){ echo 'selected';}  ?>>Inactive</option></select></div>



<div class="form-group col-md-12 col-12 mt-3"><input type="submit" value="Submit" name="chnage_way_cost" class="form-control btn btn-primary"></div>
</form></div></div></div></div>

<?php echo '</tr>';}
?></tbody></table>


</div><!--/card body-->

</div>
  </div><!--col-md-12--></div>
               

                </div>
                <!-- /.container-fluid -->

            </div>
            <!-- End of Main Content -->

            <!-- Footer -->
        <?php  include 'bottom_most.php'; ?>

<div class="modal fade" id="filterPay" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true"><div class="modal-dialog modal-center modal-sm" role="document"><div class="modal-content"><div class="modal-header bg-secondary text-white"><h5 class="modal-title " id="exampleModalLabel">#Filter Payment</h5><button class="close" type="button" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button></div><div class="modal-body">
<form action="" method="POST">
<div class="form-group col-md-12 col-12 mt-3"><select class="form-control" name="pchs_type">
<?php foreach(QueryDB("SELECT * FROM category where status =1 and id=2 ") as $rows){
  echo '<option value='.$rows['id'].'>'.$rows['type'].'</option>'; } ?>
</select></div>
<div class="form-group col-md-12 col-12 mt-3"><select class="form-control" name="list_month"><option value="">-Select-</option><option value="1">January</option><option value="2">February</option><option value="3">March</option><option value="4">April</option><option value="5">May</option><option value="6">June</option><option value="7">July</option><option value="8">August</option><option value="9">September</option><option value="10">October</option><option value="11">November</option><option value="12">December</option></select></div>
<div class="form-group col-md-12 col-12 mt-3"><input type="text" placeholder="Year" name="yr" class="form-control" maxlength="4" minlength="4" onkeypress="return isNumberKey(event)"></div>
<div class="form-group col-md-12 col-12 mt-3"><input type="date" placeholder="date Paid" name="date_paid" class="form-control" ></div>
<div class="form-group col-md-12 col-12 mt-3"><select class="form-control" name="biller"><option value="">-Supplied Branch-</option><?php foreach(QueryDB("SELECT * FROM branch ") as $rows){echo '<option value="'.$rows['id'].'">'.$rows['shrt_name'].'</option>'; } ?></select></div><div class="form-group col-md-12 col-12 mt-3"><input type="submit" value="Filter" name="search" class="form-control btn btn-primary"></div>
</form></div></div></div></div>


</body>

</html>