Jump to content

Recommended Posts

Posted

One of our pilots just asked an interesting question.  Where can he find the type of flight?  In other words where is the information that it is either a passenger, cargo or charter flight.

I looked, but couldn't find it except in admin where I edit the routes.

  • Administrators
Posted

You have to put it into the schedule results or the schedule page itself. I think it will be $schedule->type (if $schedule is the variable used)

Posted

It should be obvious from this that I don't know PHP, but the following code

<h3>Schedule Details</h3>
<div class="indent">
<strong>Flight Number: </strong> <?php echo $schedule->code.$schedule->flightnum ?><br />
<strong>Departure: </strong><?php echo $schedule->depname ?> (<?php echo $schedule->depicao ?>) at <?php echo $schedule->deptime ?><br />
<strong>Arrival: </strong><?php echo $schedule->arrname ?> (<?php echo $schedule->arricao ?>) at <?php echo $schedule->arrtime ?><br />
<strong>Type: </strong><?php echo $schedule->type ?><br />
<?php

produces this display.

Schedule DetailsFlight Number: ABV888

Departure: Sydney International Airport (YSSY) at 0700

Arrival: Townsville Amo (YBTL) at 1000

Type:

Note there is no type data displayed.  Sorry to be so dumb. :'(

  • Administrators
Posted

Sorry!! It's because I lied.

It's actually

$schedule->flighttype

The name (flighttype) always will match the column in the database. The only exception are airports (there's depicao/depname and arricao/arrname)

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...