示例#1
0
文件: Index.php 项目: jimobama/app
<?php

$flightList = ContextManager::$Model->flightList;
if ($flightList != null && is_a($flightList, "ArrayIterator")) {
    $flightList = ContextManager::$Model->flightList;
} else {
    $flightList = new ArrayIterator();
}
include_once "models/PlaneModel.php";
$aplanes = new PlaneModel();
?>

<link href="styles/dash_board.css" rel="stylesheet" type="text/css" /> 



<div id='dash-board-wrapper' class="row">



    <div class="col-lg-12">

        <div id='container'>

            <div class='title'>

                Flight List :
                <?php 
ContextManager::ValidationFor("warning-l");
?>
            </div>   
示例#2
0
            <th>Source</th>
            <th>Destination</th>
            <th>Boarding Date</th>
            <th>Arrival Date</th> 
            <th>Boarding Time</th> 
            <th>Arrival Time</th> 
            <th>Number of Stops</th> 
            <th>Price range</th> 
            <th>Seats Left</th> 
            <th colspan="2">op</th>

        </tr>

        <?php 
    include_once "models/PlaneModel.php";
    $plane = new PlaneModel();
    for ($v = 0; $v < $list->count(); $v++) {
        $flight = new Flight();
        $list->seek($v);
        $flight = $list->current();
        $highprice = $plane->getHighestPrice($flight->planeID);
        $lowPrice = $plane->getLowerPrice($flight->planeID);
        $range = "£{$lowPrice} to £{$highprice}";
        $arrparam = new ArrayIterator();
        $idflight = $flight->Id;
        $link = "<a class='btn btn-primary btn-small' href='?url=Booking&action=Flight&id={$idflight}'>Book Now</a>";
        if ($highprice == $lowPrice) {
            $range = "£{$highprice}";
        }
        $sn = $v + 1;
        $name = $plane->GetName($flight->planeID);