@@ -5,14 +5,14 @@ discard block |
||
5 | 5 | require_once('require/class.Language.php'); |
6 | 6 | require_once('require/class.MarineArchive.php'); |
7 | 7 | |
8 | -if (!isset($_GET['race'])){ |
|
8 | +if (!isset($_GET['race'])) { |
|
9 | 9 | header('Location: '.$globalURL.'/'); |
10 | 10 | } else { |
11 | 11 | $type = 'marine'; |
12 | 12 | $Marine = new Marine(); |
13 | 13 | $MarineArchive = new MarineArchive(); |
14 | 14 | //calculuation for the pagination |
15 | - if(!isset($_GET['limit'])) |
|
15 | + if (!isset($_GET['limit'])) |
|
16 | 16 | { |
17 | 17 | $limit_start = 0; |
18 | 18 | $limit_end = 25; |
@@ -33,23 +33,23 @@ discard block |
||
33 | 33 | |
34 | 34 | $page_url = $globalURL.'/marine/race/'.$_GET['race']; |
35 | 35 | |
36 | - $race = filter_input(INPUT_GET,'race',FILTER_SANITIZE_STRING); |
|
37 | - $sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
38 | - $year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT); |
|
39 | - $month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT); |
|
36 | + $race = filter_input(INPUT_GET, 'race', FILTER_SANITIZE_STRING); |
|
37 | + $sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
38 | + $year = filter_input(INPUT_GET, 'year', FILTER_SANITIZE_NUMBER_INT); |
|
39 | + $month = filter_input(INPUT_GET, 'month', FILTER_SANITIZE_NUMBER_INT); |
|
40 | 40 | $filter = array(); |
41 | - if ($year != '') $filter = array_merge($filter,array('year' => $year)); |
|
42 | - if ($month != '') $filter = array_merge($filter,array('month' => $month)); |
|
41 | + if ($year != '') $filter = array_merge($filter, array('year' => $year)); |
|
42 | + if ($month != '') $filter = array_merge($filter, array('month' => $month)); |
|
43 | 43 | if ($sort != '') |
44 | 44 | { |
45 | - $spotter_array = $Marine->getMarineDataByRace($race,$limit_start.",".$absolute_difference, $sort,$filter); |
|
45 | + $spotter_array = $Marine->getMarineDataByRace($race, $limit_start.",".$absolute_difference, $sort, $filter); |
|
46 | 46 | /* |
47 | 47 | if (empty($spotter_array) && isset($globalArchiveResults) && $globalArchiveResults) { |
48 | 48 | $spotter_array = $MarineArchive->getMarineDataByRace($race,$limit_start.",".$absolute_difference, $sort,$filter); |
49 | 49 | } |
50 | 50 | */ |
51 | 51 | } else { |
52 | - $spotter_array = $Marine->getMarineDataByRace($race,$limit_start.",".$absolute_difference,'',$filter); |
|
52 | + $spotter_array = $Marine->getMarineDataByRace($race, $limit_start.",".$absolute_difference, '', $filter); |
|
53 | 53 | /* |
54 | 54 | if (empty($spotter_array) && isset($globalArchiveResults) && $globalArchiveResults) { |
55 | 55 | $spotter_array = $MarineArchive->getMarineDataByRace($race,$limit_start.",".$absolute_difference,'',$filter); |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | |
60 | 60 | if (!empty($spotter_array)) |
61 | 61 | { |
62 | - $title = sprintf(_("Detailed View for %s"),$spotter_array[0]['race_name']); |
|
62 | + $title = sprintf(_("Detailed View for %s"), $spotter_array[0]['race_name']); |
|
63 | 63 | $ident = $spotter_array[0]['ident']; |
64 | 64 | if (isset($spotter_array[0]['latitude'])) $latitude = $spotter_array[0]['latitude']; |
65 | 65 | if (isset($spotter_array[0]['longitude'])) $longitude = $spotter_array[0]['longitude']; |
@@ -123,9 +123,9 @@ discard block |
||
123 | 123 | } else $flights = 0; |
124 | 124 | if ($flights == 0) |
125 | 125 | */ |
126 | - $flights = $Marine->countCaptainsByRace($race,$filter); |
|
126 | + $flights = $Marine->countCaptainsByRace($race, $filter); |
|
127 | 127 | print '<div><span class="label">'._("Captains").'</span>'.$flights.'</div>'; |
128 | - $aircraft_type = count($Marine->countAllBoatTypesByRace($race,$filter)); |
|
128 | + $aircraft_type = count($Marine->countAllBoatTypesByRace($race, $filter)); |
|
129 | 129 | print '<div><span class="label">'._("Boat type").'</span>'.$aircraft_type.'</div>'; |
130 | 130 | //$aircraft_registration = count($Marine->countAllAircraftRegistrationByrace($race,$filter)); |
131 | 131 | //print '<div><span class="label">'._("Aircraft").'</span>'.$aircraft_registration.'</div>'; |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | |
140 | 140 | //include('race-sub-menu.php'); |
141 | 141 | print '<div class="table column">'; |
142 | - print '<p>'.sprintf(_("The table below shows the detailed information of all races with the race <strong>%s</strong>."),$spotter_array[0]['race_name']).'</p>'; |
|
142 | + print '<p>'.sprintf(_("The table below shows the detailed information of all races with the race <strong>%s</strong>."), $spotter_array[0]['race_name']).'</p>'; |
|
143 | 143 | |
144 | 144 | include('table-output.php'); |
145 | 145 | print '<div class="pagination">'; |
@@ -5,14 +5,14 @@ discard block |
||
5 | 5 | require_once('require/class.Language.php'); |
6 | 6 | require_once('require/class.MarineArchive.php'); |
7 | 7 | |
8 | -if (!isset($_GET['captain'])){ |
|
8 | +if (!isset($_GET['captain'])) { |
|
9 | 9 | header('Location: '.$globalURL.'/'); |
10 | 10 | } else { |
11 | 11 | $type = 'marine'; |
12 | 12 | $Marine = new Marine(); |
13 | 13 | $MarineArchive = new MarineArchive(); |
14 | 14 | //calculuation for the pagination |
15 | - if(!isset($_GET['limit'])) |
|
15 | + if (!isset($_GET['limit'])) |
|
16 | 16 | { |
17 | 17 | $limit_start = 0; |
18 | 18 | $limit_end = 25; |
@@ -33,23 +33,23 @@ discard block |
||
33 | 33 | |
34 | 34 | $page_url = $globalURL.'/marine/captain/'.$_GET['captain']; |
35 | 35 | |
36 | - $captain = filter_input(INPUT_GET,'captain',FILTER_SANITIZE_STRING); |
|
37 | - $sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
38 | - $year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT); |
|
39 | - $month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT); |
|
36 | + $captain = filter_input(INPUT_GET, 'captain', FILTER_SANITIZE_STRING); |
|
37 | + $sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
38 | + $year = filter_input(INPUT_GET, 'year', FILTER_SANITIZE_NUMBER_INT); |
|
39 | + $month = filter_input(INPUT_GET, 'month', FILTER_SANITIZE_NUMBER_INT); |
|
40 | 40 | $filter = array(); |
41 | - if ($year != '') $filter = array_merge($filter,array('year' => $year)); |
|
42 | - if ($month != '') $filter = array_merge($filter,array('month' => $month)); |
|
41 | + if ($year != '') $filter = array_merge($filter, array('year' => $year)); |
|
42 | + if ($month != '') $filter = array_merge($filter, array('month' => $month)); |
|
43 | 43 | if ($sort != '') |
44 | 44 | { |
45 | - $spotter_array = $Marine->getMarineDataByCaptain($captain,$limit_start.",".$absolute_difference, $sort,$filter); |
|
45 | + $spotter_array = $Marine->getMarineDataByCaptain($captain, $limit_start.",".$absolute_difference, $sort, $filter); |
|
46 | 46 | /* |
47 | 47 | if (empty($spotter_array) && isset($globalArchiveResults) && $globalArchiveResults) { |
48 | 48 | $spotter_array = $MarineArchive->getMarineDataByCaptain($captain,$limit_start.",".$absolute_difference, $sort,$filter); |
49 | 49 | } |
50 | 50 | */ |
51 | 51 | } else { |
52 | - $spotter_array = $Marine->getMarineDataByCaptain($captain,$limit_start.",".$absolute_difference,'',$filter); |
|
52 | + $spotter_array = $Marine->getMarineDataByCaptain($captain, $limit_start.",".$absolute_difference, '', $filter); |
|
53 | 53 | /* |
54 | 54 | if (empty($spotter_array) && isset($globalArchiveResults) && $globalArchiveResults) { |
55 | 55 | $spotter_array = $MarineArchive->getMarineDataByCaptain($captain,$limit_start.",".$absolute_difference,'',$filter); |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | |
60 | 60 | if (!empty($spotter_array)) |
61 | 61 | { |
62 | - $title = sprintf(_("Detailed View for %s"),$spotter_array[0]['captain_name']); |
|
62 | + $title = sprintf(_("Detailed View for %s"), $spotter_array[0]['captain_name']); |
|
63 | 63 | $ident = $spotter_array[0]['ident']; |
64 | 64 | if (isset($spotter_array[0]['latitude'])) $latitude = $spotter_array[0]['latitude']; |
65 | 65 | if (isset($spotter_array[0]['longitude'])) $longitude = $spotter_array[0]['longitude']; |
@@ -123,9 +123,9 @@ discard block |
||
123 | 123 | } else $flights = 0; |
124 | 124 | if ($flights == 0) |
125 | 125 | */ |
126 | - $flights = $Marine->countRacesByCaptain($captain,$filter); |
|
126 | + $flights = $Marine->countRacesByCaptain($captain, $filter); |
|
127 | 127 | print '<div><span class="label">'._("Races").'</span>'.$flights.'</div>'; |
128 | - $aircraft_type = count($Marine->countAllBoatTypesByCaptain($captain,$filter)); |
|
128 | + $aircraft_type = count($Marine->countAllBoatTypesByCaptain($captain, $filter)); |
|
129 | 129 | print '<div><span class="label">'._("Boat type").'</span>'.$aircraft_type.'</div>'; |
130 | 130 | //$aircraft_registration = count($Marine->countAllAircraftRegistrationByCaptain($captain,$filter)); |
131 | 131 | //print '<div><span class="label">'._("Aircraft").'</span>'.$aircraft_registration.'</div>'; |
@@ -133,13 +133,13 @@ discard block |
||
133 | 133 | //print '<div><span class="label">'._("Manufacturers").'</span>'.$aircraft_manufacturer.'</div>'; |
134 | 134 | //$airlines = count($Marine->countAllAirlinesByCaptain($captain,$filter)); |
135 | 135 | //print '<div><span class="label">'._("Airlines").'</span>'.$airlines.'</div>'; |
136 | - $duration = $Marine->getRaceDurationByCaptain($captain,$filter); |
|
136 | + $duration = $Marine->getRaceDurationByCaptain($captain, $filter); |
|
137 | 137 | if ($duration != '0') print '<div><span class="label">'._("Total races spotted duration").'</span>'.$duration.'</div>'; |
138 | 138 | print '</div>'; |
139 | 139 | |
140 | 140 | //include('captain-sub-menu.php'); |
141 | 141 | print '<div class="table column">'; |
142 | - print '<p>'.sprintf(_("The table below shows the detailed information of all races with the captain <strong>%s</strong>."),$spotter_array[0]['captain_name']).'</p>'; |
|
142 | + print '<p>'.sprintf(_("The table below shows the detailed information of all races with the captain <strong>%s</strong>."), $spotter_array[0]['captain_name']).'</p>'; |
|
143 | 143 | |
144 | 144 | include('table-output.php'); |
145 | 145 | print '<div class="pagination">'; |