bookedFlights.php
2.93 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<?php
session_start();
require_once 'classes/realops.php';
$get = new Get();
$stats = new Stats();
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">Booked Flights</h2>
<div class="table-responsive col-lg-12">
<table class="table table-striped">
<thead>
<tr>
<th>Flight Number</th>
<th>Departure</th>
<th>Arrival</th>
<th>Aircraft</th>
<th>Slot Time</th>
<th>Stats</th>
</tr>
</thead>
<tbody>
<?php
$bookings = $get->bookings($_GET);
if(!empty($bookings)) {
foreach($bookings as $row)
{
?>
<tr>
<td style=""><img src="logos/<?php echo $row['airline']; ?>.png" /><br /><strong><?php echo $row['airline'] . $row['flightnum']; ?></strong>/<?php echo $row['fbnum'] ?></td>
<td><?php if($row['deparr'] == "0") echo "Sydney (YSSY)"; else echo $get->airport($row['icao'])['name'] . " (" . $row['icao'] . ")"; ?></td>
<td><?php if($row['deparr'] == "1") echo "Sydney (YSSY)"; else echo $get->airport($row['icao'])['name'] . " (" . $row['icao'] . ")"; ?></td>
<td><?php echo $get->aircraft($row['aircraft'])['name'] ?></td>
<td><?php echo date('H:i', strtotime($row['time'])); ?> LOC<br /><?php echo date('H:i', strtotime($row['time'])- 60 * 60 * Z); ?> UTC</td>
<td><span class="label label-primary"><?php echo $row['pilotVatsimID']; ?></span><br /><span class="label label-success"><?php echo $row['pilotName']; ?></span><br /><span class="label label-<?php if($row['va']['id'] == 0) echo "info"; else echo "danger"; ?>"><?php echo $row['va']['name']; ?></span><br /></td>
</tr>
<?php } }
else {
echo "<br /><div class=\"alert alert-danger\" role=\"alert\"><strong>No Flights Found.</strong> Please adjust your search and try again.</div>";
}
?>
</tbody>
</table>
</div>
</article>
</div><!-- /.row -->
</div><!-- /.container -->
</div><!-- /.wrapper -->
<?php include 'sections/footer.php'; ?>