ok
Direktori : /home2/selectio/www/subamangala/admin/ui-api/ |
Current File : //home2/selectio/www/subamangala/admin/ui-api/luggage-tickets-api.php |
<?php ob_start(); session_start(); include "../config/config.php"; $conditions=""; if(isset($_POST['bus_id']) && $_POST['bus_id']!=0 && $_POST['bus_id']!=''){ $conditions.=" and tbl_luggage.bus_id=".$_POST['bus_id']; } if(isset($_POST['trip_date']) && $_POST['trip_date']!=0 && $_POST['trip_date']!=''){ $conditions.=" and tbl_luggage.date='".$_POST['trip_date']."'"; } if(isset($_POST['pickup_city']) && $_POST['pickup_city']!=0 && $_POST['pickup_city']!=''){ $conditions.=" and tbl_luggage.from_id='".$_POST['pickup_city']."'"; } if(isset($_POST['drop_city']) && $_POST['drop_city']!=0 && $_POST['drop_city']!=''){ $conditions.=" and tbl_luggage.to_id='".$_POST['drop_city']."'"; } $statement = $pdo->prepare("SELECT SUM(luggage_amount) as luggage_amount FROM tbl_luggage where 1=1 $conditions"); $statement->execute(); $emp_data = $statement->fetchAll(PDO::FETCH_ASSOC); $totalData = $statement->rowCount(); foreach ($emp_data as $data){ ?> <div class="row"> <div class="col-md-4"> <button class="btn btn-danger btn-lg" style="width: 100%;"><span><?php echo "Grand Total - <i class='fa fa-inr'></i> " . $data['luggage_amount'] ;?></span></button> </div> </div> <?php } ?>