dispatch.php 4.54 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;">

            </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;">

                </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;">

                </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'; ?>