예제 #1
0
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)) {
    $directIGCLink = 1;
    $base_name = md5(basename($flight->getIGCRelPath()));
    $_SESSION['di' . $base_name] = 1;
    // echo 'downloadigc'+$base_name;
    $igcLink = "<a href='" . $flight->getIGCRelPath() . "' >IGC</a>";
} else {
    $directIGCLink = 0;
    $igcLink = " <a href='javascript:nop()' onClick='toggleIgcDownload();return false;' id='IgcDownloadPos'>IGC</a>";
}
//experiment with google static maps
if (0) {
    list($min_lat, $min_lon, $max_lat, $max_lon) = $flight->getBounds();
    $cLat = $min_lat + ($max_lat - $min_lat) / 2;
    $cLon = $min_lon + ($max_lon - $min_lon) / 2;
    $sLat = ($max_lat - $min_lat) / 2;
    $sLon = ($max_lon - $min_lon) / 2;
    echo "<img src='http://maps.google.com/staticmap?center={$cLat},{$cLon}&span={$sLat},{$sLon}&size=512x512&key={$CONF_google_maps_api_key}&sensor=false&format=jpg&maptype=hybrid'><HR>";
예제 #2
0
	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) ) {
		$directIGCLink=1;
		$base_name=md5(basename($flight->getIGCRelPath()));
		$_SESSION['di'.$base_name]=1;
		// echo 'downloadigc'+$base_name;
		$igcLink="<a href='".$flight->getIGCRelPath()."' >IGC</a>";
	} else {
		$directIGCLink=0;
		$igcLink=" <a href='javascript:nop()' onClick='toggleIgcDownload();return false;' id='IgcDownloadPos'>IGC</a>";
	}	

     
			  
//experiment with google static maps
if (0) {
	list($min_lat,$min_lon,$max_lat,$max_lon)=$flight->getBounds();
	
	$cLat=$min_lat+($max_lat-$min_lat)/2;