Esempio n. 1
0
 		return;
 	}*/
 preg_match('/^([A-Za-z]*) - .*/', $_POST['DepartureIcaoName'], $aptinfo);
 $depicao = $aptinfo[1];
 # Make sure it exists
 if (!OperationsData::GetAirportInfo($depicao)) {
     OperationsData::RetrieveAirportInfo($depicao);
 }
 preg_match('/^([A-Za-z]*) - .*/', $_POST['ArrivalIcaoName'], $aptinfo);
 $arricao = $aptinfo[1];
 # Make sure it exists
 if (!OperationsData::GetAirportInfo($arricao)) {
     OperationsData::RetrieveAirportInfo($arricao);
 }
 # Find a flight using just the flight code
 $sched = SchedulesData::findFlight($flightnum);
 # Can't do it. They completely screwed this up
 if (!$sched) {
     echo "#Answer# Error - Invalid flight ID;";
     return;
 }
 $code = $sched->code;
 $flightnum = $sched->flightnum;
 $leg = $sched->leg;
 $aircraft = $sched->aircraft;
 if ($depicao != $sched->depicao || $arricao != $sched->arricao) {
     $comment = 'phpVMS Message: Arrival or Departure does not match schedule. ';
 }
 # Get the time, don't care about seconds
 preg_match('/^(\\d*):(\\d*):(\\d*)/', $_POST['TotalBlockTime'], $time);
 $flighttime = $time[1] . '.' . $time[2];