<?php $__env->startSection('content'); ?>
    <div class="container">
    <h2 class="content-heading">Report <small>view Aircraft report</small></h2>
    <!-- <h2 class="table-header">Tower Report</h2> -->
      <table id="Report" class="styled-table">
                        <thead>
                            
                            <tr>
                                  <th>S/No</th>
                                    <th>Aircraft Name</th>
                                    <th>Aircraft Type</th>
                                    <th>Aircraft Operator</th>
                                    <th>Call-Sign</th>
                                    <th>Length (Meters)</th>
                                    <th>Status</th>
                                    <th>Mileage</th>
                                    <th>MTOW</th>
                                    <th>Year of Manufacture</th>
                                    <th>No. Passenger Seat</th>
                                    <th>Cargo Capacity (Tonnes)</th>
                                    <th>Main Fuel Supplier</th>
                                    <th>Second Fuel Supplier</th>
                                    <th>Third Fuel Supplier</th>

                            </tr>
                        </thead>

                        <tfoot>
                            <tr>
                                
                                 <th>S/No</th>
                                    <th>Aircraft Name</th>
                                    <th>Aircraft Type</th>
                                    <th>Aircraft Operator</th>
                                    <th>Call-Sign</th>
                                    <th>Length (Meters)</th>
                                    <th>Status</th>
                                    <th>Mileage</th>
                                    <th>MTOW</th>
                                    <th>Year of Manufacture</th>
                                    <th>No. Passenger Seat</th>
                                    <th>Cargo Capacity (Tonnes)</th>
                                    <th>Main Fuel Supplier</th>
                                    <th>Second Fuel Supplier</th>
                                    <th>Third Fuel Supplier</th>

                            </tr>
                        </tfoot>
                        <tbody>
                       
                       
                       
                       
                       <?php
                       $servername = "localhost:3306";
                        $username = "ncaa_controlportal";
                        $password = "?)*Sx8_GBX1C";
                        $dbname = "ncaa_portal";
                        
                        // Create connection
                        $conn = new mysqli($servername, $username, $password, $dbname);
                        
                        // Check connection
                        if ($conn->connect_error) {
                            die("Connection failed: " . $conn->connect_error);
                        }
                        
                        // SQL query to select data from the database
                        $sql = "SELECT * FROM Aircraft";
                        $result = $conn->query($sql);

if ($result->num_rows > 0) {


    while ($row = $result->fetch_assoc()) {
        echo '<tr>';
        echo '<td>' . $row['S_No'] . '</td>';
        echo '<td>' . $row['Aircraft_Name'] . '</td>';
        echo '<td>' . $row['Aircraft_Operator'] . '</td>';
        echo '<td>' . $row['Call_Sign'] . '</td>';
        echo '<td>' . $row['Aircraft_Type'] . '</td>';
        
        
        echo '<td>' . $row['Length_Meters'] . '</td>';
        echo '<td>' . $row['Status'] . '</td>';
        echo '<td>' . $row['Mileage'] . '</td>';
        echo '<td>' . $row['MTOW'] . '</td>';
        echo '<td>' . $row['Year_of_Manufacture'] . '</td>';
        echo '<td>' . $row['No_Passenger_Seat'] . '</td>';
        echo '<td>' . $row['Cargo_Capacity_Tonnes'] . '</td>';
        echo '<td>' . $row['Main_Fuel_Supplier'] . '</td>';
        echo '<td>' . $row['Second_Fuel_Supplier'] . '</td>';
        echo '<td>' . $row['Third_Fuel_Supplier'] . '</td>';
        echo '</tr>';
    }

    echo '</tbody></table>';
} else {
    echo "No records found.";
}

// Close the database connection
$conn->close();
                       
                       ?>
                       
                       
                        </tbody>
      </table>
    </div>
</div>
    <?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.report', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/ncaa/public_html/resources/views/reports/towers/index.blade.php ENDPATH**/ ?>