} else { if ($type == "kml_task") { //$isExternalFile=0; //setLeonardoPaths(); $moduleRelPath = moduleRelPath(0); $waypointsWebPath = $moduleRelPath . "/" . $waypointsRelPath; $flightID = makeSane($_REQUEST['flightID'], 1); //echo $_SERVER['QUERY_STRING']; DEBUG("DL", 1, "Will serve task for flight {$flightID}<BR>"); $flight = new flight(); $flight->getFlightFromDB($flightID); // if ( $flight->userID!=$userID && ! L_auth::isAdmin($userID) && $flight->private) { // echo _FLIGHT_IS_PRIVATE; // return; // } $xml = $flight->kmlGetTask(); //$xml=$flight->createKMLfile("ff0000",1,2); $file_name = $flight->filename . ".task.kml"; DEBUG("DL", 1, "KML Filepath= {$file_path}<BR>"); } else { if ($type == "kml_trk_color") { $moduleRelPath = moduleRelPath(0); $waypointsWebPath = $moduleRelPath . "/" . $waypointsRelPath; $flightID = makeSane($_REQUEST['flightID'], 1); //echo $_SERVER['QUERY_STRING']; $w = makeSane($_GET['w'], 1); $c = makeSane($_GET['c']); $ex = makeSane($_GET['ex'], 1); $an = makeSane($_GET['an'], 1); if (!$w) { $w = 2;