<div class="container my-5">

<div class="row">
      <div class="col-md-12">
      
<p>* Denotes required fields</p>
<form action="<?php echo adminurl('/operations/aircraft');?>" target="_blank" method="post">
<dl>
<dt>* Aircraft ICAO Code</dt>
<dd><input name="icao" type="text" value="<?php echo $aircraft->icao; ?>" class="form-control" /></dd>

<dt>* Aircraft Name/Type (i.e B747-400)</dt>
<dd><input name="name" type="text" value="<?php echo $aircraft->name; ?>" class="form-control" /></dd>

<dt>* Full Name (Boeing 747-400 Combi)</dt>
<dd><input name="fullname" type="text"  value="<?php echo $aircraft->fullname; ?>" class="form-control"/></dd>

<dt>* Aircraft Registration</dt>
<dd><input name="registration" type="text"  value="<?php echo $aircraft->registration; ?>" class="form-control" />
	<p>TIP: Place an X in the registration to denote an inactive aircraft</p>
</dd>

<dt>* Maximum Passengers</dt>
<dd><input name="maxpax" type="text"  value="<?php echo $aircraft->maxpax; ?>" class="form-control" />
	<p>The maximum number of passengers that can be flown on this aircraft, for passenger or charter flights</p>
</dd>

<dt>* Maximum Cargo</dt>
<dd><input name="maxcargo" type="text"  value="<?php echo $aircraft->maxcargo; ?>" class="form-control" />
	<p>The maximum cargo load of this aircraft in <?php echo Config::Get('CARGO_UNITS'); ?>, for cargo flights</p>
</dd>

<dt>Link to download aircraft</dt>
<dd><input name="downloadlink" type="text"  value="<?php echo $aircraft->downloadlink; ?>" class="form-control" /></dd>

<dt>Link to aircraft image</dt>
<dd><input name="imagelink" type="text"  value="<?php echo $aircraft->imagelink; ?>" class="form-control" /></dd>

<dt></dt>
<dd>Some of this aircraft can be retrieved from <a href="http://www.airliners.net/aircraft-data/" target="_new">this site</a>.</dd>
<dt>Range</dt>
<dd><input name="range" type="text"   value="<?php echo $aircraft->range; ?>" class="form-control" /></dd>

<dt>Weight</dt>
<dd><input name="weight" type="text" value="<?php echo $aircraft->weight; ?>" class="form-control" /></dd>

<dt>Cruise</dt>
<dd><input name="cruise" type="text"  value="<?php echo $aircraft->cruise; ?>" class="form-control" /></dd>

<dt>Minimum Rank Required to fly</dt>
<dd>
	<select name="minrank">
		<option value="0" <?php if($aircraft->minrank == 0){ echo 'selected'; } ?>>None</option>
		<?php
		foreach($allranks as $rank)
		{
			if($aircraft->minrank == $rank->rankid)
				$sel = 'selected="selected"';
			else
				$sel = '';
				
			echo "<option value=\"{$rank->rankid}\" {$sel} >{$rank->rank}</option>";
		}
		?>
	</select>

</dd>

<dt>Enabled?</dt>
<?php $checked = ($aircraft->enabled==1 || !$aircraft)?'CHECKED':''; ?>
<dd><input type="checkbox" id="enabled" name="enabled" value="1" class="form-control" <?php echo $checked ?> /></dd>
	
<dt></dt>
<dd><input type="hidden" name="id" value="<?php echo $aircraft->id;?>" class="form-control" />
	<input type="hidden" name="action" value="<?php echo $action;?>" />
	<input type="submit" name="submit" value="<?php echo $title;?>" />
</dd>
</dl>
</form>
</div></div></div>