@@ -1,8 +1,10 @@ discard block |
||
1 | 1 | </section> |
2 | 2 | <div class="pub onmap"> |
3 | 3 | <?php |
4 | - if (isset($globalPub)) print $globalPub; |
|
5 | -?> |
|
4 | + if (isset($globalPub)) { |
|
5 | + print $globalPub; |
|
6 | + } |
|
7 | + ?> |
|
6 | 8 | </div> |
7 | 9 | <footer class="container"> |
8 | 10 | <?php |
@@ -13,7 +15,10 @@ discard block |
||
13 | 15 | <?php |
14 | 16 | } |
15 | 17 | ?> |
16 | - <span>Developed in Barrie by <a href="http://www.mariotrunz.me/" target="_blank">Mario Trunz</a> & at <a href="http://www.zugaina.com" target="_blank">Zugaina</a> by Ycarus</span> - <span><a href="<?php if (isset($globalURL)) print $globalURL; ?>/about#source">Source & Credits</a></span> - <span><a href="https://www.flightairmap.com/" target="_blank">Get source code</a></span> |
|
18 | + <span>Developed in Barrie by <a href="http://www.mariotrunz.me/" target="_blank">Mario Trunz</a> & at <a href="http://www.zugaina.com" target="_blank">Zugaina</a> by Ycarus</span> - <span><a href="<?php if (isset($globalURL)) { |
|
19 | + print $globalURL; |
|
20 | +} |
|
21 | +?>/about#source">Source & Credits</a></span> - <span><a href="https://www.flightairmap.com/" target="_blank">Get source code</a></span> |
|
17 | 22 | </footer> |
18 | 23 | |
19 | 24 | <div class="notifications bottom-left"></div> |
@@ -304,7 +304,12 @@ discard block |
||
304 | 304 | <?php |
305 | 305 | } else { |
306 | 306 | ?> |
307 | - if (parseInt(lastupdateentity) < Math.floor(Date.now()-<?php if (isset($globalMapRefresh)) print $globalMapRefresh*2000; else print '60000'; ?>)) { |
|
307 | + if (parseInt(lastupdateentity) < Math.floor(Date.now()-<?php if (isset($globalMapRefresh)) { |
|
308 | + print $globalMapRefresh*2000; |
|
309 | +} else { |
|
310 | + print '60000'; |
|
311 | +} |
|
312 | +?>)) { |
|
308 | 313 | viewer.dataSources.get(dsn).entities.remove(entity); |
309 | 314 | czmlds.entities.removeById(entityid); |
310 | 315 | } |
@@ -588,7 +593,12 @@ discard block |
||
588 | 593 | if (!((isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM) || (isset($globalphpVMS) && $globalphpVMS)) && (isset($_COOKIE['polar']) && $_COOKIE['polar'] == 'true')) { |
589 | 594 | ?> |
590 | 595 | update_polarLayer(); |
591 | -setInterval(function(){update_polarLayer()},<?php if (isset($globalMapRefresh)) print $globalMapRefresh*1000*2; else print '60000'; ?>); |
|
596 | +setInterval(function(){update_polarLayer()},<?php if (isset($globalMapRefresh)) { |
|
597 | + print $globalMapRefresh*1000*2; |
|
598 | +} else { |
|
599 | + print '60000'; |
|
600 | +} |
|
601 | +?>); |
|
592 | 602 | <?php |
593 | 603 | } |
594 | 604 | ?> |
@@ -700,7 +710,12 @@ discard block |
||
700 | 710 | console.log('Reload...'); |
701 | 711 | updateData(); |
702 | 712 | } |
703 | - ,<?php if (isset($globalMapRefresh)) print $globalMapRefresh*1000; else print '30000'; ?>); |
|
713 | + ,<?php if (isset($globalMapRefresh)) { |
|
714 | + print $globalMapRefresh*1000; |
|
715 | +} else { |
|
716 | + print '30000'; |
|
717 | +} |
|
718 | +?>); |
|
704 | 719 | } else { |
705 | 720 | var clockViewModel = new Cesium.ClockViewModel(viewer.clock); |
706 | 721 | var animationViewModel = new Cesium.AnimationViewModel(clockViewModel); |
@@ -729,7 +744,12 @@ discard block |
||
729 | 744 | if ((isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM)) { |
730 | 745 | ?> |
731 | 746 | update_atcLayer(); |
732 | -setInterval(function(){update_atcLayer()},<?php if (isset($globalMapRefresh)) print $globalMapRefresh*1000*2; else print '60000'; ?>); |
|
747 | +setInterval(function(){update_atcLayer()},<?php if (isset($globalMapRefresh)) { |
|
748 | + print $globalMapRefresh*1000*2; |
|
749 | +} else { |
|
750 | + print '60000'; |
|
751 | +} |
|
752 | +?>); |
|
733 | 753 | <?php |
734 | 754 | } |
735 | 755 | ?> |
@@ -28,7 +28,9 @@ discard block |
||
28 | 28 | |
29 | 29 | // $output .= ',"clock": {"interval" : "'.date("c",time()-$globalLiveInterval).'/'.date("c").'","currentTime" : "'.date("c",time() - $globalLiveInterval).'","multiplier" : 1,"range" : "UNBOUNDED","step": "SYSTEM_CLOCK_MULTIPLIER"}'; |
30 | 30 | $output .= ',"clock": {"currentTime" : "'.date("c",time() - $globalLiveInterval).'","multiplier" : 1,"range" : "UNBOUNDED","step": "SYSTEM_CLOCK_MULTIPLIER"'; |
31 | -if (!isset($_GET['now'])) $output .= ',"interval": "'.date("Y").'-12-24T02:00:00Z/'.date("Y").'-12-25T02:00:00Z"'; |
|
31 | +if (!isset($_GET['now'])) { |
|
32 | + $output .= ',"interval": "'.date("Y").'-12-24T02:00:00Z/'.date("Y").'-12-25T02:00:00Z"'; |
|
33 | +} |
|
32 | 34 | $output .= '}'; |
33 | 35 | //$output .= ',"clock": {"currentTime" : "'.date("c",time()).'","multiplier" : 300,"range" : "UNBOUNDED","step": "TICK_DEPENDENT"}'; |
34 | 36 | //$output .= ',"clock": {"currentTime" : "%minitime%","multiplier" : 1,"range" : "UNBOUNDED","step": "SYSTEM_CLOCK_MULTIPLIER"}'; |
@@ -37,7 +39,9 @@ discard block |
||
37 | 39 | $output .= '},'; |
38 | 40 | $output .= '{'; |
39 | 41 | $output .= '"id": "santaclaus",'; |
40 | -if (!isset($_GET['now'])) $output .= '"interval": "'.date("Y").'-12-24T02:00:00Z/'.date("Y").'-12-25T02:00:00Z",'; |
|
42 | +if (!isset($_GET['now'])) { |
|
43 | + $output .= '"interval": "'.date("Y").'-12-24T02:00:00Z/'.date("Y").'-12-25T02:00:00Z",'; |
|
44 | +} |
|
41 | 45 | $output .= '"properties": {'; |
42 | 46 | $output .= '"type": "santa"'; |
43 | 47 | $output .= '},'; |
@@ -81,10 +81,15 @@ |
||
81 | 81 | // $launch_date = '15 November 1974'; |
82 | 82 | } else { |
83 | 83 | $ident = $sat; |
84 | - if (strpos($sat,'(')) $satname = $sat; |
|
85 | - else $satname = str_replace(array(' '),'-',$sat); |
|
84 | + if (strpos($sat,'(')) { |
|
85 | + $satname = $sat; |
|
86 | + } else { |
|
87 | + $satname = str_replace(array(' '),'-',$sat); |
|
88 | + } |
|
89 | + } |
|
90 | +if (!isset($satname)) { |
|
91 | + $satname = $sat; |
|
86 | 92 | } |
87 | -if (!isset($satname)) $satname = $sat; |
|
88 | 93 | if ($satname != 'santaclaus') { |
89 | 94 | $info = $Satellite->get_info(strtolower(trim($satname))); |
90 | 95 | $position = $Satellite->position($sat); |
@@ -18,7 +18,9 @@ discard block |
||
18 | 18 | public function __construct($dbc = null) { |
19 | 19 | $Connection = new Connection($dbc); |
20 | 20 | $this->db = $Connection->db; |
21 | - if ($this->db === null) die('Error: No DB connection. (Source)'); |
|
21 | + if ($this->db === null) { |
|
22 | + die('Error: No DB connection. (Source)'); |
|
23 | + } |
|
22 | 24 | } |
23 | 25 | |
24 | 26 | public function getAllLocationInfo() { |
@@ -83,7 +85,9 @@ discard block |
||
83 | 85 | $query .= " AND source_location.latitude BETWEEN ".$minlat." AND ".$maxlat." AND source_location.longitude BETWEEN ".$minlong." AND ".$maxlong." AND source_location.latitude <> 0 AND source_location.longitude <> 0"; |
84 | 86 | } |
85 | 87 | $query .= " ORDER BY last_seen DESC"; |
86 | - if ($limit) $query .= " LIMIT 1000"; |
|
88 | + if ($limit) { |
|
89 | + $query .= " LIMIT 1000"; |
|
90 | + } |
|
87 | 91 | $query_values = array(':type' => $type); |
88 | 92 | try { |
89 | 93 | $sth = $this->db->prepare($query); |
@@ -122,7 +126,9 @@ discard block |
||
122 | 126 | } |
123 | 127 | |
124 | 128 | public function addLocation($name,$latitude,$longitude,$altitude,$city,$country,$source,$logo = 'antenna.png',$type = '',$source_id = 0,$location_id = 0,$last_seen = '', $description = '') { |
125 | - if ($last_seen == '') $last_seen = date('Y-m-d H:i:s'); |
|
129 | + if ($last_seen == '') { |
|
130 | + $last_seen = date('Y-m-d H:i:s'); |
|
131 | + } |
|
126 | 132 | $query = "INSERT INTO source_location (name,latitude,longitude,altitude,country,city,logo,source,type,source_id,last_seen,location_id,description) VALUES (:name,:latitude,:longitude,:altitude,:country,:city,:logo,:source,:type,:source_id,:last_seen,:location_id,:description)"; |
127 | 133 | $query_values = array(':name' => $name,':latitude' => $latitude, ':longitude' => $longitude,':altitude' => $altitude,':city' => $city,':country' => $country,':logo' => $logo,':source' => $source,':type' => $type,':source_id' => $source_id,':last_seen' => $last_seen,':location_id' => $location_id,':description' => $description); |
128 | 134 | try { |
@@ -134,7 +140,9 @@ discard block |
||
134 | 140 | } |
135 | 141 | |
136 | 142 | public function updateLocation($name,$latitude,$longitude,$altitude,$city,$country,$source,$logo = 'antenna.png',$type = '',$source_id = 0,$location_id = 0,$last_seen = '',$description = '') { |
137 | - if ($last_seen == '') $last_seen = date('Y-m-d H:i:s'); |
|
143 | + if ($last_seen == '') { |
|
144 | + $last_seen = date('Y-m-d H:i:s'); |
|
145 | + } |
|
138 | 146 | $query = "UPDATE source_location SET latitude = :latitude,longitude = :longitude,altitude = :altitude,country = :country,city = :city,logo = :logo,type = :type, source_id = :source_id, last_seen = :last_seen,location_id = :location_id, description = :description WHERE name = :name AND source = :source"; |
139 | 147 | $query_values = array(':name' => $name,':latitude' => $latitude, ':longitude' => $longitude,':altitude' => $altitude,':city' => $city,':country' => $country,':logo' => $logo,':source' => $source,':type' => $type,':source_id' => $source_id,':last_seen' => $last_seen,':location_id' => $location_id,':description' => $description); |
140 | 148 | try { |
@@ -157,7 +165,9 @@ discard block |
||
157 | 165 | } |
158 | 166 | |
159 | 167 | public function updateLocationByLocationID($name,$latitude,$longitude,$altitude,$city,$country,$source,$logo = 'antenna.png',$type = '',$source_id = 0, $location_id,$last_seen = '',$description = '') { |
160 | - if ($last_seen == '') $last_seen = date('Y-m-d H:i:s'); |
|
168 | + if ($last_seen == '') { |
|
169 | + $last_seen = date('Y-m-d H:i:s'); |
|
170 | + } |
|
161 | 171 | $query = "UPDATE source_location SET latitude = :latitude,longitude = :longitude,altitude = :altitude,country = :country,city = :city,logo = :logo,type = :type, last_seen = :last_seen, description = :description WHERE location_id = :location_id AND source = :source AND source_id = :source_id"; |
162 | 172 | $query_values = array(':source_id' => $source_id,':latitude' => $latitude, ':longitude' => $longitude,':altitude' => $altitude,':city' => $city,':country' => $country,':logo' => $logo,':source' => $source,':type' => $type,':last_seen' => $last_seen,':location_id' => $location_id,':description' => $description); |
163 | 173 | try { |
@@ -57,21 +57,30 @@ discard block |
||
57 | 57 | |
58 | 58 | document.cookie = 'MapFormat=3d; expires=Thu, 2 Aug 2100 20:47:11 UTC; path=/' |
59 | 59 | <?php |
60 | - if (isset($_COOKIE['MapType3D'])) $MapType = $_COOKIE['MapType3D']; |
|
61 | - else $MapType = $globalMapProvider; |
|
62 | -// unset($_COOKIE['MapType']); |
|
60 | + if (isset($_COOKIE['MapType3D'])) { |
|
61 | + $MapType = $_COOKIE['MapType3D']; |
|
62 | + } else { |
|
63 | + $MapType = $globalMapProvider; |
|
64 | + } |
|
65 | + // unset($_COOKIE['MapType']); |
|
63 | 66 | |
64 | 67 | if ($MapType != 'Mapbox' && $MapType != 'OpenStreetMap' && $MapType != 'Bing-Aerial' && $MapType != 'Bing-Hybrid' && $MapType != 'Bing-Road' && $MapType != 'offline' && $MapType != 'ArcGIS-Streetmap' && $MapType != 'ArcGIS-Satellite' && $MapType != 'NatGeo-Street') { |
65 | - if (isset($globalBingMapKey) && $globalBingMapKey != '') $MapType = 'Bing-Aerial'; |
|
66 | - else $MapType = 'OpenStreetMap'; |
|
68 | + if (isset($globalBingMapKey) && $globalBingMapKey != '') { |
|
69 | + $MapType = 'Bing-Aerial'; |
|
70 | + } else { |
|
71 | + $MapType = 'OpenStreetMap'; |
|
72 | + } |
|
67 | 73 | } |
68 | 74 | if (($MapType == 'Bing-Aerial' || $MapType == 'Bing-Hybrid' || $MapType == 'Bing-Road') && (!isset($globalBingMapKey) || $globalBingMapKey == '')) { |
69 | 75 | $MapType = 'OpenStreetMap'; |
70 | 76 | } |
71 | 77 | if ($MapType == 'Mapbox') { |
72 | - if ($_COOKIE['MapTypeId'] == 'default') $MapBoxId = $globalMapboxId; |
|
73 | - else $MapBoxId = $_COOKIE['MapType3DId']; |
|
74 | -?> |
|
78 | + if ($_COOKIE['MapTypeId'] == 'default') { |
|
79 | + $MapBoxId = $globalMapboxId; |
|
80 | + } else { |
|
81 | + $MapBoxId = $_COOKIE['MapType3DId']; |
|
82 | + } |
|
83 | + ?> |
|
75 | 84 | var imProv = Cesium.MapboxImageryProvider({ |
76 | 85 | credit: 'Map data © OpenStreetMap contributors, ' + |
77 | 86 | 'CC-BY-SA, ' + |
@@ -153,13 +162,23 @@ discard block |
||
153 | 162 | credit : 'Imagery courtesy Natural Earth' |
154 | 163 | }); |
155 | 164 | <?php |
156 | - } elseif (isset($globalMapCustomLayer[$MapType])) { |
|
165 | + } elseif (isset($globalMapCustomLayer[$MapType])) { |
|
157 | 166 | $customid = $MapType; |
158 | 167 | ?> |
159 | 168 | var imProv = Cesium.createOpenStreetMapImageryProvider({ |
160 | 169 | url : '<?php print $globalMapCustomLayer[$customid]['url']; ?>', |
161 | - maximumLevel: <?php if (isset($globalMapCustomLayer[$customid]['maxZoom'])) print $globalMapCustomLayer[$customid]['maxZoom']; else print '99'; ?>, |
|
162 | - minimumLevel: <?php if (isset($globalMapCustomLayer[$customid]['minZoom'])) print $globalMapCustomLayer[$customid]['minZoom']; else print '0'; ?>, |
|
170 | + maximumLevel: <?php if (isset($globalMapCustomLayer[$customid]['maxZoom'])) { |
|
171 | + print $globalMapCustomLayer[$customid]['maxZoom']; |
|
172 | +} else { |
|
173 | + print '99'; |
|
174 | +} |
|
175 | +?>, |
|
176 | + minimumLevel: <?php if (isset($globalMapCustomLayer[$customid]['minZoom'])) { |
|
177 | + print $globalMapCustomLayer[$customid]['minZoom']; |
|
178 | +} else { |
|
179 | + print '0'; |
|
180 | +} |
|
181 | +?>, |
|
163 | 182 | credit: '<?php print $globalMapCustomLayer[$customid]['attribution']; ?>' |
164 | 183 | }); |
165 | 184 | <?php |
@@ -449,7 +468,12 @@ discard block |
||
449 | 468 | imageryProvider : imProv, |
450 | 469 | timeline : archive, |
451 | 470 | animation : false, |
452 | - shadows : <?php if ((isset($globalMap3DShadows) && $globalMap3DShadows === FALSE) || (isset($_COOKIE['map3dnoshadows']) && $_COOKIE['map3dnoshadows'] == 'true')) print 'false'; else print 'true'; ?>, |
|
471 | + shadows : <?php if ((isset($globalMap3DShadows) && $globalMap3DShadows === FALSE) || (isset($_COOKIE['map3dnoshadows']) && $_COOKIE['map3dnoshadows'] == 'true')) { |
|
472 | + print 'false'; |
|
473 | +} else { |
|
474 | + print 'true'; |
|
475 | +} |
|
476 | +?>, |
|
453 | 477 | infoBox : false, |
454 | 478 | navigationHelpButton : false, |
455 | 479 | geocoder : false, |
@@ -464,8 +488,11 @@ discard block |
||
464 | 488 | if (isset($_COOKIE['lastcentercoord']) || (isset($globalCenterLatitude) && isset($globalCenterLongitude) && $globalCenterLatitude != '' && $globalCenterLongitude != '')) { |
465 | 489 | if (isset($_COOKIE['lastcentercoord'])) { |
466 | 490 | $lastcentercoord = explode(',',$_COOKIE['lastcentercoord']); |
467 | - if (!isset($lastcentercoord[3])) $zoom = $lastcentercoord[2]*1000000.0; |
|
468 | - else $zoom = $lastcentercoord[3]; |
|
491 | + if (!isset($lastcentercoord[3])) { |
|
492 | + $zoom = $lastcentercoord[2]*1000000.0; |
|
493 | + } else { |
|
494 | + $zoom = $lastcentercoord[3]; |
|
495 | + } |
|
469 | 496 | $viewcenterlatitude = $lastcentercoord[0]; |
470 | 497 | $viewcenterlongitude = $lastcentercoord[1]; |
471 | 498 | } else { |
@@ -597,7 +624,12 @@ discard block |
||
597 | 624 | ?> |
598 | 625 | |
599 | 626 | update_locationsLayer(); |
600 | -setInterval(function(){update_locationsLayer()},<?php if (isset($globalMapRefresh)) print $globalMapRefresh*1000*2; else print '60000'; ?>); |
|
627 | +setInterval(function(){update_locationsLayer()},<?php if (isset($globalMapRefresh)) { |
|
628 | + print $globalMapRefresh*1000*2; |
|
629 | +} else { |
|
630 | + print '60000'; |
|
631 | +} |
|
632 | +?>); |
|
601 | 633 | |
602 | 634 | var currentposition; |
603 | 635 | viewer.camera.moveEnd.addEventListener(function() { |
@@ -755,5 +787,10 @@ discard block |
||
755 | 787 | } |
756 | 788 | } |
757 | 789 | } |
758 | - ,<?php if (isset($globalMapRefresh)) print $globalMapRefresh*1000; else print '30000'; ?>); |
|
790 | + ,<?php if (isset($globalMapRefresh)) { |
|
791 | + print $globalMapRefresh*1000; |
|
792 | +} else { |
|
793 | + print '30000'; |
|
794 | +} |
|
795 | +?>); |
|
759 | 796 | } |
@@ -15,8 +15,12 @@ discard block |
||
15 | 15 | } else if($_GET['start_date'] == "" && $_GET['end_date'] != ""){ |
16 | 16 | $end_date = date("Y-m-d H:i:s", strtotime("2014-04-12")).",".$_GET['end_date'].":00"; |
17 | 17 | $sql_date = $end_date; |
18 | - } else $sql_date = ''; |
|
19 | -} else $sql_date = ''; |
|
18 | + } else { |
|
19 | + $sql_date = ''; |
|
20 | + } |
|
21 | + } else { |
|
22 | + $sql_date = ''; |
|
23 | +} |
|
20 | 24 | |
21 | 25 | if (isset($_GET['highest_altitude'])) { |
22 | 26 | //for altitude manipulation |
@@ -30,8 +34,12 @@ discard block |
||
30 | 34 | } else if($_GET['highest_altitude'] == "" && $_GET['lowest_altitude'] != ""){ |
31 | 35 | $start_altitude = filter_input(INPUT_GET,'lowest_altitude',FILTER_SANITIZE_NUMBER_INT).",60000"; |
32 | 36 | $sql_altitude = $start_altitude; |
33 | - } else $sql_altitude = ''; |
|
34 | -} else $sql_altitude = ''; |
|
37 | + } else { |
|
38 | + $sql_altitude = ''; |
|
39 | + } |
|
40 | + } else { |
|
41 | + $sql_altitude = ''; |
|
42 | +} |
|
35 | 43 | |
36 | 44 | //calculuation for the pagination |
37 | 45 | if(!isset($_GET['limit'])) |
@@ -49,7 +57,7 @@ discard block |
||
49 | 57 | $limit_end = filter_input(INPUT_GET,'number_results',FILTER_SANITIZE_NUMBER_INT); |
50 | 58 | $absolute_difference = filter_input(INPUT_GET,'number_results',FILTER_SANITIZE_NUMBER_INT); |
51 | 59 | } |
52 | -} else { |
|
60 | +} else { |
|
53 | 61 | $limit_explode = explode(",", $_GET['limit']); |
54 | 62 | $limit_start = filter_var($limit_explode[0],FILTER_SANITIZE_NUMBER_INT); |
55 | 63 | $limit_end = filter_var($limit_explode[1],FILTER_SANITIZE_NUMBER_INT); |
@@ -70,8 +78,11 @@ discard block |
||
70 | 78 | |
71 | 79 | $date = date("c", time()); |
72 | 80 | |
73 | -if (isset($_GET['sort'])) $sort = $_GET['sort']; |
|
74 | -else $sort = ''; |
|
81 | +if (isset($_GET['sort'])) { |
|
82 | + $sort = $_GET['sort']; |
|
83 | +} else { |
|
84 | + $sort = ''; |
|
85 | +} |
|
75 | 86 | $q = filter_input(INPUT_GET,'q',FILTER_SANITIZE_STRING); |
76 | 87 | $id = filter_input(INPUT_GET,'id',FILTER_SANITIZE_STRING); |
77 | 88 | $registration = filter_input(INPUT_GET,'registratrion',FILTER_SANITIZE_STRING); |
@@ -15,8 +15,12 @@ discard block |
||
15 | 15 | } else if($_GET['start_date'] == "" && $_GET['end_date'] != ""){ |
16 | 16 | $end_date = date("Y-m-d H:i:s", strtotime("2014-04-12")).",".$_GET['end_date'].":00"; |
17 | 17 | $sql_date = $end_date; |
18 | - } else $sql_date = ''; |
|
19 | -} else $sql_date = ''; |
|
18 | + } else { |
|
19 | + $sql_date = ''; |
|
20 | + } |
|
21 | + } else { |
|
22 | + $sql_date = ''; |
|
23 | +} |
|
20 | 24 | |
21 | 25 | if (isset($_GET['highest_altitude'])) { |
22 | 26 | //for altitude manipulation |
@@ -30,8 +34,12 @@ discard block |
||
30 | 34 | } else if($_GET['highest_altitude'] == "" && $_GET['lowest_altitude'] != ""){ |
31 | 35 | $start_altitude = filter_input(INPUT_GET,'lowest_altitude',FILTER_SANITIZE_NUMBER_INT).",60000"; |
32 | 36 | $sql_altitude = $start_altitude; |
33 | - } else $sql_altitude = ''; |
|
34 | -} else $sql_altitude = ''; |
|
37 | + } else { |
|
38 | + $sql_altitude = ''; |
|
39 | + } |
|
40 | + } else { |
|
41 | + $sql_altitude = ''; |
|
42 | +} |
|
35 | 43 | |
36 | 44 | //calculuation for the pagination |
37 | 45 | if(!isset($_GET['limit'])) |
@@ -48,7 +56,7 @@ discard block |
||
48 | 56 | $limit_end = filter_input(INPUT_GET,'number_results',FILTER_SANITIZE_NUMBER_INT); |
49 | 57 | $absolute_difference = filter_input(INPUT_GET,'number_results',FILTER_SANITIZE_NUMBER_INT); |
50 | 58 | } |
51 | -} else { |
|
59 | +} else { |
|
52 | 60 | $limit_explode = explode(",", $_GET['limit']); |
53 | 61 | $limit_start = filter_var($limit_explode[0],FILTER_SANITIZE_NUMBER_INT); |
54 | 62 | $limit_end = filter_var($limit_explode[1],FILTER_SANITIZE_NUMBER_INT); |
@@ -66,8 +74,11 @@ discard block |
||
66 | 74 | |
67 | 75 | header("Content-type: text/plain"); |
68 | 76 | |
69 | -if (isset($_GET['sort'])) $sort = $_GET['sort']; |
|
70 | -else $sort = ''; |
|
77 | +if (isset($_GET['sort'])) { |
|
78 | + $sort = $_GET['sort']; |
|
79 | +} else { |
|
80 | + $sort = ''; |
|
81 | +} |
|
71 | 82 | $q = filter_input(INPUT_GET,'q',FILTER_SANITIZE_STRING); |
72 | 83 | $id = filter_input(INPUT_GET,'id',FILTER_SANITIZE_NUMBER_INT); |
73 | 84 | $registration = filter_input(INPUT_GET,'registratrion',FILTER_SANITIZE_STRING); |
@@ -15,8 +15,12 @@ discard block |
||
15 | 15 | } else if($_GET['start_date'] == "" && $_GET['end_date'] != ""){ |
16 | 16 | $end_date = date("Y-m-d H:i:s", strtotime("2014-04-12")).",".$_GET['end_date'].":00"; |
17 | 17 | $sql_date = $end_date; |
18 | - } else $sql_date = ''; |
|
19 | -} else $sql_date = ''; |
|
18 | + } else { |
|
19 | + $sql_date = ''; |
|
20 | + } |
|
21 | + } else { |
|
22 | + $sql_date = ''; |
|
23 | +} |
|
20 | 24 | |
21 | 25 | if (isset($_GET['highest_altitude'])) { |
22 | 26 | //for altitude manipulation |
@@ -30,8 +34,12 @@ discard block |
||
30 | 34 | } else if($_GET['highest_altitude'] == "" && $_GET['lowest_altitude'] != ""){ |
31 | 35 | $start_altitude = filter_input(INPUT_GET,'lowest_altitude',FILTER_SANITIZE_NUMBER_INT).",60000"; |
32 | 36 | $sql_altitude = $start_altitude; |
33 | - } else $sql_altitude = ''; |
|
34 | -} else $sql_altitude = ''; |
|
37 | + } else { |
|
38 | + $sql_altitude = ''; |
|
39 | + } |
|
40 | + } else { |
|
41 | + $sql_altitude = ''; |
|
42 | +} |
|
35 | 43 | |
36 | 44 | //calculuation for the pagination |
37 | 45 | if(!isset($_GET['limit'])) { |
@@ -47,7 +55,7 @@ discard block |
||
47 | 55 | $limit_end = filter_input(INPUT_GET,'number_results',FILTER_SANITIZE_NUMBER_INT); |
48 | 56 | $absolute_difference = filter_input(INPUT_GET,'number_results',FILTER_SANITIZE_NUMBER_INT); |
49 | 57 | } |
50 | -} else { |
|
58 | +} else { |
|
51 | 59 | $limit_explode = explode(",", $_GET['limit']); |
52 | 60 | $limit_start = filter_var($limit_explode[0],FILTER_SANITIZE_NUMBER_INT); |
53 | 61 | $limit_end = filter_var($limit_explode[1],FILTER_SANITIZE_NUMBER_INT); |
@@ -66,8 +74,11 @@ discard block |
||
66 | 74 | header('Content-Type: application/rss+xml; charset=utf-8'); |
67 | 75 | |
68 | 76 | $date = date("D, d M Y H:i:s T", time()); |
69 | -if (isset($_GET['sort'])) $sort = $_GET['sort']; |
|
70 | -else $sort = ''; |
|
77 | +if (isset($_GET['sort'])) { |
|
78 | + $sort = $_GET['sort']; |
|
79 | +} else { |
|
80 | + $sort = ''; |
|
81 | +} |
|
71 | 82 | $q = filter_input(INPUT_GET,'q',FILTER_SANITIZE_STRING); |
72 | 83 | $id = filter_input(INPUT_GET,'id',FILTER_SANITIZE_NUMBER_INT); |
73 | 84 | $registration = filter_input(INPUT_GET,'registratrion',FILTER_SANITIZE_STRING); |