public static function update_routes() { global $tmp_dir, $globalDebug; $error = ''; if ($globalDebug) { echo "Routes : Download..."; } update_db::download('http://www.virtualradarserver.co.uk/Files/StandingData.sqb.gz', $tmp_dir . 'StandingData.sqb.gz'); if (file_exists($tmp_dir . 'StandingData.sqb.gz')) { if ($globalDebug) { echo "Gunzip..."; } update_db::gunzip($tmp_dir . 'StandingData.sqb.gz'); if ($globalDebug) { echo "Add to DB..."; } $error = update_db::retrieve_route_sqlite_to_dest($tmp_dir . 'StandingData.sqb'); } else { $error = "File " . $tmp_dir . 'StandingData.sqb.gz' . " doesn't exist. Download failed."; } if ($error != '') { echo $error; exit; } elseif ($globalDebug) { echo "Done\n"; } }
public static function update_translation_fam() { global $tmp_dir, $globalDebug; $error = ''; if ($globalDebug) { echo "Translation from FlightAirMap website : Download..."; } update_db::download('http://data.flightairmap.fr/data/translation.tsv.gz', $tmp_dir . 'translation.tsv.gz'); if (file_exists($tmp_dir . 'translation.tsv.gz')) { if ($globalDebug) { echo "Gunzip..."; } update_db::gunzip($tmp_dir . 'translation.tsv.gz'); if ($globalDebug) { echo "Add to DB..."; } $error = update_db::translation_fam(); } else { $error = "File " . $tmp_dir . 'translation.tsv.gz' . " doesn't exist. Download failed."; } if ($error != '') { echo $error; exit; } elseif ($globalDebug) { echo "Done\n"; } }