Jump to content

Last & Next Flight


joeholden

Recommended Posts

Hi Guys!

I'm trying to implement on our 'View pilot profiles' the pilots last flight, and their next flight.

Here's what I have so far, but the problem is, no information is displayed when on the site.

Last Flight</h2>		   
	    <table width="100%" border="0">
		    <tr>
				   <th class="profile" align="left" width="20%" scope="row">Flight Number</th>
				    <td class="profile" width="30%"><a href="<?php echo url('/pireps/view/'.$report->pirepid);?>"><?php echo $report->code . $report->flightnum; ?></a></td>
				   </tr>
				  <tr>
				    <th class="profile" align="left" width="20%" scope="row">Departure</th>
				    <td class="profile" width="30%"><?php echo $report->depicao; ?></td>
				  </tr>
				  <tr>
				    <th class="profile" align="left" width="20%" scope="row">Destination</th>
				    <td class="profile" width="30%"><?php echo $report->arricao; ?></td>
				  </tr>
				  <tr>
				    <th class="profile" align="left" width="20%" scope="row">Aircraft Type</th>
				    <td class="profile" width="30%"><?php echo $report->aircraft; ?></td>
				  </tr>
				  <tr>
				    <th class="profile" align="left" width="20%" scope="row">Duration</th>
				    <td class="profile" width="30%"><?php echo $report->flighttime; ?></td>
				  </tr>
		 </table>


    </div><!-- end two column -->

    <div class="profile_twocolumn" style="margin-top:20px;">

	    <h2>Next Flight</h2>
	    <table width="100%" border="0">
			 <tr>
				   <th class="profile" align="left" width="20%" scope="row">Flight Number</th>
				    <td class="profile" width="30%"><a href="<?php echo url('/pireps/view/'.$report->pirepid);?>"><?php echo $report->code . $report->flightnum; ?></a></td>
				   </tr>

				  <tr>
				    <th class="profile" align="left" width="20%" scope="row">Departure</th>
				    <td class="profile" width="30%"><?php echo $bid->depicao; ?></td>
				  </tr>
				  <tr>
				    <th class="profile" align="left" width="20%" scope="row">Destination</th>
				    <td class="profile" width="30%"><?php echo $bid->arricao; ?></td>
				  </tr>
				  <tr>
				    <th class="profile" align="left" width="20%" scope="row">Aircraft Type</th>
				    <td class="profile" width="30%"><?php echo $bid->aircraft; ?></td>
				  </tr>
				  <tr>
				    <th class="profile" align="left" width="20%" scope="row">Departure Time</th>
				    <td class="profile" width="30%"><?php echo $bid->deptime;?></td>
				  </tr>
		 </table>

Any help would be appreciated!

Regards,

Joe

Link to comment
Share on other sites

  • Administrators

Looks like you are using the last PIREP for both flights. You will need to use the pilots bids, if there are any for the next flight, unless you are using some type of dispatch system.

As Vangelis posted, you will also need to fill these variables, preferably in the controller, if you are not doing so already.

Link to comment
Share on other sites

  • 7 months later...

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