poole3003 Posted August 7, 2014 Report Share Posted August 7, 2014 How do i get the Metar Data to show on all flight plans for all Airports ? Quote Link to comment Share on other sites More sharing options...
freshJet Posted August 7, 2014 Report Share Posted August 7, 2014 <?php getMETAR($schedule->depicao); getMETAR($schedule->arricao); function getMETAR($icao){ $data = "http://metar.vatsim.net/$icao"; $metar = file_get_contents($data); return $metar; } ?> Quote Link to comment Share on other sites More sharing options...
poole3003 Posted August 7, 2014 Author Report Share Posted August 7, 2014 and where do i add that or where can i find that Quote Link to comment Share on other sites More sharing options...
BaRBeR Posted August 7, 2014 Report Share Posted August 7, 2014 it will be in the template file schedule_details.tpl around like 14/15 i believe it will be something like : <div id="<?php echo $schedule->depicao ?>" class="metar">Getting current METAR information for <?php echo $schedule->depicao ?></div> <div id="<?php echo $schedule->arricao ?>" class="metar">Getting current METAR information for <?php echo $schedule->arricao ?></div> You can possibly put it in there Quote Link to comment Share on other sites More sharing options...
freshJet Posted August 8, 2014 Report Share Posted August 8, 2014 Add it where you want it. If it's the briefing put the function at the top of the page: function getMETAR($icao){ $data = "http://metar.vatsim.net/$icao"; $metar = file_get_contents($data); return $metar; } And then: getMETAR($schedule->depicao); getMETAR($schedule->arricao); Where you want them displayed. Quote Link to comment Share on other sites More sharing options...
Industrialshadow Posted September 8, 2016 Report Share Posted September 8, 2016 hi the code will not show the metar. Any Solutions? Quote Link to comment Share on other sites More sharing options...
Moderators servetas Posted September 9, 2016 Moderators Report Share Posted September 9, 2016 What error does it return? Where did you place it? As I see it, it should work. Quote Link to comment Share on other sites More sharing options...
Industrialshadow Posted September 10, 2016 Report Share Posted September 10, 2016 its doesnt show an Error the Section with this code will be blank. i use the php version from simpilot Quote Link to comment Share on other sites More sharing options...
Moderators servetas Posted September 10, 2016 Moderators Report Share Posted September 10, 2016 Maybe $schedule variable is not correct or empty? Can you paste here the part of the file you try to add it? Quote Link to comment Share on other sites More sharing options...
Industrialshadow Posted September 10, 2016 Report Share Posted September 10, 2016 (edited) i have put this into my schedule briefing site. you can look here in teh schedule briefing http://lausitz-aircargo.de/index.php/schedules/brief/65 <style type="text/css"> <!-- body,td,th,tr { color: #000; -webkit-border-radius: 40px; -moz-border-radius: 40px; border-radius: 15px; } --> </style><br /><br /> <script src="http://skyvector.com/linkchart.js"></script> <table width="98%" border="3" bordercolor="#FF0000" align="center" cellpadding="5" cellspacing="5"> <!-- Flight ID --> <tr style="background-color: #0075DB; color: #eeeeee;"> <th colspan="2" bgcolor="#99FF00"><h2 align="center"><strong><img src="http://www.lausitz-aircargo.de/lib/skins/ocean_blue/images/buttons/airplane-57-512.gif" alt="" width="25" height="25" />Flugnummer</strong><img src="http://www.lausitz-aircargo.de/lib/skins/ocean_blue/images/buttons/airplane-57-512.gif" alt="" width="25" height="25" /></h2></th> </tr> <tr> <td colspan="2"> <div align="center"><strong><font color="#FF0000"><h2><?php echo $schedule->code.$schedule->flightnum; ?></h2></font></strong></div></td> </tr> <tr style="background-color: #0075DB; color: #eeeeee;"> <th colspan="2" bgcolor="#99FF00"><h2 align="center"><strong><img src="http://www.lausitz-aircargo.de/lib/skins/ocean_blue/images/buttons/airplane-57-512.gif" alt="" width="25" height="25" />geplante Flugzeit</strong><img src="http://www.lausitz-aircargo.de/lib/skins/ocean_blue/images/buttons/airplane-57-512.gif" alt="" width="25" height="25" /></h2></th> </tr> <tr> <td colspan="2"> <div align="center">wird demnächst angezeigt <?php echo "{$schedule->depname} ($schedule->depicao)"; ?></div></td> </tr> <tr style="background-color: #0075DB; color: #eeeeee;"> <th bgcolor="#99FF00"><h2 align="center"><img src="http://www.lausitz-aircargo.de/lib/skins/ocean_blue/images/buttons/airplane-57-512.gif" alt="" width="25" height="25" />Abflug<img src="http://www.lausitz-aircargo.de/lib/skins/ocean_blue/images/buttons/airplane-57-512.gif" alt="" width="25" height="25" /></h2></th> <th bgcolor="#99FF00"><h2 align="center"><img src="http://www.lausitz-aircargo.de/lib/skins/ocean_blue/images/buttons/airplane-57-512.gif" alt="" width="25" height="25" />Ankunft<img src="http://www.lausitz-aircargo.de/lib/skins/ocean_blue/images/buttons/airplane-57-512.gif" alt="" width="25" height="25" /></h2></th> </tr> <tr> <td width="50%" ><div align="center"><?php echo "{$schedule->depname} ($schedule->depicao)"; ?><br /> <a href="https://pilotweb.nas.faa.gov/PilotWeb/" target="_blank">Click to view NOTAMS</a></div></td> <td width="50%" ><div align="center"><?php echo "{$schedule->arrname} ($schedule->arricao)"; ?><br /> <a href="https://pilotweb.nas.faa.gov/PilotWeb/" target="_blank">Click to view NOTAMS</a></div></td> </tr> <!-- Times Row --> <tr style="background-color: #0075DB; color: #eeeeee;"> <th bgcolor="#99FF00"><div align="center"> <h2><img src="http://www.lausitz-aircargo.de/lib/skins/ocean_blue/images/buttons/airplane-57-512.gif" alt="" width="25" height="25" />Abflugszeit<img src="http://www.lausitz-aircargo.de/lib/skins/ocean_blue/images/buttons/airplane-57-512.gif" alt="" width="25" height="25" /></h2> </div></th> <th bgcolor="#99FF00"><div align="center"> <h2><img src="http://www.lausitz-aircargo.de/lib/skins/ocean_blue/images/buttons/airplane-57-512.gif" alt="" width="25" height="25" />Ankunftszeit<img src="http://www.lausitz-aircargo.de/lib/skins/ocean_blue/images/buttons/airplane-57-512.gif" alt="" width="25" height="25" /></h2> </div></th> </tr> <tr> <td width="50%" ><div align="center"><?php echo "{$schedule->deptime}"; ?></div></td> <td width="50%" ><div align="center"><?php echo "{$schedule->arrtime}"; ?></div></td> </tr> <!-- Aircraft and Distance Row --> <tr style="background-color: #0075DB; color: #eeeeee;"> <th bgcolor="#99FF00"><div align="center"> <h2><img src="http://www.lausitz-aircargo.de/lib/skins/ocean_blue/images/buttons/airplane-57-512.gif" alt="" width="25" height="25" />Flugzeugmuster<img src="http://www.lausitz-aircargo.de/lib/skins/ocean_blue/images/buttons/airplane-57-512.gif" alt="" width="25" height="25" /></h2> </div></th> <th bgcolor="#99FF00"><div align="center"> <h2><img src="http://www.lausitz-aircargo.de/lib/skins/ocean_blue/images/buttons/airplane-57-512.gif" alt="" width="25" height="25" />Distanz<img src="http://www.lausitz-aircargo.de/lib/skins/ocean_blue/images/buttons/airplane-57-512.gif" alt="" width="25" height="25" /></h2> </div></th> </tr> <tr> <td width="50%" ><div align="center"><strong><?php echo "{$schedule->aircraft}"; ?></strong></div></td> <td width="50%" ><div align="center"><?php echo "{$schedule->distance}"; ?> nm</div></td> </tr> <tr style="background-color: #0075DB; color: #eeeeee;"> <th bgcolor="#99FF00"><h2 align="center"><img src="http://www.lausitz-aircargo.de/lib/skins/ocean_blue/images/buttons/airplane-57-512.gif" alt="" width="25" height="25" />Abflug METAR<img src="http://www.lausitz-aircargo.de/lib/skins/ocean_blue/images/buttons/airplane-57-512.gif" alt="" width="25" height="25" /></h2></th> <th bgcolor="#99FF00"><h2 align="center"><img src="http://www.lausitz-aircargo.de/lib/skins/ocean_blue/images/buttons/airplane-57-512.gif" alt="" width="25" height="25" />Ankunft METAR<img src="http://www.lausitz-aircargo.de/lib/skins/ocean_blue/images/buttons/airplane-57-512.gif" alt="" width="25" height="25" /></h2></th> </tr> <tr> [b][color=#ff0000] <td width="50%" > <div align="center">Getting Airport METAR</div> </div> <div align="center"> <p><br /> <?php[/color][/b] [b][color=#ff0000]getMETAR($schedule->depicao); getMETAR($schedule->arricao);[/color][/b] [b][color=#ff0000]function getMETAR($icao){ $data = "http://metar.vatsim.net/$icao"; $metar = file_get_contents($data); return $metar; } ?></p> </div></td>[/color][/b] <td width="50%" ><div id="<?php echo $schedule->arricao; ?>" class="metar"> <div align="center">Getting Airport METAR</div> </div> <div align="center"><br /> <a href="http://flightaware.com/resources/airport/<?php echo $schedule->arricao?>/weather" target="_blank"> View Weather Details</a></div></td> </tr> <!-- Route --> <tr style="background-color: #0075DB; color: #eeeeee;"> <th colspan="2" bgcolor="#99FF00"><div align="center"> <h2><img src="http://www.lausitz-aircargo.de/lib/skins/ocean_blue/images/buttons/airplane-57-512.gif" alt="" width="25" height="25" />Route<img src="http://www.lausitz-aircargo.de/lib/skins/ocean_blue/images/buttons/airplane-57-512.gif" alt="" width="25" height="25" /></h2> </div></th> </tr> <tr> <td colspan="2"> <div align="center"> <?php # If it's empty, insert some blank lines if($schedule->route == '') { echo '<br /> <br /> <br />'; } else { echo strtoupper($schedule->route); } ?> </div></td> </tr> <!-- Fuel --> <tr style="background-color: #0075DB; color: #eeeeee;"> <th colspan="2" bgcolor="#99FF00"><h2 align="center"><img src="http://www.lausitz-aircargo.de/lib/skins/ocean_blue/images/buttons/airplane-57-512.gif" alt="" width="25" height="25" />Kerosin Berechnung<img src="http://www.lausitz-aircargo.de/lib/skins/ocean_blue/images/buttons/airplane-57-512.gif" alt="" width="25" height="25" /></h2></th> </tr> <tr> <td colspan="2" style="padding: 6px;"> <div align="center"> <?php Template::Show('fuel.php');?> </div></td> </tr> <!-- Notes --> <tr style="background-color: #0075DB; color: #eeeeee;"> <th colspan="2" bgcolor="#99FF00"><h2 align="center"><img src="http://www.lausitz-aircargo.de/lib/skins/ocean_blue/images/buttons/airplane-57-512.gif" alt="" width="25" height="25" />Notes<img src="http://www.lausitz-aircargo.de/lib/skins/ocean_blue/images/buttons/airplane-57-512.gif" alt="" width="25" height="25" /></h2></th> </tr> <tr> <td colspan="2" style="padding: 6px;"> <div align="center"> <?php # If it's empty, insert some blank lines if($schedule->notes == '') { echo '<br /> <br /> <br />'; } else { echo "{$schedule->notes}"; } ?> </div></td> </tr> <!-- Notes --> <tr style="background-color: #0075DB; color: #eeeeee;"> <th colspan="2" bgcolor="#99FF00"><h2 align="center"><img src="http://www.lausitz-aircargo.de/lib/skins/ocean_blue/images/buttons/airplane-57-512.gif" alt="" width="25" height="25" />Flugroute<img src="http://www.lausitz-aircargo.de/lib/skins/ocean_blue/images/buttons/airplane-57-512.gif" alt="" width="25" height="25" /></h2></th> </tr> <tr> <td colspan="2" style="padding: 6px;"> <div align="center"><div class="mapcenter" align="center"> <div id="routemap" style="width:<?php echo Config::Get('MAP_WIDTH');?>; height: <?php echo Config::Get('MAP_HEIGHT')?>"></div> </div> <?php /** * * This is the new Google Maps v3 code. Be careful of changing * things here, only do something if you know what you're doing. * * These are some options for the map, you can change here. * * This map is used for schedules and PIREPS * * By default, the zoom level and center are ignored, and the map * will try to fit the all the flights in. If you want to manually set * the zoom level and center, set "autozoom" to false. * * If you want to adjust the size of the map - Look at the above * "routemap" div with the CSS width/height parameters. You can * easily adjust it from there. * * And for reference, you want to tinker: * http://code.google.com/apis/maps/documentation/v3/basics.html */ if(isset($pirep)) $mapdata = $pirep; if(isset($schedule)) $mapdata = $schedule; ?> <?php /* This is a small template for information about a navpoint popup Variables available: <%=nav.title%> <%=nav.name%> <%=nav.freq%> <%=nav.lat%> <%=nav.lng%> <%=nav.type%> 2=NDB 3=VOR 4=DME 5=FIX 6=TRACK */ ?> <script type="text/html" id="navpoint_bubble"> <span style="font-size: 10px; text-align:left; width: 100%" align="left"> <strong>Name: </strong><%=nav.title%> (<%=nav.name%>)<br /> <strong>Type: </strong> <?php /* Show the type of point */ ?> <% if(nav.type == 2) { %> NDB <% } %> <% if(nav.type == 3) { %> VOR <% } %> <% if(nav.type == 4) { %> DME <% } %> <% if(nav.type == 5) { %> FIX <% } %> <% if(nav.type == 6) { %> TRACK <% } %> <br /> <?php /* Only show frequency if it's not a 0*/ ?> <% if(nav.freq != 0) { %> <strong>Frequency: </strong><%=nav.freq%> <% } %> </span> </script> <?php /* Below here is all the javascript for the map. Be careful of what you modify!! */ ?> <script type="text/javascript"> var options = { mapTypeId: google.maps.MapTypeId.ROADMAP } var map = new google.maps.Map(document.getElementById("routemap"), options); var dep_location = new google.maps.LatLng(<?php echo $mapdata->deplat?>,<?php echo $mapdata->deplng;?>); var arr_location = new google.maps.LatLng(<?php echo $mapdata->arrlat?>,<?php echo $mapdata->arrlng;?>); var bounds = new google.maps.LatLngBounds(); bounds.extend(dep_location); bounds.extend(arr_location); var depMarker = new google.maps.Marker({ position: dep_location, map: map, icon: depicon, title: "<?php echo $mapdata->depname;?>" }); <?php /* Populate the route */ if(is_array($mapdata->route_details)) { $list = array(); foreach($mapdata->route_details as $route) { if($route->type == NAV_VOR) $icon = fileurl('/lib/images/icon_vor.png'); else $icon = fileurl('/lib/images/icon_fix.png'); /* Build info array for the bubble */ ?> var v<?php echo $route->name?>_info = { freq: "<?php echo $route->freq ?>", name: "<?php echo $route->name ?>", title: "<?php echo $route->title ?>", type: "<?php echo $route->type ?>", lat: "<?php echo $route->lat ?>", lng: "<?php echo $route->lng ?>" }; var v<?php echo $route->name?>_navpoint_info = tmpl("navpoint_bubble", {nav: v<?php echo $route->name?>_info}); var v<?php echo $route->name?>_coords = new google.maps.LatLng(<?php echo $route->lat?>, <?php echo $route->lng?>); var v<?php echo $route->name?>_marker = new google.maps.Marker({ position: v<?php echo $route->name?>_coords, map: map, icon: "<?php echo $icon; ?>", title: "<?php echo $route->title; ?>", infowindow_content: v<?php echo $route->name?>_navpoint_info }) bounds.extend(v<?php echo $route->name?>_coords); google.maps.event.addListener(v<?php echo $route->name?>_marker, 'click', function() { info_window = new google.maps.InfoWindow({ content: this.infowindow_content, position: this.position }); info_window.open(map, this); }); <?php // For the polyline $list[] = "v{$route->name}_coords"; } } ?> var arrMarker = new google.maps.Marker({ position: arr_location, map: map, icon: arricon, title: "<?php echo $mapdata->arrname;?>" }); var flightPath = new google.maps.Polyline({ path: [dep_location, <?php if(count($list) > 0) { echo implode(',', $list).','; }?> arr_location], strokeColor: "#FF0000", strokeOpacity: 1.0, strokeWeight: 2 }).setMap(map); // Resize the view to fit it all in map.fitBounds(bounds); </script></div></td> </tr> </table> <p> </p> <table width="98%" border="3" bordercolor="#FF0000" align="center" cellpadding="5" cellspacing="5" padding="2"> <tr style="background-color: #0075DB; color: #eeeeee; padding: 5px;"> <th bgcolor="#99FF00"><h2 align="center"><img src="http://www.lausitz-aircargo.de/lib/skins/ocean_blue/images/buttons/airplane-57-512.gif" alt="" width="25" height="25" />Zusätzliche Informationen<img src="http://www.lausitz-aircargo.de/lib/skins/ocean_blue/images/buttons/airplane-57-512.gif" alt="" width="25" height="25" /></h2></th> </tr> <tr> <td><div align="center"><a href="http://flightaware.com/analysis/route.rvt?origin=<?php echo $schedule->depicao?>&destination=<?php echo $schedule->arricao?>">View recent IFR Routes data</a></div></td> </tr> </table> <h3 align="center"> </h3> <h2 align="center">Prozeduren und Karten</h2> <p align="center"> </p> <table width="98%" border="3" bordercolor="#FF0000" align="center" cellpadding="5" cellspacing="5"> <tr style="background-color: #0075DB; color: #eeeeee;"> <th bgcolor="#99FF00"><div align="center"> <h2>Chart für <?php echo $schedule->depicao?></h2> </div></th> <th bgcolor="#99FF00"><div align="center"> <h2>Charts für <?php echo $schedule->arricao?></h2> </div></th> </tr> <tr align="center"> <td width="50%" valign="top"> <a href="http://www.airnav.com/airport/<?php echo $schedule->depicao?>#ifr" target="_blank"> <img border="0" src="http://flightaware.com/resources/airport/<?php echo $schedule->depicao?>/APD/AIRPORT+DIAGRAM/png" width="387px" height="594px" alt="No chart available" /></a> </td> <td width="50%" valign="top"> <a href="http://www.airnav.com/airport/<?php echo $schedule->arricao?>#ifr" target="_blank"> <img border="0" src="http://flightaware.com/resources/airport/<?php echo $schedule->arricao?>/APD/AIRPORT+DIAGRAM/png" width="387px" height="594px" alt="No chart available" /></a> </td> </tr> </table> <p> </p> <h2 align="center">Wetter</h2> <p> </p> <div align="center"> <p><img src="http://flightaware.com/resources/wx/us_depiction.gif" /></p> <p><img src="http://flightaware.com/resources/wx/surface_analysis.gif" /></p> <p><img src="http://flightaware.com/resources/wx/national_radar.gif" /></p> <p><img src="http://flightaware.com/resources/wx/us_high_level_weather_12z.gif" /></p> <p><img src="http://flightaware.com/resources/wx/severe_outlook_day_1.gif" /></p> <a href="http://flightaware.com/resources/weather_maps/" target="_blank">View additional weather graphs</a> </div> <div align="right" style="font-size: small;">Data Courtesy of <a href="http://flightaware.com" target="_new">FlightAware</a></div> <p align="center"><?php # This will only show this message if it's not a popup window # Ends on line 13-15 if(!isset($_GET['newwindow'])) { ?> <h3 align="center">Requirements for Online Checkin</h3> <p align="center">To proceed through Security Checkpoint, you will need a government-issued photo ID and either a Boarding Pass or Security document. Customers under 18 years of age are not required to show government-issued photo ID.</p> <p align="center"><a href="#" onclick="window.open('<?php echo actionurl('/schedules/boardingpass/'.$schedule->id.'?newwindow');?>'); return false;">Open in new window for printing</a></p> <div align="center"> <?php } ?> <style> /* Some integrated styles here, for the popup */ .boardingpass { font-family: Tahoma, Verdana; font-size: 14px; -webkit-border-radius: 40px; -moz-border-radius: 40px; border-radius: 15px; } .boardingpass h3 { background: none; padding-left: 3px; padding-bottom: 2px; } .boardingpass .thickline { background: #333; height: 2px; } </style> <table width="90%" border="5" bordercolor="#FF0000" cellpadding="5" cellspacing="5" class="boardingpass" > <tr> <td width="1%" bgcolor="#99FF00"><img src="<?php echo SITE_URL?>/lib/images/barcode.png" /></td> <td align="left" bgcolor="#99FF00"><h3 align="center"><img src="http://www.lausitz-aircargo.de/lib/skins/ocean_blue/images/buttons/airplane-57-512.gif" alt="" width="25" height="25" /><?php echo SITE_NAME;?><img src="http://www.lausitz-aircargo.de/lib/skins/ocean_blue/images/buttons/airplane-57-512.gif" alt="" width="25" height="25" /></h3></td> </tr> <tr> <td colspan="2" bgcolor="#0099FF"><h3 align="center"><img src="http://www.lausitz-aircargo.de/lib/skins/ocean_blue/images/buttons/airplane-57-512.gif" alt="" width="25" height="25" />Boarding Pass<img src="http://www.lausitz-aircargo.de/lib/skins/ocean_blue/images/buttons/airplane-57-512.gif" alt="" width="25" height="25" /></h3></td> </tr> <tr class="thickline"> <td colspan="2"></td> </tr> <tr> <td valign="top" bgcolor="#0099FF"> <table class="boardingpass" align="center"> <tr> <td> <strong>Date:</strong> <br /> <strong>Name: </strong> <br /> <strong>Frequent Flier Number: </strong> <br /> <strong>Boarding Pass Number:</strong> </td> <td> <?php echo date('Y-m-d'); ?><br /> <?php echo Auth::$userinfo->firstname.' '.Auth::$userinfo->lastname?><br /> <?php echo Auth::$userinfo->code.strtoupper(substr(md5(Auth::$userinfo->pilotid), 0, 6))?><br /> <?php echo $schedule->bidid; ?><br /> </td> </tr> </table> </td> <td valign="top" bgcolor="#0099FF"> <div align="center"><strong>Gate:</strong> <?php # We are gonna get a random gate echo chr(rand(65, 90)); // echo's a random letter between A and Z echo rand(1, 30); // gate # (between 1 and 30) ?><br /> <strong>Confirmation Payment Code:</strong> <?php # Generate a hash from the bid id, and get the first 6 characters # That'll be used for our confirmation number, and upper-case them echo strtoupper(substr(md5($schedule->bidid), 0, 6)); ?> </div></td> </tr> <tr class="thickline"> <td colspan="2"></td> </tr> <tr> <td valign="top" bgcolor="#0099FF"> <div align="center"><strong>Flight: </strong><?php echo $schedule->code.$schedule->flightnum?><br /> <strong>Depart: </strong><?php echo $schedule->deptime; ?><br /> <strong>Arrive: </strong><?php echo $schedule->arrtime;?><br /> </div></td> <td valign="top" bgcolor="#0099FF"> <div align="center"><strong>Aircraft: </strong><?php echo $schedule->aircraft?> <br /> <strong>Departure Airport:</strong> <?php echo "$schedule->depname ($schedule->depicao)";?><br /> <strong>Arrival Airport:</strong> <?php echo "$schedule->arrname ($schedule->arricao)"; ?><br /> </div></td> </tr> </table><br /> </p> </div> <table width="100%" border="3" bordercolor="#FF0000" cellspacing="5" cellpadding="5"> <tr> <td bgcolor="#99FF00"><div align="center"> <h2><strong><img src="http://www.lausitz-aircargo.de/lib/skins/ocean_blue/images/buttons/airplane-57-512.gif" alt="" width="25" height="25" />Menü</strong><img src="http://www.lausitz-aircargo.de/lib/skins/ocean_blue/images/buttons/airplane-57-512.gif" alt="" width="25" height="25" /></h2> </div></td> </tr> <tr> <td> <div align="center"></div></td> </table> Edited September 10, 2016 by Industrialshadow Quote Link to comment Share on other sites More sharing options...
Moderators servetas Posted September 10, 2016 Moderators Report Share Posted September 10, 2016 Can you give that a try? <style type="text/css"> <!-- body,td,th,tr { color: #000; -webkit-border-radius: 40px; -moz-border-radius: 40px; border-radius: 15px; } --> </style><br /><br /> <script src="http://skyvector.com/linkchart.js"></script> <?php function getMETAR($icao){ $data = "http://metar.vatsim.net/$icao"; $metar = file_get_contents($data); return $metar; } ?> <table width="98%" border="3" bordercolor="#FF0000" align="center" cellpadding="5" cellspacing="5"> <!-- Flight ID --> <tr style="background-color: #0075DB; color: #eeeeee;"> <th colspan="2" bgcolor="#99FF00"><h2 align="center"><strong><img src="http://www.lausitz-aircargo.de/lib/skins/ocean_blue/images/buttons/airplane-57-512.gif" alt="" width="25" height="25" />Flugnummer</strong><img src="http://www.lausitz-aircargo.de/lib/skins/ocean_blue/images/buttons/airplane-57-512.gif" alt="" width="25" height="25" /></h2></th> </tr> <tr> <td colspan="2"> <div align="center"><strong><font color="#FF0000"><h2><?php echo $schedule->code.$schedule->flightnum; ?></h2></font></strong></div></td> </tr> <tr style="background-color: #0075DB; color: #eeeeee;"> <th colspan="2" bgcolor="#99FF00"><h2 align="center"><strong><img src="http://www.lausitz-aircargo.de/lib/skins/ocean_blue/images/buttons/airplane-57-512.gif" alt="" width="25" height="25" />geplante Flugzeit</strong><img src="http://www.lausitz-aircargo.de/lib/skins/ocean_blue/images/buttons/airplane-57-512.gif" alt="" width="25" height="25" /></h2></th> </tr> <tr> <td colspan="2"> <div align="center">wird demnächst angezeigt <?php echo "{$schedule->depname} ($schedule->depicao)"; ?></div></td> </tr> <tr style="background-color: #0075DB; color: #eeeeee;"> <th bgcolor="#99FF00"><h2 align="center"><img src="http://www.lausitz-aircargo.de/lib/skins/ocean_blue/images/buttons/airplane-57-512.gif" alt="" width="25" height="25" />Abflug<img src="http://www.lausitz-aircargo.de/lib/skins/ocean_blue/images/buttons/airplane-57-512.gif" alt="" width="25" height="25" /></h2></th> <th bgcolor="#99FF00"><h2 align="center"><img src="http://www.lausitz-aircargo.de/lib/skins/ocean_blue/images/buttons/airplane-57-512.gif" alt="" width="25" height="25" />Ankunft<img src="http://www.lausitz-aircargo.de/lib/skins/ocean_blue/images/buttons/airplane-57-512.gif" alt="" width="25" height="25" /></h2></th> </tr> <tr> <td width="50%" ><div align="center"><?php echo "{$schedule->depname} ($schedule->depicao)"; ?><br /> <a href="https://pilotweb.nas.faa.gov/PilotWeb/" target="_blank">Click to view NOTAMS</a></div></td> <td width="50%" ><div align="center"><?php echo "{$schedule->arrname} ($schedule->arricao)"; ?><br /> <a href="https://pilotweb.nas.faa.gov/PilotWeb/" target="_blank">Click to view NOTAMS</a></div></td> </tr> <!-- Times Row --> <tr style="background-color: #0075DB; color: #eeeeee;"> <th bgcolor="#99FF00"><div align="center"> <h2><img src="http://www.lausitz-aircargo.de/lib/skins/ocean_blue/images/buttons/airplane-57-512.gif" alt="" width="25" height="25" />Abflugszeit<img src="http://www.lausitz-aircargo.de/lib/skins/ocean_blue/images/buttons/airplane-57-512.gif" alt="" width="25" height="25" /></h2> </div></th> <th bgcolor="#99FF00"><div align="center"> <h2><img src="http://www.lausitz-aircargo.de/lib/skins/ocean_blue/images/buttons/airplane-57-512.gif" alt="" width="25" height="25" />Ankunftszeit<img src="http://www.lausitz-aircargo.de/lib/skins/ocean_blue/images/buttons/airplane-57-512.gif" alt="" width="25" height="25" /></h2> </div></th> </tr> <tr> <td width="50%" ><div align="center"><?php echo "{$schedule->deptime}"; ?></div></td> <td width="50%" ><div align="center"><?php echo "{$schedule->arrtime}"; ?></div></td> </tr> <!-- Aircraft and Distance Row --> <tr style="background-color: #0075DB; color: #eeeeee;"> <th bgcolor="#99FF00"><div align="center"> <h2><img src="http://www.lausitz-aircargo.de/lib/skins/ocean_blue/images/buttons/airplane-57-512.gif" alt="" width="25" height="25" />Flugzeugmuster<img src="http://www.lausitz-aircargo.de/lib/skins/ocean_blue/images/buttons/airplane-57-512.gif" alt="" width="25" height="25" /></h2> </div></th> <th bgcolor="#99FF00"><div align="center"> <h2><img src="http://www.lausitz-aircargo.de/lib/skins/ocean_blue/images/buttons/airplane-57-512.gif" alt="" width="25" height="25" />Distanz<img src="http://www.lausitz-aircargo.de/lib/skins/ocean_blue/images/buttons/airplane-57-512.gif" alt="" width="25" height="25" /></h2> </div></th> </tr> <tr> <td width="50%" ><div align="center"><strong><?php echo "{$schedule->aircraft}"; ?></strong></div></td> <td width="50%" ><div align="center"><?php echo "{$schedule->distance}"; ?> nm</div></td> </tr> <tr style="background-color: #0075DB; color: #eeeeee;"> <th bgcolor="#99FF00"><h2 align="center"><img src="http://www.lausitz-aircargo.de/lib/skins/ocean_blue/images/buttons/airplane-57-512.gif" alt="" width="25" height="25" />Abflug METAR<img src="http://www.lausitz-aircargo.de/lib/skins/ocean_blue/images/buttons/airplane-57-512.gif" alt="" width="25" height="25" /></h2></th> <th bgcolor="#99FF00"><h2 align="center"><img src="http://www.lausitz-aircargo.de/lib/skins/ocean_blue/images/buttons/airplane-57-512.gif" alt="" width="25" height="25" />Ankunft METAR<img src="http://www.lausitz-aircargo.de/lib/skins/ocean_blue/images/buttons/airplane-57-512.gif" alt="" width="25" height="25" /></h2></th> </tr> <tr> <td width="50%" > <div align="center">Getting Airport METAR</div> </div> <div align="center"> <p><br /> <?php echo getMETAR($schedule->depicao); ?> <?php echo getMETAR($schedule->arricao); ?></p> </div></td> <td width="50%" ><div id="<?php echo $schedule->arricao; ?>" class="metar"> <div align="center">Getting Airport METAR</div> </div> <div align="center"><br /> <a href="http://flightaware.com/resources/airport/<?php echo $schedule->arricao?>/weather" target="_blank"> View Weather Details</a></div></td> </tr> <!-- Route --> <tr style="background-color: #0075DB; color: #eeeeee;"> <th colspan="2" bgcolor="#99FF00"><div align="center"> <h2><img src="http://www.lausitz-aircargo.de/lib/skins/ocean_blue/images/buttons/airplane-57-512.gif" alt="" width="25" height="25" />Route<img src="http://www.lausitz-aircargo.de/lib/skins/ocean_blue/images/buttons/airplane-57-512.gif" alt="" width="25" height="25" /></h2> </div></th> </tr> <tr> <td colspan="2"> <div align="center"> <?php # If it's empty, insert some blank lines if($schedule->route == '') { echo '<br /> <br /> <br />'; } else { echo strtoupper($schedule->route); } ?> </div></td> </tr> <!-- Fuel --> <tr style="background-color: #0075DB; color: #eeeeee;"> <th colspan="2" bgcolor="#99FF00"><h2 align="center"><img src="http://www.lausitz-aircargo.de/lib/skins/ocean_blue/images/buttons/airplane-57-512.gif" alt="" width="25" height="25" />Kerosin Berechnung<img src="http://www.lausitz-aircargo.de/lib/skins/ocean_blue/images/buttons/airplane-57-512.gif" alt="" width="25" height="25" /></h2></th> </tr> <tr> <td colspan="2" style="padding: 6px;"> <div align="center"> <?php Template::Show('fuel.php');?> </div></td> </tr> <!-- Notes --> <tr style="background-color: #0075DB; color: #eeeeee;"> <th colspan="2" bgcolor="#99FF00"><h2 align="center"><img src="http://www.lausitz-aircargo.de/lib/skins/ocean_blue/images/buttons/airplane-57-512.gif" alt="" width="25" height="25" />Notes<img src="http://www.lausitz-aircargo.de/lib/skins/ocean_blue/images/buttons/airplane-57-512.gif" alt="" width="25" height="25" /></h2></th> </tr> <tr> <td colspan="2" style="padding: 6px;"> <div align="center"> <?php # If it's empty, insert some blank lines if($schedule->notes == '') { echo '<br /> <br /> <br />'; } else { echo "{$schedule->notes}"; } ?> </div></td> </tr> <!-- Notes --> <tr style="background-color: #0075DB; color: #eeeeee;"> <th colspan="2" bgcolor="#99FF00"><h2 align="center"><img src="http://www.lausitz-aircargo.de/lib/skins/ocean_blue/images/buttons/airplane-57-512.gif" alt="" width="25" height="25" />Flugroute<img src="http://www.lausitz-aircargo.de/lib/skins/ocean_blue/images/buttons/airplane-57-512.gif" alt="" width="25" height="25" /></h2></th> </tr> <tr> <td colspan="2" style="padding: 6px;"> <div align="center"><div class="mapcenter" align="center"> <div id="routemap" style="width:<?php echo Config::Get('MAP_WIDTH');?>; height: <?php echo Config::Get('MAP_HEIGHT')?>"></div> </div> <?php /** * * This is the new Google Maps v3 code. Be careful of changing * things here, only do something if you know what you're doing. * * These are some options for the map, you can change here. * * This map is used for schedules and PIREPS * * By default, the zoom level and center are ignored, and the map * will try to fit the all the flights in. If you want to manually set * the zoom level and center, set "autozoom" to false. * * If you want to adjust the size of the map - Look at the above * "routemap" div with the CSS width/height parameters. You can * easily adjust it from there. * * And for reference, you want to tinker: * http://code.google.com/apis/maps/documentation/v3/basics.html */ if(isset($pirep)) $mapdata = $pirep; if(isset($schedule)) $mapdata = $schedule; ?> <?php /* This is a small template for information about a navpoint popup Variables available: <%=nav.title%> <%=nav.name%> <%=nav.freq%> <%=nav.lat%> <%=nav.lng%> <%=nav.type%> 2=NDB 3=VOR 4=DME 5=FIX 6=TRACK */ ?> <script type="text/html" id="navpoint_bubble"> <span style="font-size: 10px; text-align:left; width: 100%" align="left"> <strong>Name: </strong><%=nav.title%> (<%=nav.name%>)<br /> <strong>Type: </strong> <?php /* Show the type of point */ ?> <% if(nav.type == 2) { %> NDB <% } %> <% if(nav.type == 3) { %> VOR <% } %> <% if(nav.type == 4) { %> DME <% } %> <% if(nav.type == 5) { %> FIX <% } %> <% if(nav.type == 6) { %> TRACK <% } %> <br /> <?php /* Only show frequency if it's not a 0*/ ?> <% if(nav.freq != 0) { %> <strong>Frequency: </strong><%=nav.freq%> <% } %> </span> </script> <?php /* Below here is all the javascript for the map. Be careful of what you modify!! */ ?> <script type="text/javascript"> var options = { mapTypeId: google.maps.MapTypeId.ROADMAP } var map = new google.maps.Map(document.getElementById("routemap"), options); var dep_location = new google.maps.LatLng(<?php echo $mapdata->deplat?>,<?php echo $mapdata->deplng;?>); var arr_location = new google.maps.LatLng(<?php echo $mapdata->arrlat?>,<?php echo $mapdata->arrlng;?>); var bounds = new google.maps.LatLngBounds(); bounds.extend(dep_location); bounds.extend(arr_location); var depMarker = new google.maps.Marker({ position: dep_location, map: map, icon: depicon, title: "<?php echo $mapdata->depname;?>" }); <?php /* Populate the route */ if(is_array($mapdata->route_details)) { $list = array(); foreach($mapdata->route_details as $route) { if($route->type == NAV_VOR) $icon = fileurl('/lib/images/icon_vor.png'); else $icon = fileurl('/lib/images/icon_fix.png'); /* Build info array for the bubble */ ?> var v<?php echo $route->name?>_info = { freq: "<?php echo $route->freq ?>", name: "<?php echo $route->name ?>", title: "<?php echo $route->title ?>", type: "<?php echo $route->type ?>", lat: "<?php echo $route->lat ?>", lng: "<?php echo $route->lng ?>" }; var v<?php echo $route->name?>_navpoint_info = tmpl("navpoint_bubble", {nav: v<?php echo $route->name?>_info}); var v<?php echo $route->name?>_coords = new google.maps.LatLng(<?php echo $route->lat?>, <?php echo $route->lng?>); var v<?php echo $route->name?>_marker = new google.maps.Marker({ position: v<?php echo $route->name?>_coords, map: map, icon: "<?php echo $icon; ?>", title: "<?php echo $route->title; ?>", infowindow_content: v<?php echo $route->name?>_navpoint_info }) bounds.extend(v<?php echo $route->name?>_coords); google.maps.event.addListener(v<?php echo $route->name?>_marker, 'click', function() { info_window = new google.maps.InfoWindow({ content: this.infowindow_content, position: this.position }); info_window.open(map, this); }); <?php // For the polyline $list[] = "v{$route->name}_coords"; } } ?> var arrMarker = new google.maps.Marker({ position: arr_location, map: map, icon: arricon, title: "<?php echo $mapdata->arrname;?>" }); var flightPath = new google.maps.Polyline({ path: [dep_location, <?php if(count($list) > 0) { echo implode(',', $list).','; }?> arr_location], strokeColor: "#FF0000", strokeOpacity: 1.0, strokeWeight: 2 }).setMap(map); // Resize the view to fit it all in map.fitBounds(bounds); </script></div></td> </tr> </table> <p> </p> <table width="98%" border="3" bordercolor="#FF0000" align="center" cellpadding="5" cellspacing="5" padding="2"> <tr style="background-color: #0075DB; color: #eeeeee; padding: 5px;"> <th bgcolor="#99FF00"><h2 align="center"><img src="http://www.lausitz-aircargo.de/lib/skins/ocean_blue/images/buttons/airplane-57-512.gif" alt="" width="25" height="25" />Zusätzliche Informationen<img src="http://www.lausitz-aircargo.de/lib/skins/ocean_blue/images/buttons/airplane-57-512.gif" alt="" width="25" height="25" /></h2></th> </tr> <tr> <td><div align="center"><a href="http://flightaware.com/analysis/route.rvt?origin=<?php echo $schedule->depicao?>&destination=<?php echo $schedule->arricao?>">View recent IFR Routes data</a></div></td> </tr> </table> <h3 align="center"> </h3> <h2 align="center">Prozeduren und Karten</h2> <p align="center"> </p> <table width="98%" border="3" bordercolor="#FF0000" align="center" cellpadding="5" cellspacing="5"> <tr style="background-color: #0075DB; color: #eeeeee;"> <th bgcolor="#99FF00"><div align="center"> <h2>Chart für <?php echo $schedule->depicao?></h2> </div></th> <th bgcolor="#99FF00"><div align="center"> <h2>Charts für <?php echo $schedule->arricao?></h2> </div></th> </tr> <tr align="center"> <td width="50%" valign="top"> <a href="http://www.airnav.com/airport/<?php echo $schedule->depicao?>#ifr" target="_blank"> <img border="0" src="http://flightaware.com/resources/airport/<?php echo $schedule->depicao?>/APD/AIRPORT+DIAGRAM/png" width="387px" height="594px" alt="No chart available" /></a> </td> <td width="50%" valign="top"> <a href="http://www.airnav.com/airport/<?php echo $schedule->arricao?>#ifr" target="_blank"> <img border="0" src="http://flightaware.com/resources/airport/<?php echo $schedule->arricao?>/APD/AIRPORT+DIAGRAM/png" width="387px" height="594px" alt="No chart available" /></a> </td> </tr> </table> <p> </p> <h2 align="center">Wetter</h2> <p> </p> <div align="center"> <p><img src="http://flightaware.com/resources/wx/us_depiction.gif" /></p> <p><img src="http://flightaware.com/resources/wx/surface_analysis.gif" /></p> <p><img src="http://flightaware.com/resources/wx/national_radar.gif" /></p> <p><img src="http://flightaware.com/resources/wx/us_high_level_weather_12z.gif" /></p> <p><img src="http://flightaware.com/resources/wx/severe_outlook_day_1.gif" /></p> <a href="http://flightaware.com/resources/weather_maps/" target="_blank">View additional weather graphs</a> </div> <div align="right" style="font-size: small;">Data Courtesy of <a href="http://flightaware.com" target="_new">FlightAware</a></div> <p align="center"><?php # This will only show this message if it's not a popup window # Ends on line 13-15 if(!isset($_GET['newwindow'])) { ?> <h3 align="center">Requirements for Online Checkin</h3> <p align="center">To proceed through Security Checkpoint, you will need a government-issued photo ID and either a Boarding Pass or Security document. Customers under 18 years of age are not required to show government-issued photo ID.</p> <p align="center"><a href="#" onclick="window.open('<?php echo actionurl('/schedules/boardingpass/'.$schedule->id.'?newwindow');?>'); return false;">Open in new window for printing</a></p> <div align="center"> <?php } ?> <style> /* Some integrated styles here, for the popup */ .boardingpass { font-family: Tahoma, Verdana; font-size: 14px; -webkit-border-radius: 40px; -moz-border-radius: 40px; border-radius: 15px; } .boardingpass h3 { background: none; padding-left: 3px; padding-bottom: 2px; } .boardingpass .thickline { background: #333; height: 2px; } </style> <table width="90%" border="5" bordercolor="#FF0000" cellpadding="5" cellspacing="5" class="boardingpass" > <tr> <td width="1%" bgcolor="#99FF00"><img src="<?php echo SITE_URL?>/lib/images/barcode.png" /></td> <td align="left" bgcolor="#99FF00"><h3 align="center"><img src="http://www.lausitz-aircargo.de/lib/skins/ocean_blue/images/buttons/airplane-57-512.gif" alt="" width="25" height="25" /><?php echo SITE_NAME;?><img src="http://www.lausitz-aircargo.de/lib/skins/ocean_blue/images/buttons/airplane-57-512.gif" alt="" width="25" height="25" /></h3></td> </tr> <tr> <td colspan="2" bgcolor="#0099FF"><h3 align="center"><img src="http://www.lausitz-aircargo.de/lib/skins/ocean_blue/images/buttons/airplane-57-512.gif" alt="" width="25" height="25" />Boarding Pass<img src="http://www.lausitz-aircargo.de/lib/skins/ocean_blue/images/buttons/airplane-57-512.gif" alt="" width="25" height="25" /></h3></td> </tr> <tr class="thickline"> <td colspan="2"></td> </tr> <tr> <td valign="top" bgcolor="#0099FF"> <table class="boardingpass" align="center"> <tr> <td> <strong>Date:</strong> <br /> <strong>Name: </strong> <br /> <strong>Frequent Flier Number: </strong> <br /> <strong>Boarding Pass Number:</strong> </td> <td> <?php echo date('Y-m-d'); ?><br /> <?php echo Auth::$userinfo->firstname.' '.Auth::$userinfo->lastname?><br /> <?php echo Auth::$userinfo->code.strtoupper(substr(md5(Auth::$userinfo->pilotid), 0, 6))?><br /> <?php echo $schedule->bidid; ?><br /> </td> </tr> </table> </td> <td valign="top" bgcolor="#0099FF"> <div align="center"><strong>Gate:</strong> <?php # We are gonna get a random gate echo chr(rand(65, 90)); // echo's a random letter between A and Z echo rand(1, 30); // gate # (between 1 and 30) ?><br /> <strong>Confirmation Payment Code:</strong> <?php # Generate a hash from the bid id, and get the first 6 characters # That'll be used for our confirmation number, and upper-case them echo strtoupper(substr(md5($schedule->bidid), 0, 6)); ?> </div></td> </tr> <tr class="thickline"> <td colspan="2"></td> </tr> <tr> <td valign="top" bgcolor="#0099FF"> <div align="center"><strong>Flight: </strong><?php echo $schedule->code.$schedule->flightnum?><br /> <strong>Depart: </strong><?php echo $schedule->deptime; ?><br /> <strong>Arrive: </strong><?php echo $schedule->arrtime;?><br /> </div></td> <td valign="top" bgcolor="#0099FF"> <div align="center"><strong>Aircraft: </strong><?php echo $schedule->aircraft?> <br /> <strong>Departure Airport:</strong> <?php echo "$schedule->depname ($schedule->depicao)";?><br /> <strong>Arrival Airport:</strong> <?php echo "$schedule->arrname ($schedule->arricao)"; ?><br /> </div></td> </tr> </table><br /> </p> </div> <table width="100%" border="3" bordercolor="#FF0000" cellspacing="5" cellpadding="5"> <tr> <td bgcolor="#99FF00"><div align="center"> <h2><strong><img src="http://www.lausitz-aircargo.de/lib/skins/ocean_blue/images/buttons/airplane-57-512.gif" alt="" width="25" height="25" />Menü</strong><img src="http://www.lausitz-aircargo.de/lib/skins/ocean_blue/images/buttons/airplane-57-512.gif" alt="" width="25" height="25" /></h2> </div></td> </tr> <tr> <td> <div align="center"></div></td> </table> Quote Link to comment Share on other sites More sharing options...
Industrialshadow Posted September 10, 2016 Report Share Posted September 10, 2016 (edited) wooohaaaaa. that´s works ..... Many Thanks i have tried 1 hour to bring it up... and now i see the code an i see what i have forgot ^^ You can see this working now here http://lausitz-aircargo.de/index.php/schedules/brief/65 Cheers Edited September 10, 2016 by Industrialshadow Quote Link to comment Share on other sites More sharing options...
Moderators servetas Posted September 10, 2016 Moderators Report Share Posted September 10, 2016 Both metars should be shown together. I do not know what happens if there is not metar available for an airport. Which airports are you trying? The code to show the metar of the arrival airport is this and it is included in the part of code I pasted above: <?php echo getMETAR($schedule->arricao); ?> Quote Link to comment Share on other sites More sharing options...
Industrialshadow Posted September 10, 2016 Report Share Posted September 10, 2016 yep i saw the code. Now its corrected and its working very fine.... Thanks for your Support Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.