function LoadAirspace() { if (RestoreAirspace()) { DEBUG("checkAirspace", 1, "Read airspace from dump"); global $AirspaceArea, $NumberOfAirspaceAreas; //print_r( $AirspaceArea); $NumberOfAirspaceAreas = count($AirspaceArea); //exit; return 1; } else { require_once dirname(__FILE__) . "/FN_airspace_admin.php"; // $openairFilename='Air_Germany.txt'; // $openairFilename="OPENAIRD.TXT"; // maxpunkte $openairFilename = 'Air_Europe 2006.txt'; $fp = fopen(dirname(__FILE__) . "/data/airspace/{$openairFilename}", "r"); if ($fp) { ReadAirspace($fp); return 1; } else { return 0; } } }
echo " Checked: " . $flight->airspaceCheckMsg . "<BR>"; flush2Browser(); } $i++; if ($i > $airspaceChunk) { break; } } } echo "<BR><br><BR>DONE !!!<BR>"; } else { if ($_GET['importFile']) { $fileToImport = $_GET['importFile']; DEBUG('AdminAirspace', 1, "Importing file {$fileToImport}<BR>"); require_once dirname(__FILE__) . '/FN_airspace_admin.php'; ReadAirspace($airspaceDir . '/' . $fileToImport); if (!putAirspaceToDB()) { echo "<BR><BR>Problem in Importing airspace to DB<BR><BR>"; } } } } ?> <table class='simpleTable' width="100%" border=0 cellpadding="2" cellspacing="0"> <tr> <td colspan="3"><strong>Actions :: <a href="<?php echo CONF_MODULE_ARG; ?> &op=admin_airspace&act=delete_all">Delete all airspace entries in the DB</a> :: <a id='updateairspace' href="<?php echo CONF_MODULE_ARG;