Jump to content

Last flight in pilot center


Artjom

Recommended Posts

Hello users

I will make a Last Flight and Date in pilot center and pilot public center!

This code works in "Pilot Center"

<li><strong>Last Flight: </strong><?php echo $report->code . $report->flightnum; ?>(<?php echo $report->submitdate; ?>)</li>

And I will Last Flight and Date works in Pilot Public Profile

How can I create this?

please help.

Best regards.

  • Like 1
Link to comment
Share on other sites

Guest N402KC

Ok, I am NO PHP Programmer. I believe what you need to do is something like 'this->lastreport' or something close to that. Ill take a look and get back with you. I know its something like lastreport or lastpirep.

Link to comment
Share on other sites

I add this code on top (pilot_public_profile.tpl)

<?php
    $last_location = PIREPData::getLastReports($userinfo->pilotid, 1, PIREP_ACCEPTED);
    $airport_info = OperationsData::GetAirportInfo($location);
    $airportname = $airport_info->name;
    $report = PIREPData::GetLastReports($pilot->pilotid, 1);
?>

Link to comment
Share on other sites

Ok, I am NO PHP Programmer. I believe what you need to do is something like 'this->lastreport' or something close to that. Ill take a look and get back with you. I know its something like lastreport or lastpirep.

Thank you very mach, I have made this code

Add this on top of (pilot_public_profile.tpl)

<?php
    $last_location = PIREPData::getLastReports($userinfo->pilotid, 1, PIREP_ACCEPTED);
    $airport_info = OperationsData::GetAirportInfo($location);
    $airportname = $airport_info->name;
    $report = PIREPData::GetLastReports($pilot->pilotid, 1);
?>

This code add in public profile

<li><strong>Last Flight: </strong><?php echo $last_location->code . $last_location->flightnum; ?>(<?php echo $last_location->submitdate; ?>)</li>

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