myFlights.php
5.05 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<?php
session_start();
require_once 'classes/realops.php';
$get = new Get();
date_default_timezone_set('Australia/Sydney');
?>
<?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">My Booked Flights</h2>
<?php $myFlights = $get->myFlights($_SESSION['vatsimID']);
if(!empty($myFlights))
{ ?>
<div class="alert alert-info" role="alert">
<strong>Have you purchased FlyTampa Sydney yet?.</strong> This scenery will help enhance your experience into and out of Sydney during RealOps 2015. Purchase it today!<br />
<a href="http://www.flytampa.org/order.html" class="btn btn-primary" style="margin-top:10px;" target="_blank">Purchase on FlyTampa</a>
<a href="http://secure.simmarket.com/flytampa-sydney.phtml" class="btn btn-primary" style="margin-top:10px;" target="_blank">Purchase on SimMarket</a>
</div>
<div class="alert alert-info" role="alert">
<strong>Some routes not available for international flights.</strong> We apologise for any inconvenience. Real world flown routes into Sydney <a href="http://flightaware.com/statistics/ifr-route/" target="_blank">can be found here</a>.
</div>
<?php
foreach($myFlights as $row)
{ ?>
<div class="panel panel-default" id="<?php echo $row['bookingID'] ?>Block">
<div class="panel-heading">
<h3 class="panel-title"><strong><?php echo $row['airline'].$row['flightnum']; ?></strong><?php echo "/".$row['fbnum']; ?></h3>
</div>
<div class="panel-body">
<div class="col-lg-3">
<img src="logos/<?php echo $row['airline'] ?>.png" /><br /><strong>Operator:</strong>
<select name="va" class="vaSelect" style="width:100%;">
<option value="0.<?php echo $row['bookingID'] ?>">No Virtual Airline</option>
<?php foreach($get->vas() as $row2)
{ ?>
<option value="<?php echo $row2['id'] ?>.<?php echo $row['bookingID'] ?>" <?php if($row['va'] == $row2['id']) echo "selected"; ?>><?php echo $row2['name'] ?></option>
<?php } ?>
</select>
</div>
<div class="col-lg-4">
<strong>Departing:</strong> <?php if($row['deparr'] == "0") echo "Sydney"; else echo $get->airport($row['icao'])['name'] /* ?> (Gate <?php echo $get->gate($row['fbnum']) ?>) <?php */ ?><br />
<strong>Arriving:</strong> <?php if($row['deparr'] == "1") echo "Sydney"; else echo $get->airport($row['icao'])['name'] ?>
</div>
<div class="col-lg-3">
<strong>Aircraft:</strong> <?php echo $get->aircraft($row['aircraft'])['name'] ?><br />
<strong>ST<?php if($row['deparr'] == 0) echo "D"; else echo "A"; ?>:</strong> <?php echo date('H:i', strtotime($row['time'])); ?> Local/<?php echo date('H:i', strtotime($row['time'])- 60 * 60 * 10); ?> UTC
</div>
<div class="col-lg-2">
<a href="dispatch.php?booking=<?php echo $row['bookingID'] ?>" class="btn btn-primary">Go to Dispatch</a>
<button type="button" class="btn btn-primary" style="margin-top:10px;" data-toggle="modal" data-target="#realops-file-info">File on VATSIM</button>
<button type="button" class="btn btn-default removeBooking" id="<?php echo $row['bookingID'] ?>" style="margin-top:10px;">Remove Booking</button>
</div>
</div>
</div>
<small>*Double click the 'Remove Booking' button to confirm that you would like to remove your booking.</small>
<?php
}
}
else
{ ?>
<div class="alert alert-danger" role="alert">
<strong>No flights booked.</strong> It looks like you haven't booked a flight yet. Please <a href="slots.php">book a flight</a> to get started!
</div>
<?php }
?>
</article>
</div><!-- /.row -->
</div><!-- /.container -->
</div><!-- /.wrapper -->
<div class="modal fade" id="realops-file-info" tabindex="-1" role="dialog" aria-labelledby="realops-file-info-label" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title" id="realops-file-info-label">File on VATSIM</h4>
</div>
<div class="modal-body">
<p><strong>To file on VATSIM:</strong></p>
<p>Please click on "Go to Dispatch" and scroll down to the bottom of the page. Under "Dispatch Options", click "File on VATSIM".</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" data-dismiss="modal">Got it</button>
</div>
</div>
</div>
</div>
<?php include 'sections/footer.php'; ?>