<?php 
	$settings = CharterOpsData::getsettings();
			$chartercode = $settings->chartercode; 
$aircraft = CharterOpsData::getrandaircraft();
$mindistance = $aircraft->mindistance;
			$maxdistance = $aircraft->range - 200;
$depicao = CharterOpsData::getranddepicao($aircraft->runway);
$arricao = CharterOpsData::getsuitablearricaoregion($depicao, $mindistance, $maxdistance, $aircraft->runway, $settings->regions);
$arregion = CharterOpsData::getairportinfo($arricao);
$tourop = CharterOpsData::getrandtouroparrregion($arregion->countrycode);
$distance = CharterOpsData::getdistance($depicao, $arricao);
$deptime = CharterOpsData::getdeptime($aircraft->range);
$flightminu = CharterOpsData::makeflightminu($distance, $aircraft->cruisespeed);
$flighttime = CharterOpsData::makeflighttime($flightminu);
$arrtime = CharterOpsData::getarrtime($deptime, $flightminu).' UTC';
$maxdistance = $aircraft->range;
?>
Aircraft Range
<br />
<?php echo $maxdistance; ?>
<br />
<br />
Lastflightnum
<br />
<?php echo CharterOpsData::getlastcharterflight($chartercode); ?>
<br />
<br />
Newflightnum
<br />
<?php echo CharterOpsData::getlastcharterflight($chartercode) + 1; ?>
<br />
<br />
Get Random DEPICAO
<br />
<?php echo $depicao; ?>
<br />
<br />
Get Aircraft for Contract
<br />
<?php echo $aircraft->id.' - '.$aircraft->name; ?>
<br />
<br />
Get Suitable Arrival ICAO
<br />
<?php echo $arricao; ?>
<br />
<br />
Tour Operator
<br />
<?php echo $tourop->name; ?>
<br />
<br />
ExpireDate
<br />
<?php echo CharterOpsData::getsaisonexpiry(); ?>
<br />
<br />
Distance
<br />
<?php echo $distance; ?>
<br />
<br />
Deptime
<br />
<?php echo $deptime; ?>
<br />
<br />
Flighttime
<br />
<?php echo $flighttime; ?>
<br />
<br />
Arrtime
<br />
<?php echo $arrtime; ?>
<br />
<br />
Altitude
<br />
<?php echo CharterOpsData::getaltitude($aircraft->serviceceiling, $flightminu); ?>
<br />
<br />
























