<pilots> <?php $pilotlist = pilot_search("", 0); for ($i = 0; $i < count($pilotlist); $i++) { if ($pilotlist[$i]['publish_global'] == 't' && !$pilotlist[$i]['peer_tag']) { print "<pilot name=\"" . $pilotlist[$i]['username'] . "\" hours=\"" . $pilotlist[$i]['hours'] . "\" />\n"; } } ?> </pilots> <airports> <?php $airportlist = airport_search("", $n, 90); for ($i = 0; $i < count($airportlist); $i++) { $buf1 = $airportlist[$i]; $buf2 = airport_detail($buf1['airport']); print "<airport ident=\"" . $buf1['airport'] . "\" recent=\"" . $buf1['visits'] . "\" visits=\"" . $buf2['visits'] . "\" fullname=\"" . $buf2['fullname'] . "\" />\n"; } ?> </airports> <flights> <?php $flightslist = logbook_recent(); for ($i = 0; $i < count($flightslist); $i++) { $buf = $flightslist[$i]; if (!$buf['peer_tag']) { print "<flight pilot=\"{$buf['username']}\" logbook_id=\"{$buf['logbook_id']}\" date=\"{$buf['date']}\" route=\"{$buf['route']}\" hours=\"{$buf['hours']}\" />\n"; } } ?> </flights>
<?php $title = "Airport Detail"; include "include/init.inc"; if (!isset($rvar_ident)) { $error_title = "No Airport Specified"; $error_text = "You must specify an Airport Code"; } $line = airport_detail($rvar_ident); $line['detail'] = preg_replace("/\n/", "<br />", $line['detail']); include "include/head.inc"; if (is_user()) { $rvar_pilot = is_user(); if ($line['record_exists'] == 0) { if (is_mine()) { ?> <div id="buttonbar"> <form action="edit_airports.php"> <input type="hidden" value="<?php print $rvar_pilot; ?> " name="pilot"> <input type="hidden" value="<?php print $line['ident']; ?> " name="ident"> <input type="submit" value="Add Airport"></form> </div> <?php } } else {
header("Location: scrape_airports.php?ident={$rvar_ident}"); exit; } if (!isset($rvar_ident)) { $error_title = "No ident Specified"; $error_text = "I can't continue if you don't tell me which airport!"; } else { if ($rvar_ident == '') { if (!isset($rvar_pilot)) { $error_title = "No pilot specified"; $error_text = "You must specify a pilot in order to add a new airport entry."; } $title = "airport: Submit"; } $ident = $rvar_ident; $line = airport_detail($ident); } if (isset($rvar_ident) and !is_mine() and !is_admin()) { $error_title = "Up To No Good"; $error_text = "I can't edit an entry if you don't own it!"; unset($rvar_submit); } if (isset($rvar_ident)) { $rvar_ident = strtoupper($rvar_ident); if (!isset($rvar_link_url)) { $rvar_link_url = "http://www.airnav.com/airport/" . $rvar_ident; } } if (isset($rvar_submit)) { # I see data, we need to insert/update as required. if (!isset($rvar_tower)) {