DEBUG("DL", 1, "Will serve flight {$flightID}<BR>"); $flight = new flight(); $flight->getFlightFromDB($flightID); // if ( $flight->userID!=$userID && ! L_auth::isAdmin($userID) && $flight->private) { // echo _FLIGHT_IS_PRIVATE; // return; // } if ($an == 2) { $xml = $flight->createKMZfile($c, $ex, $w, $an); $version = $CONF['googleEarth']['igc2kmz']['version']; $file_name = $flight->filename . ".igc2kmz.{$version}.kmz"; // $file_name=$flight->filename.".kmz"; $attachmentMIME = "application/vnd.google-earth.kmz"; DEBUG("DL", 1, "KMZ Filepath= {$file_name}<BR>"); } else { $xml = $flight->createKMLfile($c, $ex, $w, $an); //$xml=$flight->createKMLfile("ff0000",1,2); $file_name = $flight->filename . ".kml"; DEBUG("DL", 1, "KML Filepath= {$file_name}<BR>"); //echo "<pre>$xml</pre>"; //DEBUG_END(); //exit; } } else { if ($type == "gpx_trk") { $flightID = makeSane($_REQUEST['flightID'], 1); //echo $_SERVER['QUERY_STRING']; DEBUG("DL", 1, "Will serve flight {$flightID}<BR>"); $flight = new flight(); $flight->getFlightFromDB($flightID); $xml = $flight->createGPXfile();