ok

Mini Shell

Direktori : /proc/thread-self/root/proc/self/root/home2/selectio/www/subamangala/admin/api/
Upload File :
Current File : //proc/thread-self/root/proc/self/root/home2/selectio/www/subamangala/admin/api/seats-selection.php

<?php 
ob_start();
session_start();
include "../config/config.php";


$bus_id = $_REQUEST['bus_id'];
$conditions="";


if(isset($bus_id) && $bus_id!="" && $bus_id!=""){
    $conditions.=" and b.bus_id=".$bus_id."";
}


            $statement = $pdo->prepare("SELECT * FROM `tbl_bus_seats` b WHERE b.id!=0 ".$conditions);
        	$statement->execute();
            $Datas = $statement->fetchAll(PDO::FETCH_ASSOC);
            $totalData = $statement->rowCount();
            
            if($totalData>0){   ?>
                <div class="text-center">
                    <h3 style="color: red;"><b>Already Bus Seats UI Creation Completed</b></h3>
                </div>
                
                
                
                
                
                
                
                
                
                <div>
                <?php
                $statement = $pdo->prepare("SELECT * FROM `tbl_bus_seats` WHERE bus_id=".$bus_id."");
                error_log("SELECT * FROM `tbl_bus_seats` WHERE bus_id=".$bus_id."");
                $statement->execute();
                $datas_seat = $statement->fetchAll(PDO::FETCH_ASSOC);
                $totalData = $statement->rowCount();
                $i=1;
                foreach($datas_seat as $data_bus){
                
                 
                if($i%11==1 || $i==1){
                    echo '<div class="row text-center">';
                }
                
                echo '<input type="text" name="seat[]" value="'.$data_bus["seat_no"].'" class="seat">';
                echo '<input type="hidden" name="ids[]" value="'.$data_bus["id"].'" class="">';
                
                if($i%11==0){
                    echo '</div>';
                }
                
                ?>
                
                
                <?php $i++; }  ?>
                
                </div>
                
                
                <br><br>
                <div class="form-group" style="text-align:center;">
                    <input type="submit" name="submit" id="submit" value="Update"  class="btn btn-success" />
                </div>
                
                
           <?php }else{ ?>
               <div>
                            <div class="row text-center">
                                   <input type="text" name="seat[]" value="D" class="seat" style="color: red; background: yellow;"><input type="hidden" name="ids[]" value="0">
                                   <input type="text" name="seat[]" value="" class="seat"><input type="hidden" name="ids[]" value="0">
                                   <input type="text" name="seat[]" value="" class="seat"><input type="hidden" name="ids[]" value="0">
                                   <input type="text" name="seat[]" value="" class="seat"><input type="hidden" name="ids[]" value="0">
                                   <input type="text" name="seat[]" value="" class="seat"><input type="hidden" name="ids[]" value="0">
                                   <input type="text" name="seat[]" value="" class="seat"><input type="hidden" name="ids[]" value="0">
                                   <input type="text" name="seat[]" value="" class="seat"><input type="hidden" name="ids[]" value="0">
                                   <input type="text" name="seat[]" value="" class="seat"><input type="hidden" name="ids[]" value="0">
                                   <input type="text" name="seat[]" value="" class="seat"><input type="hidden" name="ids[]" value="0">
                                   <input type="text" name="seat[]" value="" class="seat"><input type="hidden" name="ids[]" value="0">
                                   <input type="text" name="seat[]" value="" class="seat"><input type="hidden" name="ids[]" value="0">
                            </div>
                            <div class="row text-center">
                                   <input type="text" name="seat[]" value="" class="seat"><input type="hidden" name="ids[]" value="0">
                                   <input type="text" name="seat[]" value="" class="seat"><input type="hidden" name="ids[]" value="0">
                                   <input type="text" name="seat[]" value="" class="seat"><input type="hidden" name="ids[]" value="0">
                                   <input type="text" name="seat[]" value="" class="seat"><input type="hidden" name="ids[]" value="0">
                                   <input type="text" name="seat[]" value="" class="seat"><input type="hidden" name="ids[]" value="0">
                                   <input type="text" name="seat[]" value="" class="seat"><input type="hidden" name="ids[]" value="0">
                                   <input type="text" name="seat[]" value="" class="seat"><input type="hidden" name="ids[]" value="0">
                                   <input type="text" name="seat[]" value="" class="seat"><input type="hidden" name="ids[]" value="0">
                                   <input type="text" name="seat[]" value="" class="seat"><input type="hidden" name="ids[]" value="0">
                                   <input type="text" name="seat[]" value="" class="seat"><input type="hidden" name="ids[]" value="0">
                                   <input type="text" name="seat[]" value="" class="seat"><input type="hidden" name="ids[]" value="0">
                            </div>
                            <div class="row text-center">
                                   <input type="text" name="seat[]" value="" class="seat"><input type="hidden" name="ids[]" value="0">
                                   <input type="text" name="seat[]" value="" class="seat"><input type="hidden" name="ids[]" value="0">
                                   <input type="text" name="seat[]" value="" class="seat"><input type="hidden" name="ids[]" value="0">
                                   <input type="text" name="seat[]" value="" class="seat"><input type="hidden" name="ids[]" value="0">
                                   <input type="text" name="seat[]" value="" class="seat"><input type="hidden" name="ids[]" value="0">
                                   <input type="text" name="seat[]" value="" class="seat"><input type="hidden" name="ids[]" value="0">
                                   <input type="text" name="seat[]" value="" class="seat"><input type="hidden" name="ids[]" value="0">
                                   <input type="text" name="seat[]" value="" class="seat"><input type="hidden" name="ids[]" value="0">
                                   <input type="text" name="seat[]" value="" class="seat"><input type="hidden" name="ids[]" value="0">
                                   <input type="text" name="seat[]" value="" class="seat"><input type="hidden" name="ids[]" value="0">
                                   <input type="text" name="seat[]" value="" class="seat"><input type="hidden" name="ids[]" value="0">
                            </div>
                            <div class="row text-center">
                                   <input type="text" name="seat[]" value="" class="seat"><input type="hidden" name="ids[]" value="0">
                                   <input type="text" name="seat[]" value="" class="seat"><input type="hidden" name="ids[]" value="0">
                                   <input type="text" name="seat[]" value="" class="seat"><input type="hidden" name="ids[]" value="0">
                                   <input type="text" name="seat[]" value="" class="seat"><input type="hidden" name="ids[]" value="0">
                                   <input type="text" name="seat[]" value="" class="seat"><input type="hidden" name="ids[]" value="0">
                                   <input type="text" name="seat[]" value="" class="seat"><input type="hidden" name="ids[]" value="0">
                                   <input type="text" name="seat[]" value="" class="seat"><input type="hidden" name="ids[]" value="0">
                                   <input type="text" name="seat[]" value="" class="seat"><input type="hidden" name="ids[]" value="0">
                                   <input type="text" name="seat[]" value="" class="seat"><input type="hidden" name="ids[]" value="0">
                                   <input type="text" name="seat[]" value="" class="seat"><input type="hidden" name="ids[]" value="0">
                                   <input type="text" name="seat[]" value="" class="seat"><input type="hidden" name="ids[]" value="0">
                            </div>
                            <div class="row text-center">
                                   <input type="text" name="seat[]" value="" class="seat"><input type="hidden" name="ids[]" value="0">
                                   <input type="text" name="seat[]" value="" class="seat"><input type="hidden" name="ids[]" value="0">
                                   <input type="text" name="seat[]" value="" class="seat"><input type="hidden" name="ids[]" value="0">
                                   <input type="text" name="seat[]" value="" class="seat"><input type="hidden" name="ids[]" value="0">
                                   <input type="text" name="seat[]" value="" class="seat"><input type="hidden" name="ids[]" value="0">
                                   <input type="text" name="seat[]" value="" class="seat"><input type="hidden" name="ids[]" value="0">
                                   <input type="text" name="seat[]" value="" class="seat"><input type="hidden" name="ids[]" value="0">
                                   <input type="text" name="seat[]" value="" class="seat"><input type="hidden" name="ids[]" value="0">
                                   <input type="text" name="seat[]" value="" class="seat"><input type="hidden" name="ids[]" value="0">
                                   <input type="text" name="seat[]" value="" class="seat"><input type="hidden" name="ids[]" value="0">
                                   <input type="text" name="seat[]" value="" class="seat"><input type="hidden" name="ids[]" value="0">
                            </div>
                            </div>
                            
                            
                            <br><br>
                            
                            <div class="form-group" style="text-align:center;">
                                <input type="submit" name="submit" id="submit" value="Submit"  class="btn btn-success" />
                            </div>
               
               
<?php  }  ?>

Zerion Mini Shell 1.0