@@ -15,7 +15,7 @@ discard block |
||
| 15 | 15 | print '<div class="column">'; |
| 16 | 16 | print '<h1>'._("Airlines").'</h1>'; |
| 17 | 17 | if (isset($_POST['airline_type'])) { |
| 18 | - $airline_type = filter_input(INPUT_POST,'airline_type',FILTER_SANITIZE_STRING); |
|
| 18 | + $airline_type = filter_input(INPUT_POST, 'airline_type', FILTER_SANITIZE_STRING); |
|
| 19 | 19 | //$airline_names = $Spotter->getAllAirlineNames($airline_type); |
| 20 | 20 | } else { |
| 21 | 21 | //$airline_names = $Spotter->getAllAirlineNames(); |
@@ -27,10 +27,10 @@ discard block |
||
| 27 | 27 | print '<div class="alphabet">'; |
| 28 | 28 | foreach ($alliances as $alliance) { |
| 29 | 29 | print '<div class="alphabet-airline alphabet-item">'; |
| 30 | - print '<a href="'.$globalURL.'/airline/alliance_'.str_replace(' ','_',$alliance['alliance']).'">'; |
|
| 31 | - if (file_exists('images/airlines/'.str_replace(' ','_',$alliance['alliance']).'.png')) |
|
| 30 | + print '<a href="'.$globalURL.'/airline/alliance_'.str_replace(' ', '_', $alliance['alliance']).'">'; |
|
| 31 | + if (file_exists('images/airlines/'.str_replace(' ', '_', $alliance['alliance']).'.png')) |
|
| 32 | 32 | { |
| 33 | - print '<img src="'.$globalURL.'/images/airlines/'.str_replace(' ','_',$alliance['alliance']).'.png" alt="'._("Click to see alliance activity").'" title="'._("Click to see alliance activity").'" /> '; |
|
| 33 | + print '<img src="'.$globalURL.'/images/airlines/'.str_replace(' ', '_', $alliance['alliance']).'.png" alt="'._("Click to see alliance activity").'" title="'._("Click to see alliance activity").'" /> '; |
|
| 34 | 34 | } else print $alliance['alliance']; |
| 35 | 35 | print '</a>'; |
| 36 | 36 | print '</div>'; |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | $Stats = new Stats(); |
| 54 | 54 | if (isset($_POST['airline_type'])) |
| 55 | 55 | { |
| 56 | - $airline_type = filter_input(INPUT_POST,'airline_type',FILTER_SANITIZE_STRING); |
|
| 56 | + $airline_type = filter_input(INPUT_POST, 'airline_type', FILTER_SANITIZE_STRING); |
|
| 57 | 57 | //$airline_names = $Stats->getAllAirlineNames($airline_type); |
| 58 | 58 | $airline_names = $Spotter->getAllAirlineNames($airline_type); |
| 59 | 59 | } else { |
@@ -66,12 +66,12 @@ discard block |
||
| 66 | 66 | } |
| 67 | 67 | $previous = null; |
| 68 | 68 | print '<div class="alphabet-legend">'; |
| 69 | - foreach($airline_names as $value) |
|
| 69 | + foreach ($airline_names as $value) |
|
| 70 | 70 | { |
| 71 | 71 | //echo $value['airline_name']."\n"; |
| 72 | 72 | //echo mb_substr($value['airline_name'],0,1).' - '.$value['airline_name']."\n"; |
| 73 | - $firstLetter = mb_strtoupper(mb_substr($value['airline_name'], 0, 1),'UTF-8'); |
|
| 74 | - if($previous !== $firstLetter) |
|
| 73 | + $firstLetter = mb_strtoupper(mb_substr($value['airline_name'], 0, 1), 'UTF-8'); |
|
| 74 | + if ($previous !== $firstLetter) |
|
| 75 | 75 | { |
| 76 | 76 | if ($previous !== null) print ' | '; |
| 77 | 77 | print '<a href="#'.$firstLetter.'">'.$firstLetter.'</a>'; |
@@ -80,11 +80,11 @@ discard block |
||
| 80 | 80 | } |
| 81 | 81 | print '</div>'; |
| 82 | 82 | $previous = null; |
| 83 | - foreach($airline_names as $value) { |
|
| 83 | + foreach ($airline_names as $value) { |
|
| 84 | 84 | $firstLetter = strtoupper(substr($value['airline_name'], 0, 1)); |
| 85 | 85 | if ($firstLetter != "") |
| 86 | 86 | { |
| 87 | - if($previous !== $firstLetter) |
|
| 87 | + if ($previous !== $firstLetter) |
|
| 88 | 88 | { |
| 89 | 89 | if ($previous !== null) print '</div>'; |
| 90 | 90 | print '<a name="'.$firstLetter.'"></a><h4 class="alphabet-header">'.$firstLetter.'</h4><div class="alphabet">'; |
@@ -31,7 +31,9 @@ discard block |
||
| 31 | 31 | if (file_exists('images/airlines/'.str_replace(' ','_',$alliance['alliance']).'.png')) |
| 32 | 32 | { |
| 33 | 33 | print '<img src="'.$globalURL.'/images/airlines/'.str_replace(' ','_',$alliance['alliance']).'.png" alt="'._("Click to see alliance activity").'" title="'._("Click to see alliance activity").'" /> '; |
| 34 | - } else print $alliance['alliance']; |
|
| 34 | + } else { |
|
| 35 | + print $alliance['alliance']; |
|
| 36 | + } |
|
| 35 | 37 | print '</a>'; |
| 36 | 38 | print '</div>'; |
| 37 | 39 | } |
@@ -40,13 +42,21 @@ discard block |
||
| 40 | 42 | } |
| 41 | 43 | print '<div class="select-item"><form action="'.$globalURL.'/airline" method="post"><select name="airline_type" class="selectpicker" data-live-search="true">'; |
| 42 | 44 | print '<option value="all"'; |
| 43 | - if ($airline_type == 'all') print 'selected="selected" '; |
|
| 45 | + if ($airline_type == 'all') { |
|
| 46 | + print 'selected="selected" '; |
|
| 47 | + } |
|
| 44 | 48 | print '>'._("All").'</option><option value="passenger"'; |
| 45 | - if ($airline_type == 'passenger') print 'selected="selected" '; |
|
| 49 | + if ($airline_type == 'passenger') { |
|
| 50 | + print 'selected="selected" '; |
|
| 51 | + } |
|
| 46 | 52 | print '>'._("Passenger").'</option><option value="cargo"'; |
| 47 | - if ($airline_type == 'cargo') print 'selected="selected" '; |
|
| 53 | + if ($airline_type == 'cargo') { |
|
| 54 | + print 'selected="selected" '; |
|
| 55 | + } |
|
| 48 | 56 | print '>'._("Cargo").'</option><option value="military"'; |
| 49 | - if ($airline_type == 'military') print 'selected="selected" '; |
|
| 57 | + if ($airline_type == 'military') { |
|
| 58 | + print 'selected="selected" '; |
|
| 59 | + } |
|
| 50 | 60 | print '>'._("Military").'</option></select>'; |
| 51 | 61 | print '<button type="submit"><i class="fa fa-angle-double-right"></i></button></form></div>'; |
| 52 | 62 | |
@@ -73,7 +83,9 @@ discard block |
||
| 73 | 83 | $firstLetter = mb_strtoupper(mb_substr($value['airline_name'], 0, 1),'UTF-8'); |
| 74 | 84 | if($previous !== $firstLetter) |
| 75 | 85 | { |
| 76 | - if ($previous !== null) print ' | '; |
|
| 86 | + if ($previous !== null) { |
|
| 87 | + print ' | '; |
|
| 88 | + } |
|
| 77 | 89 | print '<a href="#'.$firstLetter.'">'.$firstLetter.'</a>'; |
| 78 | 90 | } |
| 79 | 91 | $previous = $firstLetter; |
@@ -86,7 +98,9 @@ discard block |
||
| 86 | 98 | { |
| 87 | 99 | if($previous !== $firstLetter) |
| 88 | 100 | { |
| 89 | - if ($previous !== null) print '</div>'; |
|
| 101 | + if ($previous !== null) { |
|
| 102 | + print '</div>'; |
|
| 103 | + } |
|
| 90 | 104 | print '<a name="'.$firstLetter.'"></a><h4 class="alphabet-header">'.$firstLetter.'</h4><div class="alphabet">'; |
| 91 | 105 | } |
| 92 | 106 | $previous = $firstLetter; |
@@ -100,10 +114,14 @@ discard block |
||
| 100 | 114 | } elseif (file_exists('images/airlines/'.$value['airline_icao'].'.png')) |
| 101 | 115 | { |
| 102 | 116 | print '<img src="'.$globalURL.'/images/airlines/'.$value['airline_icao'].'.png" alt="'._("Click to see airline activity").'" title="'._("Click to see airline activity").'" /> '; |
| 103 | - if (isset($value['ban_eu']) && $value['ban_eu'] == 1) print '<img src="'.$globalURL.'/images/baneu.png" alt="'._("Banned in Europe").'" title="'._("Banned in Europe").'" /> '; |
|
| 117 | + if (isset($value['ban_eu']) && $value['ban_eu'] == 1) { |
|
| 118 | + print '<img src="'.$globalURL.'/images/baneu.png" alt="'._("Banned in Europe").'" title="'._("Banned in Europe").'" /> '; |
|
| 119 | + } |
|
| 104 | 120 | } else { |
| 105 | 121 | print $value['airline_name']; |
| 106 | - if (isset($value['ban_eu']) && $value['ban_eu'] == 1) print '<img src="'.$globalURL.'/images/baneu.png" alt="'._("Banned in Europe").'" title="'._("Banned in Europe").'" /> '; |
|
| 122 | + if (isset($value['ban_eu']) && $value['ban_eu'] == 1) { |
|
| 123 | + print '<img src="'.$globalURL.'/images/baneu.png" alt="'._("Banned in Europe").'" title="'._("Banned in Europe").'" /> '; |
|
| 124 | + } |
|
| 107 | 125 | } |
| 108 | 126 | print '</a>'; |
| 109 | 127 | print '</div>'; |
@@ -4,31 +4,31 @@ discard block |
||
| 4 | 4 | $hex = str_replace("#", "", $hex); |
| 5 | 5 | $color = array(); |
| 6 | 6 | if (strlen($hex) == 3) { |
| 7 | - $color['r'] = hexdec(substr($hex, 0, 1) . substr($hex,0,1)); |
|
| 8 | - $color['g'] = hexdec(substr($hex, 1, 1) . substr($hex,1,1)); |
|
| 9 | - $color['b'] = hexdec(substr($hex, 2, 1) . substr($hex,2,1)); |
|
| 7 | + $color['r'] = hexdec(substr($hex, 0, 1) . substr($hex,0,1)); |
|
| 8 | + $color['g'] = hexdec(substr($hex, 1, 1) . substr($hex,1,1)); |
|
| 9 | + $color['b'] = hexdec(substr($hex, 2, 1) . substr($hex,2,1)); |
|
| 10 | 10 | } else if (strlen($hex) == 6) { |
| 11 | - $color['r'] = hexdec(substr($hex, 0, 2)); |
|
| 12 | - $color['g'] = hexdec(substr($hex, 2, 2)); |
|
| 13 | - $color['b'] = hexdec(substr($hex, 4, 2)); |
|
| 11 | + $color['r'] = hexdec(substr($hex, 0, 2)); |
|
| 12 | + $color['g'] = hexdec(substr($hex, 2, 2)); |
|
| 13 | + $color['b'] = hexdec(substr($hex, 4, 2)); |
|
| 14 | 14 | } |
| 15 | 15 | return $color; |
| 16 | 16 | } |
| 17 | 17 | |
| 18 | 18 | |
| 19 | 19 | if (!isset($_GET['color']) || $_GET['color'] == '' || !preg_match('/^([a-fA-F0-9]){3}(([a-fA-F0-9]){3})?\b/',$_GET['color'])) { |
| 20 | - exit(0); |
|
| 20 | + exit(0); |
|
| 21 | 21 | } |
| 22 | 22 | $color = $_GET['color']; |
| 23 | 23 | if (!isset($_GET['filename']) || !preg_match('/^[a-z0-9-_]+\.png$/', strtolower($_GET['filename']))) { |
| 24 | - echo "Incorrect filename"; |
|
| 25 | - exit(0); |
|
| 24 | + echo "Incorrect filename"; |
|
| 25 | + exit(0); |
|
| 26 | 26 | } |
| 27 | 27 | $filename = $_GET['filename']; |
| 28 | 28 | if (file_exists(dirname(__FILE__).DIRECTORY_SEPARATOR.'cache'.DIRECTORY_SEPARATOR.$color.'-'.$filename) && is_readable(dirname(__FILE__).DIRECTORY_SEPARATOR.'cache'.DIRECTORY_SEPARATOR.$color.'-'.$filename)) { |
| 29 | - header('Content-type: image/png'); |
|
| 30 | - readfile(dirname(__FILE__).DIRECTORY_SEPARATOR.'cache'.DIRECTORY_SEPARATOR.$color.'-'.$filename); |
|
| 31 | - exit(0); |
|
| 29 | + header('Content-type: image/png'); |
|
| 30 | + readfile(dirname(__FILE__).DIRECTORY_SEPARATOR.'cache'.DIRECTORY_SEPARATOR.$color.'-'.$filename); |
|
| 31 | + exit(0); |
|
| 32 | 32 | } |
| 33 | 33 | if (isset($_GET['tracker'])) { |
| 34 | 34 | $original = dirname(__FILE__).DIRECTORY_SEPARATOR.'images'.DIRECTORY_SEPARATOR.'vehicules'.DIRECTORY_SEPARATOR.'color'.DIRECTORY_SEPARATOR.$filename; |
@@ -42,66 +42,66 @@ discard block |
||
| 42 | 42 | $original = dirname(__FILE__).DIRECTORY_SEPARATOR.'images'.DIRECTORY_SEPARATOR.'aircrafts'.DIRECTORY_SEPARATOR.'new'.DIRECTORY_SEPARATOR.$filename; |
| 43 | 43 | } |
| 44 | 44 | if (!file_exists($original)) { |
| 45 | - echo "File not found"; |
|
| 45 | + echo "File not found"; |
|
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | if (extension_loaded('gd') && function_exists('gd_info')) { |
| 49 | - $image = imagecreatefrompng($original); |
|
| 50 | - $index = imagecolorexact($image,26,49,81); |
|
| 51 | - if ($index < 0) { |
|
| 49 | + $image = imagecreatefrompng($original); |
|
| 50 | + $index = imagecolorexact($image,26,49,81); |
|
| 51 | + if ($index < 0) { |
|
| 52 | 52 | $index = imagecolorexact($image,25,49,79); |
| 53 | - } |
|
| 54 | - if ($index < 0) { |
|
| 53 | + } |
|
| 54 | + if ($index < 0) { |
|
| 55 | 55 | $index = imagecolorexact($image,0,0,0); |
| 56 | - } |
|
| 57 | - $c = hexToRGB($color); |
|
| 58 | - imagecolorset($image,$index,$c['r'],$c['g'],$c['b']); |
|
| 56 | + } |
|
| 57 | + $c = hexToRGB($color); |
|
| 58 | + imagecolorset($image,$index,$c['r'],$c['g'],$c['b']); |
|
| 59 | 59 | /* |
| 60 | 60 | $ig = imagecolorat($image, 0, 0); |
| 61 | 61 | imagecolortransparent($image, $ig); |
| 62 | 62 | */ |
| 63 | 63 | |
| 64 | - header('Content-type: image/png'); |
|
| 65 | - if (isset($_GET['resize']) && function_exists('imagecopyresampled')) { |
|
| 64 | + header('Content-type: image/png'); |
|
| 65 | + if (isset($_GET['resize']) && function_exists('imagecopyresampled')) { |
|
| 66 | 66 | $resize = filter_input(INPUT_GET,'resize',FILTER_SANITIZE_NUMBER_INT); |
| 67 | 67 | $newimg = imagecreatetruecolor($resize,$resize); |
| 68 | - imagealphablending($newimg, false); |
|
| 68 | + imagealphablending($newimg, false); |
|
| 69 | 69 | imagesavealpha($newimg, true); |
| 70 | 70 | imagecopyresampled($newimg,$image,0,0,0,0,15,15,imagesx($image),imagesy($image)); |
| 71 | 71 | if (isset($_GET['heading'])) { |
| 72 | - $heading = filter_input(INPUT_GET,'heading',FILTER_SANITIZE_NUMBER_INT); |
|
| 73 | - $rotation = imagerotate($newimg,$heading,imageColorAllocateAlpha($newimg,0,0,0,127)); |
|
| 74 | - imagealphablending($rotation, false); |
|
| 75 | - imagesavealpha($rotation, true); |
|
| 76 | - imagepng($rotation); |
|
| 77 | - imagedestroy($newimg); |
|
| 78 | - imagedestroy($image); |
|
| 79 | - imagedestroy($rotation); |
|
| 72 | + $heading = filter_input(INPUT_GET,'heading',FILTER_SANITIZE_NUMBER_INT); |
|
| 73 | + $rotation = imagerotate($newimg,$heading,imageColorAllocateAlpha($newimg,0,0,0,127)); |
|
| 74 | + imagealphablending($rotation, false); |
|
| 75 | + imagesavealpha($rotation, true); |
|
| 76 | + imagepng($rotation); |
|
| 77 | + imagedestroy($newimg); |
|
| 78 | + imagedestroy($image); |
|
| 79 | + imagedestroy($rotation); |
|
| 80 | 80 | |
| 81 | 81 | } else { |
| 82 | - imagepng($newimg); |
|
| 83 | - imagedestroy($newimg); |
|
| 84 | - imagedestroy($image); |
|
| 85 | - } |
|
| 86 | - } else { |
|
| 82 | + imagepng($newimg); |
|
| 83 | + imagedestroy($newimg); |
|
| 84 | + imagedestroy($image); |
|
| 85 | + } |
|
| 86 | + } else { |
|
| 87 | 87 | imagealphablending($image, false); |
| 88 | - imagesavealpha($image, true); |
|
| 88 | + imagesavealpha($image, true); |
|
| 89 | 89 | imagepng($image); |
| 90 | 90 | imagepng($image); |
| 91 | 91 | if (is_writable(dirname(__FILE__).'/cache')) { |
| 92 | - imagepng($image,dirname(__FILE__).'/cache/'.$color.'-'.$filename); |
|
| 92 | + imagepng($image,dirname(__FILE__).'/cache/'.$color.'-'.$filename); |
|
| 93 | + } |
|
| 94 | + imagedestroy($image); |
|
| 93 | 95 | } |
| 94 | - imagedestroy($image); |
|
| 95 | - } |
|
| 96 | 96 | } else { |
| 97 | - header('Content-type: image/png'); |
|
| 98 | - if (isset($_GET['tracker'])) { |
|
| 99 | - readfile(dirname(__FILE__).DIRECTORY_SEPARATOR.'images/vehicules/'.$filename); |
|
| 100 | - } elseif (isset($_GET['marine'])) { |
|
| 101 | - readfile(dirname(__FILE__).DIRECTORY_SEPARATOR.'images/vehicules/'.$filename); |
|
| 102 | - } else { |
|
| 103 | - if ($color == 'FF0000') readfile(dirname(__FILE__).DIRECTORY_SEPARATOR.'images/aircrafts/selected/'.$filename); |
|
| 97 | + header('Content-type: image/png'); |
|
| 98 | + if (isset($_GET['tracker'])) { |
|
| 99 | + readfile(dirname(__FILE__).DIRECTORY_SEPARATOR.'images/vehicules/'.$filename); |
|
| 100 | + } elseif (isset($_GET['marine'])) { |
|
| 101 | + readfile(dirname(__FILE__).DIRECTORY_SEPARATOR.'images/vehicules/'.$filename); |
|
| 102 | + } else { |
|
| 103 | + if ($color == 'FF0000') readfile(dirname(__FILE__).DIRECTORY_SEPARATOR.'images/aircrafts/selected/'.$filename); |
|
| 104 | 104 | else readfile(dirname(__FILE__).DIRECTORY_SEPARATOR.'images/aircrafts/'.$filename); |
| 105 | - } |
|
| 105 | + } |
|
| 106 | 106 | } |
| 107 | 107 | ?> |
| 108 | 108 | \ No newline at end of file |
@@ -4,9 +4,9 @@ discard block |
||
| 4 | 4 | $hex = str_replace("#", "", $hex); |
| 5 | 5 | $color = array(); |
| 6 | 6 | if (strlen($hex) == 3) { |
| 7 | - $color['r'] = hexdec(substr($hex, 0, 1) . substr($hex,0,1)); |
|
| 8 | - $color['g'] = hexdec(substr($hex, 1, 1) . substr($hex,1,1)); |
|
| 9 | - $color['b'] = hexdec(substr($hex, 2, 1) . substr($hex,2,1)); |
|
| 7 | + $color['r'] = hexdec(substr($hex, 0, 1).substr($hex, 0, 1)); |
|
| 8 | + $color['g'] = hexdec(substr($hex, 1, 1).substr($hex, 1, 1)); |
|
| 9 | + $color['b'] = hexdec(substr($hex, 2, 1).substr($hex, 2, 1)); |
|
| 10 | 10 | } else if (strlen($hex) == 6) { |
| 11 | 11 | $color['r'] = hexdec(substr($hex, 0, 2)); |
| 12 | 12 | $color['g'] = hexdec(substr($hex, 2, 2)); |
@@ -16,7 +16,7 @@ discard block |
||
| 16 | 16 | } |
| 17 | 17 | |
| 18 | 18 | |
| 19 | -if (!isset($_GET['color']) || $_GET['color'] == '' || !preg_match('/^([a-fA-F0-9]){3}(([a-fA-F0-9]){3})?\b/',$_GET['color'])) { |
|
| 19 | +if (!isset($_GET['color']) || $_GET['color'] == '' || !preg_match('/^([a-fA-F0-9]){3}(([a-fA-F0-9]){3})?\b/', $_GET['color'])) { |
|
| 20 | 20 | exit(0); |
| 21 | 21 | } |
| 22 | 22 | $color = $_GET['color']; |
@@ -47,15 +47,15 @@ discard block |
||
| 47 | 47 | |
| 48 | 48 | if (extension_loaded('gd') && function_exists('gd_info')) { |
| 49 | 49 | $image = imagecreatefrompng($original); |
| 50 | - $index = imagecolorexact($image,26,49,81); |
|
| 50 | + $index = imagecolorexact($image, 26, 49, 81); |
|
| 51 | 51 | if ($index < 0) { |
| 52 | - $index = imagecolorexact($image,25,49,79); |
|
| 52 | + $index = imagecolorexact($image, 25, 49, 79); |
|
| 53 | 53 | } |
| 54 | 54 | if ($index < 0) { |
| 55 | - $index = imagecolorexact($image,0,0,0); |
|
| 55 | + $index = imagecolorexact($image, 0, 0, 0); |
|
| 56 | 56 | } |
| 57 | 57 | $c = hexToRGB($color); |
| 58 | - imagecolorset($image,$index,$c['r'],$c['g'],$c['b']); |
|
| 58 | + imagecolorset($image, $index, $c['r'], $c['g'], $c['b']); |
|
| 59 | 59 | /* |
| 60 | 60 | $ig = imagecolorat($image, 0, 0); |
| 61 | 61 | imagecolortransparent($image, $ig); |
@@ -63,14 +63,14 @@ discard block |
||
| 63 | 63 | |
| 64 | 64 | header('Content-type: image/png'); |
| 65 | 65 | if (isset($_GET['resize']) && function_exists('imagecopyresampled')) { |
| 66 | - $resize = filter_input(INPUT_GET,'resize',FILTER_SANITIZE_NUMBER_INT); |
|
| 67 | - $newimg = imagecreatetruecolor($resize,$resize); |
|
| 66 | + $resize = filter_input(INPUT_GET, 'resize', FILTER_SANITIZE_NUMBER_INT); |
|
| 67 | + $newimg = imagecreatetruecolor($resize, $resize); |
|
| 68 | 68 | imagealphablending($newimg, false); |
| 69 | 69 | imagesavealpha($newimg, true); |
| 70 | - imagecopyresampled($newimg,$image,0,0,0,0,15,15,imagesx($image),imagesy($image)); |
|
| 70 | + imagecopyresampled($newimg, $image, 0, 0, 0, 0, 15, 15, imagesx($image), imagesy($image)); |
|
| 71 | 71 | if (isset($_GET['heading'])) { |
| 72 | - $heading = filter_input(INPUT_GET,'heading',FILTER_SANITIZE_NUMBER_INT); |
|
| 73 | - $rotation = imagerotate($newimg,$heading,imageColorAllocateAlpha($newimg,0,0,0,127)); |
|
| 72 | + $heading = filter_input(INPUT_GET, 'heading', FILTER_SANITIZE_NUMBER_INT); |
|
| 73 | + $rotation = imagerotate($newimg, $heading, imageColorAllocateAlpha($newimg, 0, 0, 0, 127)); |
|
| 74 | 74 | imagealphablending($rotation, false); |
| 75 | 75 | imagesavealpha($rotation, true); |
| 76 | 76 | imagepng($rotation); |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | imagepng($image); |
| 90 | 90 | imagepng($image); |
| 91 | 91 | if (is_writable(dirname(__FILE__).'/cache')) { |
| 92 | - imagepng($image,dirname(__FILE__).'/cache/'.$color.'-'.$filename); |
|
| 92 | + imagepng($image, dirname(__FILE__).'/cache/'.$color.'-'.$filename); |
|
| 93 | 93 | } |
| 94 | 94 | imagedestroy($image); |
| 95 | 95 | } |
@@ -1,49 +1,49 @@ |
||
| 1 | 1 | #!/usr/bin/php |
| 2 | 2 | <?php |
| 3 | - require_once('../require/settings.php'); |
|
| 4 | - if ($globalInstalled) { |
|
| 5 | - //echo '$globalInstalled must be set to FALSE in require/settings.php'; |
|
| 6 | - echo "Use install/index.php instead. You really don't want to use this."; |
|
| 7 | - exit; |
|
| 8 | - } |
|
| 9 | - require('class.update_db.php'); |
|
| 10 | - echo "Populate all tables...\n"; |
|
| 11 | - update_db::update_all(); |
|
| 12 | - echo "\nInstall waypoints...(VERY slow!)"; |
|
| 13 | - update_db::update_waypoints(); |
|
| 14 | - echo "Done !\n"; |
|
| 15 | - echo "Install airspace..."; |
|
| 16 | - update_db::update_airspace(); |
|
| 17 | - echo "Done !\n"; |
|
| 18 | - echo "Install countries..."; |
|
| 19 | - update_db::update_countries(); |
|
| 20 | - echo "Done !\n"; |
|
| 21 | - if (isset($globalOwner) && $globalOwner) { |
|
| 3 | + require_once('../require/settings.php'); |
|
| 4 | + if ($globalInstalled) { |
|
| 5 | + //echo '$globalInstalled must be set to FALSE in require/settings.php'; |
|
| 6 | + echo "Use install/index.php instead. You really don't want to use this."; |
|
| 7 | + exit; |
|
| 8 | + } |
|
| 9 | + require('class.update_db.php'); |
|
| 10 | + echo "Populate all tables...\n"; |
|
| 11 | + update_db::update_all(); |
|
| 12 | + echo "\nInstall waypoints...(VERY slow!)"; |
|
| 13 | + update_db::update_waypoints(); |
|
| 14 | + echo "Done !\n"; |
|
| 15 | + echo "Install airspace..."; |
|
| 16 | + update_db::update_airspace(); |
|
| 17 | + echo "Done !\n"; |
|
| 18 | + echo "Install countries..."; |
|
| 19 | + update_db::update_countries(); |
|
| 20 | + echo "Done !\n"; |
|
| 21 | + if (isset($globalOwner) && $globalOwner) { |
|
| 22 | 22 | echo "Install private owners..."; |
| 23 | 23 | update_db::update_owner_fam(); |
| 24 | - echo "Done !\n"; |
|
| 25 | - } |
|
| 26 | - /* |
|
| 24 | + echo "Done !\n"; |
|
| 25 | + } |
|
| 26 | + /* |
|
| 27 | 27 | if (isset($globalIVAO) && $globalIVAO) { |
| 28 | 28 | echo "Install IVAO airlines and logos..."; |
| 29 | 29 | update_db::update_IVAO(); |
| 30 | 30 | echo "Done !\n"; |
| 31 | 31 | } |
| 32 | 32 | */ |
| 33 | - if (isset($globalNOTAM) && $globalNOTAM && isset($globalNOTAMSource) && $globalNOTAMSource != '') { |
|
| 33 | + if (isset($globalNOTAM) && $globalNOTAM && isset($globalNOTAMSource) && $globalNOTAMSource != '') { |
|
| 34 | 34 | echo "Install NOTAM from notaminfo.com..."; |
| 35 | - update_db:update_notam(); |
|
| 36 | - echo "Done !\n"; |
|
| 37 | - } |
|
| 38 | - if (isset($globalMap3D) && $globalMap3D) { |
|
| 35 | + update_db:update_notam(); |
|
| 36 | + echo "Done !\n"; |
|
| 37 | + } |
|
| 38 | + if (isset($globalMap3D) && $globalMap3D) { |
|
| 39 | 39 | echo "Install 3D models..."; |
| 40 | 40 | update_db::update_models(); |
| 41 | 41 | echo "Done !\n"; |
| 42 | 42 | if (isset($globalMapSatellites) && $globalMapSatellites) { |
| 43 | - echo "Install Space 3D models..."; |
|
| 44 | - update_db::update_space_models(); |
|
| 45 | - echo "Done !\n"; |
|
| 46 | - } |
|
| 47 | - } |
|
| 43 | + echo "Install Space 3D models..."; |
|
| 44 | + update_db::update_space_models(); |
|
| 45 | + echo "Done !\n"; |
|
| 46 | + } |
|
| 47 | + } |
|
| 48 | 48 | |
| 49 | 49 | ?> |
| 50 | 50 | \ No newline at end of file |
@@ -1,31 +1,31 @@ |
||
| 1 | 1 | #!/usr/bin/php |
| 2 | 2 | <?php |
| 3 | - require_once('../require/settings.php'); |
|
| 4 | - if ($globalInstalled) { |
|
| 5 | - //echo '$globalInstalled must be set to FALSE in require/settings.php'; |
|
| 6 | - echo "Use install/index.php instead. You really don't want to use this."; |
|
| 7 | - exit; |
|
| 8 | - } |
|
| 9 | - require('class.create_db.php'); |
|
| 10 | - echo "Create and import all tables..."; |
|
| 11 | - create_db::import_all_db('../db/'); |
|
| 12 | - echo "Done !\n"; |
|
| 3 | + require_once('../require/settings.php'); |
|
| 4 | + if ($globalInstalled) { |
|
| 5 | + //echo '$globalInstalled must be set to FALSE in require/settings.php'; |
|
| 6 | + echo "Use install/index.php instead. You really don't want to use this."; |
|
| 7 | + exit; |
|
| 8 | + } |
|
| 9 | + require('class.create_db.php'); |
|
| 10 | + echo "Create and import all tables..."; |
|
| 11 | + create_db::import_all_db('../db/'); |
|
| 12 | + echo "Done !\n"; |
|
| 13 | 13 | |
| 14 | - require('class.update_db.php'); |
|
| 15 | - echo "Populate all tables...\n"; |
|
| 16 | - update_db::update_all(); |
|
| 17 | - echo "\nInstall waypoints...(VERY slow!)"; |
|
| 18 | - update_db::update_waypoints(); |
|
| 19 | - echo "Done !\n"; |
|
| 20 | - echo "Install airspace..."; |
|
| 21 | - update_db::update_airspace(); |
|
| 22 | - echo "Done !\n"; |
|
| 23 | - echo 'All is now installed ! Thanks'."\n"; |
|
| 24 | - if ($globalSBS1) { |
|
| 25 | - echo 'You need to run cron-sbs.php as a daemon. You can use init script in the install/init directory.'."\n"; |
|
| 26 | - } |
|
| 27 | - if ($globalACARS) { |
|
| 28 | - echo 'You need to run cron-acars.php as a daemon. You can use init script in the install/init directory.'."\n"; |
|
| 29 | - } |
|
| 14 | + require('class.update_db.php'); |
|
| 15 | + echo "Populate all tables...\n"; |
|
| 16 | + update_db::update_all(); |
|
| 17 | + echo "\nInstall waypoints...(VERY slow!)"; |
|
| 18 | + update_db::update_waypoints(); |
|
| 19 | + echo "Done !\n"; |
|
| 20 | + echo "Install airspace..."; |
|
| 21 | + update_db::update_airspace(); |
|
| 22 | + echo "Done !\n"; |
|
| 23 | + echo 'All is now installed ! Thanks'."\n"; |
|
| 24 | + if ($globalSBS1) { |
|
| 25 | + echo 'You need to run cron-sbs.php as a daemon. You can use init script in the install/init directory.'."\n"; |
|
| 26 | + } |
|
| 27 | + if ($globalACARS) { |
|
| 28 | + echo 'You need to run cron-acars.php as a daemon. You can use init script in the install/init directory.'."\n"; |
|
| 29 | + } |
|
| 30 | 30 | |
| 31 | 31 | ?> |
| 32 | 32 | \ No newline at end of file |