@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | WHERE |
36 | 36 | fk_type IN (1,2) |
37 | 37 | AND YEAR(NOW())-1 <= YEAR(llx_bbc_vols.date) |
38 | - -- AND llx_bbc_vols.fk_pilot = '.$pilot.' |
|
38 | + -- AND llx_bbc_vols.fk_pilot = '.$pilot . ' |
|
39 | 39 | |
40 | 40 | GROUP BY |
41 | 41 | llx_bbc_vols.lieuD |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | |
58 | 58 | $places = []; |
59 | 59 | |
60 | - for($i = 0; $i < $num ; $i++) { |
|
60 | + for ($i = 0; $i < $num; $i++) { |
|
61 | 61 | $properties = $this->db->fetch_array($resql); |
62 | 62 | $stat = new TakeOffPlace($properties['place']); |
63 | 63 | $places[] = $stat; |
@@ -43,8 +43,8 @@ discard block |
||
43 | 43 | ->setDate(new DateTimeImmutable($_POST['flight_date'])) |
44 | 44 | ->setLieuD($_POST['lieuD']) |
45 | 45 | ->setLieuA($_POST['lieuA']) |
46 | - ->setHeureD(new DateTimeImmutable($_POST['flight_date'].' '.$_POST['heureD'])) |
|
47 | - ->setHeureA(new DateTimeImmutable($_POST['flight_date'].' '.$_POST['heureA'])) |
|
46 | + ->setHeureD(new DateTimeImmutable($_POST['flight_date'] . ' ' . $_POST['heureD'])) |
|
47 | + ->setHeureA(new DateTimeImmutable($_POST['flight_date'] . ' ' . $_POST['heureA'])) |
|
48 | 48 | ->setBBCBallonsIdBBCBallons($_POST['ballon']) |
49 | 49 | ->setNbrPax($_POST['nbrPax']) |
50 | 50 | ->setRemarque($_POST['comm']) |
@@ -68,8 +68,8 @@ discard block |
||
68 | 68 | |
69 | 69 | $msg = '<div class="ok">L\'ajout du vol du : ' . $_POST["reday"] . '/' . $_POST["remonth"] . '/' . $_POST["reyear"] . ' s\'est correctement effectue ! </div>'; |
70 | 70 | Header("Location: card.php?id=" . $vol->id); |
71 | - }catch (\Exception $e){ |
|
72 | - $msg = '<div class="error">Erreur lors de l\'ajout du vol : ' . ($vol->error?:$e->getMessage()) . '! </div>'; |
|
71 | + } catch (\Exception $e) { |
|
72 | + $msg = '<div class="error">Erreur lors de l\'ajout du vol : ' . ($vol->error ?: $e->getMessage()) . '! </div>'; |
|
73 | 73 | } |
74 | 74 | |
75 | 75 | } |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | |
104 | 104 | <section class="bbc-style"> |
105 | 105 | |
106 | - <?php if(!empty($takeOffPlaces)): ?> |
|
106 | + <?php if (!empty($takeOffPlaces)): ?> |
|
107 | 107 | <datalist id="take_off_places_id"> |
108 | 108 | <?php foreach ($takeOffPlaces as $takeOffPlace): ?> |
109 | 109 | <option value="<?php echo $takeOffPlace->getPlace(); ?>"></option> |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | </div> |
121 | 121 | <form class="flight-form js-form" name='add' action="addFlight.php" method="post"> |
122 | 122 | <input type="hidden" name="action" value="add"/> |
123 | - <input type="hidden" name="token" value="<?php echo newToken();?>"/> |
|
123 | + <input type="hidden" name="token" value="<?php echo newToken(); ?>"/> |
|
124 | 124 | |
125 | 125 | <!-- Date et heures --> |
126 | 126 | <section class="form-section"> |
@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | <div > |
182 | 182 | <div class="form-group"> |
183 | 183 | <label class="fieldrequired"> Pilote</label> |
184 | - <?php print $html->select_dolusers($_POST["pilot"] ? $_POST["pilot"] : $user->id, 'pilot', 0, null, 0, '', '', 0,0,0,'',0,'','', true); ?> |
|
184 | + <?php print $html->select_dolusers($_POST["pilot"] ? $_POST["pilot"] : $user->id, 'pilot', 0, null, 0, '', '', 0, 0, 0, '', 0, '', '', true); ?> |
|
185 | 185 | </div> |
186 | 186 | |
187 | 187 | <div class="form-group "> |
@@ -191,7 +191,7 @@ discard block |
||
191 | 191 | </label> |
192 | 192 | <?php |
193 | 193 | //organisateur |
194 | - print $html->select_dolusers($_POST["orga"] ? $_POST["orga"] : $user->id, 'orga', 0, null, 0, '', '', 0,0,0,'',0,'','', true); |
|
194 | + print $html->select_dolusers($_POST["orga"] ? $_POST["orga"] : $user->id, 'orga', 0, null, 0, '', '', 0, 0, 0, '', 0, '', '', true); |
|
195 | 195 | ?> |
196 | 196 | </div> |
197 | 197 | |
@@ -207,7 +207,7 @@ discard block |
||
207 | 207 | |
208 | 208 | <div class="form-group"> |
209 | 209 | <label class="fieldrequired">Ballon</label> |
210 | - <?php select_balloons($_POST['ballon']?: ($mostUsedBalloon ? $mostUsedBalloon->getId() : ''), 'ballon', 0, false, true); ?> |
|
210 | + <?php select_balloons($_POST['ballon'] ?: ($mostUsedBalloon ? $mostUsedBalloon->getId() : ''), 'ballon', 0, false, true); ?> |
|
211 | 211 | </div> |
212 | 212 | |
213 | 213 | <div class="form-group"> |
@@ -245,7 +245,7 @@ discard block |
||
245 | 245 | <input type="number" |
246 | 246 | name="nbrPax" |
247 | 247 | class="flat <?php echo $validator->hasError('nbrPax') ? 'error' : '' ?>" |
248 | - value="<?php echo $_POST['nbrPax']?: 0 ?>"/> |
|
248 | + value="<?php echo $_POST['nbrPax'] ?: 0 ?>"/> |
|
249 | 249 | </div> |
250 | 250 | |
251 | 251 | <!-- passenger names --> |
@@ -276,17 +276,17 @@ discard block |
||
276 | 276 | </tr> |
277 | 277 | |
278 | 278 | <tr> |
279 | - <td class="js-receiver" data-user-id="<?php echo $user->id;?>"> |
|
279 | + <td class="js-receiver" data-user-id="<?php echo $user->id; ?>"> |
|
280 | 280 | <label class=""><?php echo $langs->trans('Qui a perçu l\'argent')?>?</label> |
281 | 281 | <?php print $html->select_dolusers( |
282 | 282 | $_POST["fk_receiver"] ? $_POST["fk_receiver"] : -1, |
283 | - 'fk_receiver', true, null, 0, '', '', 0,0,0,'',0,'','', true); ?> |
|
283 | + 'fk_receiver', true, null, 0, '', '', 0, 0, 0, '', 0, '', '', true); ?> |
|
284 | 284 | |
285 | 285 | </td> |
286 | 286 | <td> |
287 | 287 | <label> </label> |
288 | 288 | <div class="input-group"> |
289 | - <input type="number" name="cost" step="1" min="0" class="flat js-cost" value="<?php echo $_POST['cost']?:0 ?>"/> |
|
289 | + <input type="number" name="cost" step="1" min="0" class="flat js-cost" value="<?php echo $_POST['cost'] ?: 0 ?>"/> |
|
290 | 290 | <span class="input-symbol">€</span> |
291 | 291 | </div> |
292 | 292 | </td> |
@@ -297,8 +297,8 @@ discard block |
||
297 | 297 | <th>Commande(s)</th> |
298 | 298 | <th>Nombre de passagers.</th> |
299 | 299 | </tr> |
300 | - <?php if(is_array($_POST['order_passengers_count']) && !empty($_POST['order_passengers_count'])): ?> |
|
301 | - <?php foreach($_POST['order_passengers_count'] as $order => $orderQuantity): ?> |
|
300 | + <?php if (is_array($_POST['order_passengers_count']) && !empty($_POST['order_passengers_count'])): ?> |
|
301 | + <?php foreach ($_POST['order_passengers_count'] as $order => $orderQuantity): ?> |
|
302 | 302 | <tr class="order-row"> |
303 | 303 | <td> |
304 | 304 | <span class="fa fa-trash remove js-remove" data-order-id="<?php echo $order; ?>"></span> |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | $this->db = $db; |
21 | 21 | } |
22 | 22 | |
23 | - public function query($params = []){ |
|
23 | + public function query($params = []) { |
|
24 | 24 | $sql = ' |
25 | 25 | SELECT |
26 | 26 | balloon.rowid as id, |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | |
34 | 34 | WHERE |
35 | 35 | balloon.is_disable = false |
36 | - AND llx_bbc_vols.fk_pilot = '.$params['pilot'].' |
|
36 | + AND llx_bbc_vols.fk_pilot = '.$params['pilot'] . ' |
|
37 | 37 | |
38 | 38 | ORDER BY counter DESC |
39 | 39 | |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | return new Balloon(0); |
50 | 50 | } |
51 | 51 | |
52 | - for($i = 0; $i < $num ; $i++) { |
|
52 | + for ($i = 0; $i < $num; $i++) { |
|
53 | 53 | $properties = $this->db->fetch_array($resql); |
54 | 54 | return Balloon::fromArray($properties); |
55 | 55 | } |