dispatch.php 7.04 KB
<?php
session_start();
require_once 'classes/realops.php';
$get = new Get();
$stats = new Stats();
$flight = $get->extendedBooking($_GET['booking']);
$dispatch = new Dispatch();
date_default_timezone_set('Australia/Sydney');
?>
    <!DOCTYPE html>
<html lang="en">
    <head>
        <?php include 'sections/header.php'; ?>
    </head>
<body>
<div class="wrapper">
    <?php include 'sections/navbar.php' ?>
    <div class="container" id="realops-container">
        <div class="row">
            <article class="col-sm-12 panel panel-default" id="realops-body">
<h2 class="sub-header"><?php echo $flight['airline'] . $flight['flightnum'] ?> Flight Dispatch</h2>
                <div class="row">

    <div class="well" style="min-height:190px">
        <div class="col-md-6">
            <img src="logos/<?php echo $flight['airline'] ?>.png" /> <br />
            <span style="font-size:24px;"><?php echo $get->airline($flight['airline']) ?> flight <?php echo $flight['flightnum']; ?></span><br />
            <strong style="font-size:22px;">Slot Time: <?php echo $flight['time'] ?> Local</strong><br />
            <span style="font-size:17px;">
                <?php if($flight['deparr'] == 0) echo "Sydney - " . $get->airport($flight['icao'])['name']; else echo $get->airport($flight['icao'])['name'] . "-YSSY"; ?><br />
                <?php if($flight['deparr'] == 0) echo "YSSY-" . $flight['icao']; else echo $flight['icao'] . "-YSSY"; ?>
            </span>
        </div>
        <div class="col-md-6">
            Recorded Block Out: <?php if(empty($flight['blockOut']))
                echo "----Z";
            else echo $flight['blockOut']; ?><br />
            Recorded Block Off:
                <?php if(empty($flight['blockOff']))
                    echo "----Z";
                else echo $flight['blockOff']; ?><br />
            Recorded Block On:
            <?php if(empty($flight['blockOn']))
                echo "----Z";
            else echo $flight['blockOn']; ?><br />
            Recorded Block In:
            <?php if(empty($flight['blockIn']))
                echo "----Z";
            else echo $flight['blockIn']; ?>
        </div>
</div>
                </div>
<div class="row">
<div class="col-md-6">
        <div class="well">
            <h4>ATS Plan:</h4>
            <div class="well-sm" style="background-color:white; border:1px solid grey; font-family:Courier New;">
                <?php
                if($deparr == 0)
                {
                    $depairport = "YSSY";
                    $arrairport = $flight['icao'];
                }
                else
                {
                    $depairport = $flight['icao'];
                    $arrairport = "YSSY";
                }
                echo "(FPL-" . $flight['airline'] . $flight['flightnum'] . "-IS <br />
            -" . $flight['aircraft'] . "/" . $dispatch->getWeightCategory($flight['aircraft']) . "-SDE3FGHIRWYZ/LB1 <br />
            -" . $depairport . date('Hi', strtotime($flight['time']) - 60 * 60 * 10) . " <br />
            -DCT SY H65 RAZZI Q29 ML DCT <br />
            -" . $arrairport . "0" . $flight['flightTime'] . " <br />
            -" . $dispatch->getRemarks($flight['airline'], $flight['va']['name'], "VHYIM", $flight['aircraft']) . ") " ?>
            </div>
        </div>
        </div>
    <div class="col-md-6">
        <div class="well">
            <h4>Fuel Data:</h4>
            <div class="well-sm" style="background-color:white; border:1px solid grey; font-family:Courier New;">
                <?php
                $load = $get->load($flight['aircraft'], $depairport, $arrairport); ?>
                <?php echo $flight['airline'] . $flight['flightnum'] . " " ."LOADSHEET (PREPARED FOR " . strtoupper($_SESSION['firstname']) . " " . strtoupper($_SESSION['lastname']) . ")"; ?>
                <br />ALL WEIGHTS IN KILOGRAMS (KG)
                <br />
                AS CALCULATED FOR: <?php echo strtoupper($load->aircraft); ?><br /><br />
                -----------------------<br />
                <table style="width:100%;">
                    <thead>
                    <tr>
                        <th></th>
                        <th>WEIGHT</th>
                        <th>ENDURANCE</th>
                    </tr>
                    </thead>
                    <tr>
                        <td>&nbsp;</td>
                    </tr>
                    <tr>
                        <td>FLIGHT FUEL:</td>
                        <td><?php echo $load->estimatedFuelUsage; ?></td>
                        <td><?php echo $load->flightFuel; ?></td>
                    </tr>
                    <tr>
                        <td>RESERVE FUEL:</td>
                        <td><?php echo $load->reserveFuel; ?></td>
                        <td><?php echo $load->reserveTime; ?></td>
                    </tr>
                    <tr>
                        <td>RELEASE FUEL:</td>
                        <td><?php echo $load->takeOffFuel; ?></td>
                        <td><?php echo $load->totalEndurance; ?></td>
                    </tr>
                    <tr>
                        <td>&nbsp;</td>
                    </tr>
                    <tr>
                        <td>OPERATING EMPTY WEIGHT:</td>
                        <td><?php echo $load->operatingEmptyWeight; ?></td>
                    </tr>
                    <tr>
                        <td>ZERO FUEL WEIGHT:</td>
                        <td><?php echo $load->zeroFuelWeight; ?></td>
                    </tr>
                    <tr>
                        <td>TAKEOFF WEIGHT:</td>
                        <td><?php echo $load->takeOffWeight; ?></td>
                    </tr>
                    <tr>
                        <td>LANDING WEIGHT:</td>
                        <td><?php echo $load->landingWeight; ?></td>
                    </tr>
                </table>

            </div>
        </div>
    </div>
    </div>
    <div class="row">
        <div class="col-md-6">
            <div class="well">
                <h4>Weather Data:</h4>
                <strong>Sydney (YSSY) Metar:</strong>
                <div class="well-sm" style="background-color:white; border:1px solid grey; font-family:Courier New;">
                    <?php echo $get->metar("YSSY"); ?>
                </div>
                <strong><?php echo $get->airport($flight['icao'])['name']; ?> (<?php echo $flight['icao'] ?>) Metar:</strong>
                <div class="well-sm" style="background-color:white; border:1px solid grey; font-family:Courier New;">
                    <?php echo $get->metar($flight['icao']); ?>
                </div>
            </div>
            </div>
        <div class="col-md-6">
            <div class="well">
                <h4>Dispatch Options:</h4>
            </div>
        </div>
    </div>
    </div>

</div>

            </article>
        </div><!-- /.row -->
    </div><!-- /.container -->
</div><!-- /.wrapper -->

<?php include 'sections/footer.php'; ?>