-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflight_header.php
191 lines (179 loc) · 7.27 KB
/
flight_header.php
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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
<?php
/*
Copyright 2014-2023 Eric Vyncke
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
ob_start("ob_gzhandler");
require_once "dbi.php" ;
MustBeLoggedIn() ;
if (! ($userIsFlightPilot or $userIsFlightManager))
journalise($userId, "F", "Vous n'êtes pas autorisé(e) sur cette page: il faut avoir les bons droits d'accès.") ;
$today_month = date('m') ;
$today_day = date('d') ;
$christmas_theme = ($today_month == '12' and $today_day >= '15') or ($today_month == '01' and $today_day <= '08') ;
?>
<html>
<head>
<!-- TODO trim the CSS -->
<link rel="stylesheet" type="text/css" href="flight.css">
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<link href="<?=$favicon?>" rel="shortcut icon" type="image/vnd.microsoft.icon" />
<meta charset="utf-8">
<!--meta name="viewport" content="width=320"-->
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- http://www.alsacreations.com/article/lire/1490-comprendre-le-viewport-dans-le-web-mobile.html -->
<link href="<?=$favicon?>" rel="shortcut icon" type="image/vnd.microsoft.icon" />
<!-- http://www.w3schools.com/bootstrap/ -->
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<!-- jQuery library -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<?php
if ($christmas_theme) {
?>
<!-- Christmas theme -->
<link rel="stylesheet" href="mobile_christmas.css">
<?php
} // $christmas theme
?>
<title>Vols découvertes et d'initiation</title>
<script>
var
// preset Javascript constant fill with the right data from db.php PHP variables
userFullName = '<?=$userFullName?>' ;
userName = '<?=$userName?>' ;
userId = <?=$userId?> ;
userIsPilot = <?=($userIsPilot)? 'true' : 'false'?> ;
userIsAdmin = <?=($userIsAdmin)? 'true' : 'false'?> ;
userIsInstructor = <?=($userIsInstructor)? 'true' : 'false'?> ;
userIsMechanic = <?=($userIsMechanic)? 'true' : 'false'?> ;
userIsFlightPilot = <?=($userIsFlightPilot)? 'true' : 'false'?> ;
userIsFlightManager = <?=($userIsFlightManager)? 'true' : 'false'?> ;
</script>
<!-- Matomo -->
<script type="text/javascript">
var _paq = window._paq = window._paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(['setUserId', '<?=$userName?>']);
_paq.push(["setDocumentTitle", document.domain + "/" + document.title]);
_paq.push(["setDomains", ["*.spa-aviation.be","*.ebsp.be","*.m.ebsp.be","*.m.spa-aviation.be","*.resa.spa-aviation.be"]]);
_paq.push(['enableHeartBeatTimer']);
_paq.push(['setCustomVariable', 1, "userID", <?=$userId?>, "visit"]);
_paq.push(["setCookieDomain", "*.spa-aviation.be"]);
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="//analytics.vyncke.org/";
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '5']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.type='text/javascript'; g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<!-- End Matomo Code -->
<?php // Output any page specific header
if (isset($header_postamble))
print($header_postamble) ;
$body_attributes = (isset($body_attributes)) ? $body_attributes : '' ;
?>
</head>
<body <?=$body_attributes?>>
<?php
if ($christmas_theme) {
?>
<!-- Christmas theme to be removed outside of season of course -->
<div class="snowflakes" aria-hidden="true">
<div class="snowflake">
❅
</div>
<div class="snowflake">
❆
</div>
<div class="snowflake">
❅
</div>
<div class="snowflake">
❆
</div>
<div class="snowflake">
❅
</div>
<div class="snowflake">
❆
</div>
<div class="snowflake">
❅
</div>
<div class="snowflake">
❆
</div>
<div class="snowflake">
❅
</div>
<div class="snowflake">
❆
</div>
<div class="snowflake">
❅
</div>
<div class="snowflake">
❆
</div>
</div>
<!-- end of Christmas theme -->
<?php
} // $christmas theme
?>
<nav class="navbar navbar-inverse bg-light navbar-light">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="flight_home.php">Vols découvertes/initiations <!--span style="color:red; font-weight: bold; font-style: italic;">EN TEST !!!</span--></a>
</div><!-- navbar-header -->
<div class="collapse navbar-collapse" id="myNavbar">
<ul class="nav navbar-nav">
<li class="active"><a href="flight_home.php">Home</a></li>
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">Vols<span class="caret"></span></a>
<ul class="dropdown-menu">
<!--li><a href="mobile.php">Ma prochaine</a></li-->
<li><a href="flight_create.php">Nouveau</a></li>
<li><a href="flight_list.php?completed=false">Vols prévus</a></li>
<li><a href="flight_list.php?completed=true">Vols terminés</a></li>
<li><a href="odoo_checkboncadeau.php">Bons cadeaux payés</a></li>
<li><a href="if_init_folio.php">Folio vols IF-INIT</a></li>
<li><a href="flight_bon_management.php">Désactiver bons</a></li>
<li><a href="flight_odoo.php">Export des bons vers Odoo</a></li>
<li><a href="flight_stats.php">Statistiques mensuelles</a></li>
<li><a href="https://www.tripadvisor.fr/Attraction_Review-g230026-d26689532-Reviews-Spa_Aviation-Spa_Liege_Province_The_Ardennes_Wallonia.html"><img src="https://static.tacdn.com/img2/brand_refresh/Tripadvisor_lockup_horizontal_secondary_registered.svg" height="15px"> ⧉</a></li>
</ul><!-- dropdown-menu -->
</li><!-- dropdown -->
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">Pilotes<span class="caret"></span></a>
<ul class="dropdown-menu">
<!--li><a href="mobile.php">Ma prochaine</a></li-->
<li><a href="flight_pilot_rating.php">Qualifications</a></li>
<li><a href="flight_pilot_assign.php">Dernières assignations</a></li>
<li><a href="flight_list_mine.php">Mes vols à venir</a></li>
</ul><!-- dropdown-menu -->
</li><!-- dropdown -->
<li><a href="flight_help.php">Aide</a></li>
</ul><!-- av navbar-nav -->
</div><!-- myNavbar -->
</div><!-- container fluid -->
</nav>
<div class="container-fluid">