myFlights.php
3.75 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
<?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))
{
foreach($myFlights as $row)
{ ?>
<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="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">
<button type="button" class="btn btn-primary" disabled>Go to Dispatch</button>
<button type="button" class="btn btn-primary" style="margin-top:10px;" disabled>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 -->
<?php include 'sections/footer.php'; ?>