Jump to content

Display Minimum Rank & Operated By


Tylor Eddy

Recommended Posts

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

Link to comment
Share on other sites

  • 2 weeks later...

Ok, thanks to Stuart in another post, i have got the minimum rank working, now how should i go about displaying the airline and aircraft flies for?, i intend on displaying a small image of the airline's logo within my fleet table, to get a bitter picture of what i mean, my fleet table can be found here: http://qantasvirtual.com/index.php/fleet

How i attempted to unsuccessfully do this can be seen in the first post ;)

help with this would be great, as it's got me stumped

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...