close_tr();
        close_inner_table();
        return;
    }
}
if ($_REQUEST['updateMap']) {
    $flight->getMapFromServer();
}
// if ($_REQUEST['updateMap3d']) $flight->getMapFromServer(1);
if ($_REQUEST['updateCharts']) {
    $flight->updateCharts(1);
}
if ($_REQUEST['updateData']) {
    $flight->getFlightFromIGC($flight->getIGCFilename());
    $flight->updateTakeoffLanding();
    $flight->createEncodedPolyline(1);
    $flight->makeJSON(1);
    $flight->putFlightToDB(1);
    // 1== UPDATE
}
$flight->checkDirs();
//Added 27.11.2011 for localhost installations P.Wild
$flight->updateAll(0);
//echo "START<br>";
$location = formatLocation(getWaypointName($flight->takeoffID), $flight->takeoffVinicity, $takeoffRadious);
// $firstPoint=new gpsPoint($flight->FIRST_POINT,$flight->timezone);
$firstPoint = new gpsPoint('', $flight->timezone);
$firstPoint->setLat($flight->firstLat);
$firstPoint->setLon($flight->firstLon);
$firstPoint->gpsTime = $flight->firstPointTM;
if ($_REQUEST['updateScore'] || $flight->FLIGHT_POINTS == 0) {
Beispiel #2
0
     $flight->flightID = $flightID;
     //$flight->getFlightFromDB($flightID,0);
     echo $flight->gMapsGetTaskJS();
 } else {
     if ($op == "flight_info") {
         require_once dirname(__FILE__) . '/CL_flightData.php';
         require_once dirname(__FILE__) . '/lib/json/CL_json.php';
         $flightID = $_REQUEST['flightID'] + 0;
         if (!$flightID) {
             return;
         }
         $flight = new flight();
         $flight->getFlightFromDB($flightID, 0);
         $flight->makeJSON(0);
         // no force
         $flight->createEncodedPolyline(0);
         // no force
         $i = 0;
         $JSON_str = "";
         if (1) {
             //$nearestWaypoint=new waypoint($takeoffIDTmp);
             //$nearestWaypoint->getFromDB();
             $name = getPilotRealName($flight->userID, $flight->userServerID);
             $link = htmlspecialchars("http://" . $_SERVER['SERVER_NAME'] . getLeonardoLink(array('op' => 'show_flight', 'flightID' => $flightID)));
             $this_year = substr($flight->DATE, 0, 4);
             $linkIGC = htmlspecialchars("http://" . $_SERVER['SERVER_NAME'] . getRelMainDir() . str_replace("%PILOTID%", getPilotID($flight->userServerID, $flight->userID), str_replace("%YEAR%", $this_year, $CONF['paths']['igc'])) . '/' . $flight->filename);
             //$flightsRelPath."/".$row[userID]."/flights/".$this_year."/".$row[filename] );
             if ($flight->takeoffVinicity > $takeoffRadious) {
                 $location = getWaypointName($flight->takeoffID) . " [~" . sprintf("%.1f", $flight->takeoffVinicity / 1000) . " km]";
             } else {
                 $location = getWaypointName($flight->takeoffID);