@@ -56,11 +56,11 @@ discard block |
||
| 56 | 56 | $s3 = sin($bank/2); |
| 57 | 57 | $c1c2 = $c1*$c2; |
| 58 | 58 | $s1s2 = $s1*$s2; |
| 59 | - $w =$c1c2*$c3 - $s1s2*$s3; |
|
| 60 | - $x =$c1c2*$s3 + $s1s2*$c3; |
|
| 61 | - $y =$s1*$c2*$c3 + $c1*$s2*$s3; |
|
| 62 | - $z =$c1*$s2*$c3 - $s1*$c2*$s3; |
|
| 63 | - return array('x' => $x,'y' => $y,'z' => $z,'w' => $w); |
|
| 59 | + $w = $c1c2*$c3 - $s1s2*$s3; |
|
| 60 | + $x = $c1c2*$s3 + $s1s2*$c3; |
|
| 61 | + $y = $s1*$c2*$c3 + $c1*$s2*$s3; |
|
| 62 | + $z = $c1*$s2*$c3 - $s1*$c2*$s3; |
|
| 63 | + return array('x' => $x, 'y' => $y, 'z' => $z, 'w' => $w); |
|
| 64 | 64 | // return array('x' => '0.0','y' => '-0.931','z' => '0.0','w' => '0.365'); |
| 65 | 65 | |
| 66 | 66 | } |
@@ -81,17 +81,17 @@ discard block |
||
| 81 | 81 | $min = false; |
| 82 | 82 | $allhistory = false; |
| 83 | 83 | $filter['source'] = array(); |
| 84 | -if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalVATSIM) && $globalVATSIM && isset($_COOKIE['filter_ShowVATSIM']) && $_COOKIE['filter_ShowVATSIM'] == 'true') $filter['source'] = array_merge($filter['source'],array('vatsimtxt')); |
|
| 85 | -if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalIVAO) && $globalIVAO && isset($_COOKIE['filter_ShowIVAO']) && $_COOKIE['filter_ShowIVAO'] == 'true') $filter['source'] = array_merge($filter['source'],array('whazzup')); |
|
| 86 | -if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalphpVMS) && $globalphpVMS && isset($_COOKIE['filter_ShowVMS']) && $_COOKIE['filter_ShowVMS'] == 'true') $filter['source'] = array_merge($filter['source'],array('phpvmacars')); |
|
| 87 | -if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalSBS1) && $globalSBS1 && isset($_COOKIE['filter_ShowSBS1']) && $_COOKIE['filter_ShowSBS1'] == 'true') $filter['source'] = array_merge($filter['source'],array('sbs','famaprs')); |
|
| 88 | -if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalAPRS) && $globalAPRS && isset($_COOKIE['filter_ShowAPRS']) && $_COOKIE['filter_ShowAPRS'] == 'true') $filter['source'] = array_merge($filter['source'],array('aprs')); |
|
| 89 | -if (isset($_COOKIE['filter_ident']) && $_COOKIE['filter_ident'] != '') $filter['ident'] = filter_var($_COOKIE['filter_ident'],FILTER_SANITIZE_STRING); |
|
| 90 | -if (isset($_COOKIE['filter_mmsi']) && $_COOKIE['filter_mmsi'] != '') $filter['mmsi'] = filter_var($_COOKIE['filter_mmsi'],FILTER_SANITIZE_STRING); |
|
| 91 | -if (isset($_COOKIE['filter_Airlines']) && $_COOKIE['filter_Airlines'] != '') $filter['airlines'] = filter_var_array(explode(',',$_COOKIE['filter_Airlines']),FILTER_SANITIZE_STRING); |
|
| 92 | -if (isset($_COOKIE['filter_Sources']) && $_COOKIE['filter_Sources'] != '') $filter['source_aprs'] = filter_var_array(explode(',',$_COOKIE['filter_Sources']),FILTER_SANITIZE_STRING); |
|
| 93 | -if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] != 'all') $filter['airlinestype'] = filter_var($_COOKIE['filter_airlinestype'],FILTER_SANITIZE_STRING); |
|
| 94 | -if (isset($_COOKIE['filter_alliance']) && $_COOKIE['filter_alliance'] != 'all') $filter['alliance'] = filter_var($_COOKIE['filter_alliance'],FILTER_SANITIZE_STRING); |
|
| 84 | +if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalVATSIM) && $globalVATSIM && isset($_COOKIE['filter_ShowVATSIM']) && $_COOKIE['filter_ShowVATSIM'] == 'true') $filter['source'] = array_merge($filter['source'], array('vatsimtxt')); |
|
| 85 | +if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalIVAO) && $globalIVAO && isset($_COOKIE['filter_ShowIVAO']) && $_COOKIE['filter_ShowIVAO'] == 'true') $filter['source'] = array_merge($filter['source'], array('whazzup')); |
|
| 86 | +if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalphpVMS) && $globalphpVMS && isset($_COOKIE['filter_ShowVMS']) && $_COOKIE['filter_ShowVMS'] == 'true') $filter['source'] = array_merge($filter['source'], array('phpvmacars')); |
|
| 87 | +if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalSBS1) && $globalSBS1 && isset($_COOKIE['filter_ShowSBS1']) && $_COOKIE['filter_ShowSBS1'] == 'true') $filter['source'] = array_merge($filter['source'], array('sbs', 'famaprs')); |
|
| 88 | +if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalAPRS) && $globalAPRS && isset($_COOKIE['filter_ShowAPRS']) && $_COOKIE['filter_ShowAPRS'] == 'true') $filter['source'] = array_merge($filter['source'], array('aprs')); |
|
| 89 | +if (isset($_COOKIE['filter_ident']) && $_COOKIE['filter_ident'] != '') $filter['ident'] = filter_var($_COOKIE['filter_ident'], FILTER_SANITIZE_STRING); |
|
| 90 | +if (isset($_COOKIE['filter_mmsi']) && $_COOKIE['filter_mmsi'] != '') $filter['mmsi'] = filter_var($_COOKIE['filter_mmsi'], FILTER_SANITIZE_STRING); |
|
| 91 | +if (isset($_COOKIE['filter_Airlines']) && $_COOKIE['filter_Airlines'] != '') $filter['airlines'] = filter_var_array(explode(',', $_COOKIE['filter_Airlines']), FILTER_SANITIZE_STRING); |
|
| 92 | +if (isset($_COOKIE['filter_Sources']) && $_COOKIE['filter_Sources'] != '') $filter['source_aprs'] = filter_var_array(explode(',', $_COOKIE['filter_Sources']), FILTER_SANITIZE_STRING); |
|
| 93 | +if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] != 'all') $filter['airlinestype'] = filter_var($_COOKIE['filter_airlinestype'], FILTER_SANITIZE_STRING); |
|
| 94 | +if (isset($_COOKIE['filter_alliance']) && $_COOKIE['filter_alliance'] != 'all') $filter['alliance'] = filter_var($_COOKIE['filter_alliance'], FILTER_SANITIZE_STRING); |
|
| 95 | 95 | /* |
| 96 | 96 | if (isset($globalMapPopup) && !$globalMapPopup && !(isset($_COOKIE['flightpopup']) && $_COOKIE['flightpopup'] == 'true')) { |
| 97 | 97 | $min = true; |
@@ -138,12 +138,12 @@ discard block |
||
| 138 | 138 | $from_archive = true; |
| 139 | 139 | // $begindate = filter_input(INPUT_GET,'begindate',FILTER_VALIDATE_REGEXP,array("options"=>array("regexp"=>'~^\d{4}/\d{2}/\d{2}$~'))); |
| 140 | 140 | // $enddate = filter_input(INPUT_GET,'enddate',FILTER_VALIDATE_REGEXP,array("options"=>array("regexp"=>'~^\d{4}/\d{2}/\d{2}$~'))); |
| 141 | - $begindate = filter_input(INPUT_GET,'begindate',FILTER_SANITIZE_NUMBER_INT); |
|
| 142 | - $enddate = filter_input(INPUT_GET,'enddate',FILTER_SANITIZE_NUMBER_INT); |
|
| 143 | - $archivespeed = filter_input(INPUT_GET,'speed',FILTER_SANITIZE_NUMBER_INT); |
|
| 144 | - $begindate = date('Y-m-d H:i:s',$begindate); |
|
| 145 | - $enddate = date('Y-m-d H:i:s',$enddate); |
|
| 146 | - $spotter_array = $SpotterArchive->getMinLiveSpotterDataPlayback($begindate,$enddate,$filter); |
|
| 141 | + $begindate = filter_input(INPUT_GET, 'begindate', FILTER_SANITIZE_NUMBER_INT); |
|
| 142 | + $enddate = filter_input(INPUT_GET, 'enddate', FILTER_SANITIZE_NUMBER_INT); |
|
| 143 | + $archivespeed = filter_input(INPUT_GET, 'speed', FILTER_SANITIZE_NUMBER_INT); |
|
| 144 | + $begindate = date('Y-m-d H:i:s', $begindate); |
|
| 145 | + $enddate = date('Y-m-d H:i:s', $enddate); |
|
| 146 | + $spotter_array = $SpotterArchive->getMinLiveSpotterDataPlayback($begindate, $enddate, $filter); |
|
| 147 | 147 | } elseif (isset($_COOKIE['archive']) && isset($_COOKIE['archive_begin']) && isset($_COOKIE['archive_end']) && isset($_COOKIE['archive_speed'])) { |
| 148 | 148 | $from_archive = true; |
| 149 | 149 | // $begindate = filter_input(INPUT_GET,'begindate',FILTER_VALIDATE_REGEXP,array("options"=>array("regexp"=>'~^\d{4}/\d{2}/\d{2}$~'))); |
@@ -153,46 +153,46 @@ discard block |
||
| 153 | 153 | $begindate = $_COOKIE['archive_begin']; |
| 154 | 154 | $enddate = $_COOKIE['archive_end']; |
| 155 | 155 | |
| 156 | - $archivespeed = filter_var($_COOKIE['archive_speed'],FILTER_SANITIZE_NUMBER_INT); |
|
| 157 | - $begindate = date('Y-m-d H:i:s',$begindate); |
|
| 158 | - $enddate = date('Y-m-d H:i:s',$enddate); |
|
| 156 | + $archivespeed = filter_var($_COOKIE['archive_speed'], FILTER_SANITIZE_NUMBER_INT); |
|
| 157 | + $begindate = date('Y-m-d H:i:s', $begindate); |
|
| 158 | + $enddate = date('Y-m-d H:i:s', $enddate); |
|
| 159 | 159 | // echo 'Begin : '.$begindate.' - End : '.$enddate."\n"; |
| 160 | - $spotter_array = $SpotterArchive->getMinLiveSpotterData($begindate,$enddate,$filter); |
|
| 160 | + $spotter_array = $SpotterArchive->getMinLiveSpotterData($begindate, $enddate, $filter); |
|
| 161 | 161 | } elseif ($tracker) { |
| 162 | 162 | $coord = array(); |
| 163 | 163 | if (isset($_GET['coord']) && $_GET['coord'] != '') { |
| 164 | - $coord = explode(',',$_GET['coord']); |
|
| 165 | - if (!(filter_var($coord[0],FILTER_VALIDATE_FLOAT) && filter_var($coord[1],FILTER_VALIDATE_FLOAT) && filter_var($coord[2],FILTER_VALIDATE_FLOAT) && filter_var($coord[3],FILTER_VALIDATE_FLOAT) |
|
| 164 | + $coord = explode(',', $_GET['coord']); |
|
| 165 | + if (!(filter_var($coord[0], FILTER_VALIDATE_FLOAT) && filter_var($coord[1], FILTER_VALIDATE_FLOAT) && filter_var($coord[2], FILTER_VALIDATE_FLOAT) && filter_var($coord[3], FILTER_VALIDATE_FLOAT) |
|
| 166 | 166 | && $coord[0] > -180.0 && $coord[0] < 180.0 && $coord[1] > -90.0 && $coord[1] < 90.0 && $coord[2] > -180.0 && $coord[2] < 180.0 && $coord[3] > -90.0 && $coord[3] < 90.0)) { |
| 167 | 167 | $coord = array(); |
| 168 | 168 | } |
| 169 | 169 | } |
| 170 | - $spotter_array = $TrackerLive->getMinLastLiveTrackerData($coord,$filter,true); |
|
| 170 | + $spotter_array = $TrackerLive->getMinLastLiveTrackerData($coord, $filter, true); |
|
| 171 | 171 | } elseif ($marine) { |
| 172 | 172 | $coord = array(); |
| 173 | 173 | if (isset($_GET['coord']) && $_GET['coord'] != '') { |
| 174 | - $coord = explode(',',$_GET['coord']); |
|
| 175 | - if (!(filter_var($coord[0],FILTER_VALIDATE_FLOAT) && filter_var($coord[1],FILTER_VALIDATE_FLOAT) && filter_var($coord[2],FILTER_VALIDATE_FLOAT) && filter_var($coord[3],FILTER_VALIDATE_FLOAT) |
|
| 174 | + $coord = explode(',', $_GET['coord']); |
|
| 175 | + if (!(filter_var($coord[0], FILTER_VALIDATE_FLOAT) && filter_var($coord[1], FILTER_VALIDATE_FLOAT) && filter_var($coord[2], FILTER_VALIDATE_FLOAT) && filter_var($coord[3], FILTER_VALIDATE_FLOAT) |
|
| 176 | 176 | && $coord[0] > -180.0 && $coord[0] < 180.0 && $coord[1] > -90.0 && $coord[1] < 90.0 && $coord[2] > -180.0 && $coord[2] < 180.0 && $coord[3] > -90.0 && $coord[3] < 90.0)) { |
| 177 | 177 | $coord = array(); |
| 178 | 178 | } |
| 179 | 179 | } |
| 180 | - $spotter_array = $MarineLive->getMinLastLiveMarineData($coord,$filter,true); |
|
| 180 | + $spotter_array = $MarineLive->getMinLastLiveMarineData($coord, $filter, true); |
|
| 181 | 181 | } else { |
| 182 | 182 | $coord = array(); |
| 183 | 183 | if (isset($_GET['coord']) && $_GET['coord'] != '') { |
| 184 | - $coord = explode(',',$_GET['coord']); |
|
| 185 | - if (!(filter_var($coord[0],FILTER_VALIDATE_FLOAT) && filter_var($coord[1],FILTER_VALIDATE_FLOAT) && filter_var($coord[2],FILTER_VALIDATE_FLOAT) && filter_var($coord[3],FILTER_VALIDATE_FLOAT) |
|
| 184 | + $coord = explode(',', $_GET['coord']); |
|
| 185 | + if (!(filter_var($coord[0], FILTER_VALIDATE_FLOAT) && filter_var($coord[1], FILTER_VALIDATE_FLOAT) && filter_var($coord[2], FILTER_VALIDATE_FLOAT) && filter_var($coord[3], FILTER_VALIDATE_FLOAT) |
|
| 186 | 186 | && $coord[0] > -180.0 && $coord[0] < 180.0 && $coord[1] > -90.0 && $coord[1] < 90.0 && $coord[2] > -180.0 && $coord[2] < 180.0 && $coord[3] > -90.0 && $coord[3] < 90.0)) { |
| 187 | 187 | $coord = array(); |
| 188 | 188 | } |
| 189 | 189 | } |
| 190 | - $spotter_array = $SpotterLive->getMinLastLiveSpotterData($coord,$filter,true); |
|
| 190 | + $spotter_array = $SpotterLive->getMinLastLiveSpotterData($coord, $filter, true); |
|
| 191 | 191 | } |
| 192 | 192 | //print_r($spotter_array); |
| 193 | 193 | if (!empty($spotter_array) && isset($coord)) { |
| 194 | 194 | if (isset($_GET['archive'])) { |
| 195 | - $flightcnt = $SpotterArchive->getLiveSpotterCount($begindate,$enddate,$filter); |
|
| 195 | + $flightcnt = $SpotterArchive->getLiveSpotterCount($begindate, $enddate, $filter); |
|
| 196 | 196 | } elseif ($tracker) { |
| 197 | 197 | $flightcnt = $TrackerLive->getLiveTrackerCount($filter); |
| 198 | 198 | } elseif ($marine) { |
@@ -203,15 +203,15 @@ discard block |
||
| 203 | 203 | if ($flightcnt == '') $flightcnt = 0; |
| 204 | 204 | } else $flightcnt = 0; |
| 205 | 205 | |
| 206 | -$sqltime = round(microtime(true)-$begintime,2); |
|
| 206 | +$sqltime = round(microtime(true) - $begintime, 2); |
|
| 207 | 207 | $minitime = time(); |
| 208 | 208 | $maxitime = 0; |
| 209 | -$lastupdate = filter_input(INPUT_GET,'update',FILTER_SANITIZE_NUMBER_INT); |
|
| 209 | +$lastupdate = filter_input(INPUT_GET, 'update', FILTER_SANITIZE_NUMBER_INT); |
|
| 210 | 210 | $modelsdb = array(); |
| 211 | 211 | if (file_exists(dirname(__FILE__).'/models/modelsdb')) { |
| 212 | - if (($handle = fopen(dirname(__FILE__).'/models/modelsdb','r')) !== FALSE) { |
|
| 213 | - while (($row = fgetcsv($handle,1000)) !== FALSE) { |
|
| 214 | - if (isset($row[1]) ){ |
|
| 212 | + if (($handle = fopen(dirname(__FILE__).'/models/modelsdb', 'r')) !== FALSE) { |
|
| 213 | + while (($row = fgetcsv($handle, 1000)) !== FALSE) { |
|
| 214 | + if (isset($row[1])) { |
|
| 215 | 215 | $model = $row[0]; |
| 216 | 216 | $modelsdb[$model] = $row[1]; |
| 217 | 217 | } |
@@ -221,9 +221,9 @@ discard block |
||
| 221 | 221 | } |
| 222 | 222 | $modelsdb2 = array(); |
| 223 | 223 | if (file_exists(dirname(__FILE__).'/models/gltf2/modelsdb')) { |
| 224 | - if (($handle = fopen(dirname(__FILE__).'/models/gltf2/modelsdb','r')) !== FALSE) { |
|
| 225 | - while (($row = fgetcsv($handle,1000)) !== FALSE) { |
|
| 226 | - if (isset($row[1]) ){ |
|
| 224 | + if (($handle = fopen(dirname(__FILE__).'/models/gltf2/modelsdb', 'r')) !== FALSE) { |
|
| 225 | + while (($row = fgetcsv($handle, 1000)) !== FALSE) { |
|
| 226 | + if (isset($row[1])) { |
|
| 227 | 227 | $model = $row[0]; |
| 228 | 228 | $modelsdb2[$model] = $row[1]; |
| 229 | 229 | } |
@@ -261,7 +261,7 @@ discard block |
||
| 261 | 261 | if (!empty($spotter_array) && is_array($spotter_array)) |
| 262 | 262 | { |
| 263 | 263 | $nblatlong = 0; |
| 264 | - foreach($spotter_array as $spotter_item) |
|
| 264 | + foreach ($spotter_array as $spotter_item) |
|
| 265 | 265 | { |
| 266 | 266 | $j++; |
| 267 | 267 | //if (isset($spotter_item['format_source']) && $spotter_item['format_source'] == 'airwhere') $heightrelative = 'RELATIVE_TO_GROUND'; |
@@ -303,9 +303,9 @@ discard block |
||
| 303 | 303 | $output .= '"lastupdate": "'.$lastupdate.'",'; |
| 304 | 304 | if (isset($spotter_item['format_source'])) $output .= '"format": "'.$spotter_item['format_source'].'",'; |
| 305 | 305 | if ($tracker) { |
| 306 | - $output.= '"type": "tracker"'; |
|
| 306 | + $output .= '"type": "tracker"'; |
|
| 307 | 307 | } elseif ($marine) { |
| 308 | - $output.= '"type": "marine"'; |
|
| 308 | + $output .= '"type": "marine"'; |
|
| 309 | 309 | } else { |
| 310 | 310 | if (isset($globalMap3DLiveries) && $globalMap3DLiveries) { |
| 311 | 311 | $aircraft_icao = $spotter_item['aircraft_icao']; |
@@ -319,14 +319,14 @@ discard block |
||
| 319 | 319 | if (isset($airline_icao)) { |
| 320 | 320 | $imagefile = $aircraft_icao.'-'.$airline_icao.'.png'; |
| 321 | 321 | if (file_exists(dirname(__FILE__).'/models/gltf2/liveries/'.$imagefile)) { |
| 322 | - $output.= '"liveries": "'.$globalURL.'/models/gltf2/liveries/'.$imagefile.'",'; |
|
| 322 | + $output .= '"liveries": "'.$globalURL.'/models/gltf2/liveries/'.$imagefile.'",'; |
|
| 323 | 323 | } |
| 324 | 324 | } |
| 325 | 325 | } |
| 326 | - if ($ident != '') $output.= '"ident": "'.$ident.'",'; |
|
| 326 | + if ($ident != '') $output .= '"ident": "'.$ident.'",'; |
|
| 327 | 327 | } |
| 328 | - $output.= '"gltf2": %gltf2%,'; |
|
| 329 | - $output.= '"type": "flight"'; |
|
| 328 | + $output .= '"gltf2": %gltf2%,'; |
|
| 329 | + $output .= '"type": "flight"'; |
|
| 330 | 330 | } |
| 331 | 331 | $output .= '},'; |
| 332 | 332 | |
@@ -679,8 +679,8 @@ discard block |
||
| 679 | 679 | $output .= '},'; |
| 680 | 680 | } |
| 681 | 681 | } |
| 682 | - if (isset($onground) && $onground) $output = str_replace('%onground%','true',$output); |
|
| 683 | - else $output = str_replace('%onground%','false',$output); |
|
| 682 | + if (isset($onground) && $onground) $output = str_replace('%onground%', 'true', $output); |
|
| 683 | + else $output = str_replace('%onground%', 'false', $output); |
|
| 684 | 684 | |
| 685 | 685 | // $output .= '"heightReference": "CLAMP_TO_GROUND",'; |
| 686 | 686 | //$output .= '"heightReference": "'.$heightrelative.'",'; |
@@ -695,7 +695,7 @@ discard block |
||
| 695 | 695 | $output .= '"cartographicDegrees": ['; |
| 696 | 696 | if ($minitime > strtotime($spotter_item['date'])) $minitime = strtotime($spotter_item['date']); |
| 697 | 697 | if ($maxitime < strtotime($spotter_item['date'])) $maxitime = strtotime($spotter_item['date']); |
| 698 | - $output .= '"'.date("c",strtotime($spotter_item['date'])).'", '; |
|
| 698 | + $output .= '"'.date("c", strtotime($spotter_item['date'])).'", '; |
|
| 699 | 699 | $output .= $spotter_item['longitude'].', '; |
| 700 | 700 | $output .= $spotter_item['latitude']; |
| 701 | 701 | $prevlong = $spotter_item['longitude']; |
@@ -723,8 +723,8 @@ discard block |
||
| 723 | 723 | //$quat = quaternionrotate(deg2rad($spotter_item['heading']),deg2rad(0),deg2rad(0)); |
| 724 | 724 | //$orientation .= '"'.date("c",strtotime($spotter_item['date'])).'",'.$quat['x'].','.$quat['y'].','.$quat['z'].','.$quat['w']; |
| 725 | 725 | } else { |
| 726 | - $nblatlong = $nblatlong+1; |
|
| 727 | - $output .= ',"'.date("c",strtotime($spotter_item['date'])).'", '; |
|
| 726 | + $nblatlong = $nblatlong + 1; |
|
| 727 | + $output .= ',"'.date("c", strtotime($spotter_item['date'])).'", '; |
|
| 728 | 728 | if ($maxitime < strtotime($spotter_item['date'])) $maxitime = strtotime($spotter_item['date']); |
| 729 | 729 | if ($spotter_item['ground_speed'] == 0) { |
| 730 | 730 | $output .= $prevlong.', '; |
@@ -764,17 +764,17 @@ discard block |
||
| 764 | 764 | } |
| 765 | 765 | $output .= ']'; |
| 766 | 766 | if (isset($globalArchive) && $globalArchive === TRUE) { |
| 767 | - if ((time()-$globalLiveInterval) > $minitime) { |
|
| 768 | - if (time()-$globalLiveInterval > $maxitime) { |
|
| 769 | - $output = str_replace('%minitime%',date("c",$maxitime),$output); |
|
| 767 | + if ((time() - $globalLiveInterval) > $minitime) { |
|
| 768 | + if (time() - $globalLiveInterval > $maxitime) { |
|
| 769 | + $output = str_replace('%minitime%', date("c", $maxitime), $output); |
|
| 770 | 770 | } else { |
| 771 | - $output = str_replace('%minitime%',date("c",time()-$globalLiveInterval),$output); |
|
| 771 | + $output = str_replace('%minitime%', date("c", time() - $globalLiveInterval), $output); |
|
| 772 | 772 | } |
| 773 | 773 | } |
| 774 | - else $output = str_replace('%minitime%',date("c",$minitime),$output); |
|
| 775 | -} else $output = str_replace('%minitime%',date("c",$minitime),$output); |
|
| 776 | -$output = str_replace('%maxitime%',date("c",$maxitime),$output); |
|
| 777 | -if ($gltf2) $output = str_replace('%gltf2%','true',$output); |
|
| 778 | -else $output = str_replace('%gltf2%','false',$output); |
|
| 774 | + else $output = str_replace('%minitime%', date("c", $minitime), $output); |
|
| 775 | +} else $output = str_replace('%minitime%', date("c", $minitime), $output); |
|
| 776 | +$output = str_replace('%maxitime%', date("c", $maxitime), $output); |
|
| 777 | +if ($gltf2) $output = str_replace('%gltf2%', 'true', $output); |
|
| 778 | +else $output = str_replace('%gltf2%', 'false', $output); |
|
| 779 | 779 | print $output; |
| 780 | 780 | ?> |
@@ -11,9 +11,9 @@ discard block |
||
| 11 | 11 | ?> |
| 12 | 12 | <div class="sub-menu sub-menu-container"> |
| 13 | 13 | <ul class="nav nav-pills"> |
| 14 | - <li><a href="<?php print $globalURL; ?>/owner/<?php print $owner; ?><?php if (isset($year) && $year != '') echo '/'.$year; ?><?php if (isset($month) && $month != '') echo '/'.$month; ?>" <?php if (strtolower($current_page) == "owner-detailed"){ print 'class="active"'; } ?>><?php echo _("Detailed"); ?></a></li> |
|
| 14 | + <li><a href="<?php print $globalURL; ?>/owner/<?php print $owner; ?><?php if (isset($year) && $year != '') echo '/'.$year; ?><?php if (isset($month) && $month != '') echo '/'.$month; ?>" <?php if (strtolower($current_page) == "owner-detailed") { print 'class="active"'; } ?>><?php echo _("Detailed"); ?></a></li> |
|
| 15 | 15 | <li class="dropdown"> |
| 16 | - <a class="dropdown-toggle <?php if(strtolower($current_page) == "owner-statistics-aircraft" || strtolower($current_page) == "owner-statistics-registration" || strtolower($current_page) == "owner-statistics-manufacturer"){ print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
| 16 | + <a class="dropdown-toggle <?php if (strtolower($current_page) == "owner-statistics-aircraft" || strtolower($current_page) == "owner-statistics-registration" || strtolower($current_page) == "owner-statistics-manufacturer") { print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
| 17 | 17 | <?php echo _("Aircraft"); ?> <span class="caret"></span> |
| 18 | 18 | </a> |
| 19 | 19 | <ul class="dropdown-menu" role="menu"> |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | </ul> |
| 24 | 24 | </li> |
| 25 | 25 | <li class="dropdown"> |
| 26 | - <a class="dropdown-toggle <?php if(strtolower($current_page) == "owner-statistics-departure-airport" || strtolower($current_page) == "owner-statistics-departure-airport-country" || strtolower($current_page) == "owner-statistics-arrival-airport" || strtolower($current_page) == "owner-statistics-arrival-airport-country"){ print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
| 26 | + <a class="dropdown-toggle <?php if (strtolower($current_page) == "owner-statistics-departure-airport" || strtolower($current_page) == "owner-statistics-departure-airport-country" || strtolower($current_page) == "owner-statistics-arrival-airport" || strtolower($current_page) == "owner-statistics-arrival-airport-country") { print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
| 27 | 27 | <?php echo _("Airport"); ?> <span class="caret"></span> |
| 28 | 28 | </a> |
| 29 | 29 | <ul class="dropdown-menu" role="menu"> |
@@ -33,8 +33,8 @@ discard block |
||
| 33 | 33 | <li><a href="<?php print $globalURL; ?>/owner/statistics/arrival-airport-country/<?php print $owner; ?><?php if (isset($year) && $year != '') echo '/'.$year; ?><?php if (isset($month) && $month != '') echo '/'.$month; ?>"><?php echo _("Arrival Airport by Country"); ?></a></li> |
| 34 | 34 | </ul> |
| 35 | 35 | </li> |
| 36 | - <li><a href="<?php print $globalURL; ?>/owner/statistics/route/<?php print $owner; ?><?php if (isset($year) && $year != '') echo '/'.$year; ?><?php if (isset($month) && $month != '') echo '/'.$month; ?>" <?php if (strtolower($current_page) == "owner-statistics-route"){ print 'class="active"'; } ?>><?php echo _("Route"); ?></a></li> |
|
| 37 | - <li><a href="<?php print $globalURL; ?>/owner/statistics/time/<?php print $owner; ?><?php if (isset($year) && $year != '') echo '/'.$year; ?><?php if (isset($month) && $month != '') echo '/'.$month; ?>" <?php if (strtolower($current_page) == "owner-statistics-time"){ print 'class="active"'; } ?>><?php echo _("Time"); ?></a></li> |
|
| 36 | + <li><a href="<?php print $globalURL; ?>/owner/statistics/route/<?php print $owner; ?><?php if (isset($year) && $year != '') echo '/'.$year; ?><?php if (isset($month) && $month != '') echo '/'.$month; ?>" <?php if (strtolower($current_page) == "owner-statistics-route") { print 'class="active"'; } ?>><?php echo _("Route"); ?></a></li> |
|
| 37 | + <li><a href="<?php print $globalURL; ?>/owner/statistics/time/<?php print $owner; ?><?php if (isset($year) && $year != '') echo '/'.$year; ?><?php if (isset($month) && $month != '') echo '/'.$month; ?>" <?php if (strtolower($current_page) == "owner-statistics-time") { print 'class="active"'; } ?>><?php echo _("Time"); ?></a></li> |
|
| 38 | 38 | </ul> |
| 39 | 39 | </div> |
| 40 | 40 | <?php |