G’day Guys,
I would like to display the minimum rank required to fly an aircraft in my fleet table, this will save me creating a rank table.
i have attempted to do so with the following code i heaped together, but i can’t seem to get it to work, some help getting me on the right track would be great
<td><?php
if($pilot->minrank == 1)
{ echo "<img style='padding-left:3px;' src='http://qantasvirtual.com/lib/images/ranks/juniorFO.png'>"; }
elseif($pilot->minrank == 2)
{ echo "<img style='padding-left:3px;' src='http://qantasvirtual.com/lib/images/ranks/SeniorFO.png'>"; }
elseif($pilot->minrank == 3)
{ echo "<img style='padding-left:3px;' src='http://qantasvirtual.com/lib/images/ranks/Junior Captain.png'>"; }
elseif($pilot->minrank == 4)
{ echo "<img style='padding-left:3px;' src='http://qantasvirtual.com/lib/images/ranks/SeniorCaptain.png'>"; }
else($pilot->minrank == 5)
{ echo "<img style='padding-left:3px;' src='http://qantasvirtual.com/lib/images/ranks/ChiefPilot.png'>"; }
?>
</td>
Also i am having trouble trying to display 'operated by, which is one of the fields in my table, i created a tpl file called operatedby, and added the following code, repeating for my whole fleet.
if ($aircraft->registration == 'VH-EBG')
#A332 (8 a/c)
{
$acname = '';
$paaequipment1 = 'RNP10 GPSRNAV';
$paaequipment2 = 'D';
$paawake = 'H';
$paatype = 'A332';
$paapob = '228';
$paaspeed = 'M083';
$paaother = '';
$inforuhf = '';
$inforvhf = '';
$inforelba = '';
$infos = '';
$infosp = '';
$infosd = '';
$infosm = '';
$infosj = '';
$infoj = '';
$infojl = '';
$infojf = '';
$infou = '';
$infov = '';
$infodnumber = '';
$infodcapa = '';
$operatedby = 'Qantas';
$zfw = '';
$costindex = '113';
and in the file i want the ‘operated by’ info to display, i put
<?php include('operatedby.tpl') ?>
up the top.
and
<?php echo $operatedby; ?>
where i wanted to call it in my table.
Am i doing the right process for what i want to create ?
any help would be great, learning this will slowly add to my knowledge of coding
My Current layout can be seen here : http://qantasvirtual.com/index.php/fleet