ok

Mini Shell

Direktori : /home2/selectio/www/subamangala/admin/ui-api/
Upload File :
Current File : //home2/selectio/www/subamangala/admin/ui-api/way-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 w.bus_id=".$_POST['bus_id'];
}
if(isset($_POST['trip_date']) && $_POST['trip_date']!=0 && $_POST['trip_date']!=''){
    $conditions.=" and w.trip_date='".$_POST['trip_date']."'";
}
if(isset($_POST['pickup_city']) && $_POST['pickup_city']!=0 && $_POST['pickup_city']!=''){
    $conditions.=" and w.from_city='".$_POST['pickup_city']."'";
}
if(isset($_POST['drop_city']) && $_POST['drop_city']!=0 && $_POST['drop_city']!=''){
    $conditions.=" and w.to_city='".$_POST['drop_city']."'";
}
        
$statement = $pdo->prepare("SELECT SUM(w.amount) as way_tickets_amount FROM tbl_way_tickets w 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-success btn-lg" style="width: 100%;"><span><?php echo "Grand Total - <i class='fa fa-inr'></i>  " . $data['way_tickets_amount'] ;?></span></button>
                                </div>
                        </div>

<?php } ?>

Zerion Mini Shell 1.0