Example #1
0
    $deletedFlights = 1;
}
$flightID += 0;
$flight = new flight();
if (!$flight->getFlightFromDB($flightID)) {
    echo "<br><div align='center'>No such flight exists</div><br><BR>";
    return;
}
//echo $flight->private." & ".$flight->flightIsViewableByUser($userID)." $$";
if ($flight->private && $flight->private != 4 && !$flight->belongsToUser($userID) && !L_auth::isAdmin($userID)) {
    echo "<br><div align=center><h3>" . _FLIGHT_IS_PRIVATE . "</h3></div><br><BR>";
    return;
}
//debug
//$mapUrl=$flight->createStaticMap(1);
$flight->incViews();
//show limited info to non friends
if ($flight->private == 4 && !$flight->flightIsViewableByUser($userID)) {
    require dirname(__FILE__) . '/GUI_flight_show_ext.php';
    return;
}
if ($flight->externalFlightType & SYNC_INSERT_FLIGHT_LINK) {
    require dirname(__FILE__) . '/GUI_flight_show_ext.php';
    return;
}
$Ltemplate->set_filenames(array('body' => 'flight_show.html'));
$geUrl = getDownloadLink(array('type' => 'kml_trk', 'flightID' => $flightID, 'lang' => $lng));
// $moduleRelPath."/download.php?lang=$lng&type=kml_trk";
$clientIP = getClientIpAddr();
$directIGCLink = 1;
if ($flight->belongsToUser($userID) || L_auth::isModerator($userID) || L_auth::canDownloadIGC($clientIP)) {