Artjom Posted March 19, 2010 Report Posted March 19, 2010 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. 1 Quote
Guest N402KC Posted March 19, 2010 Report Posted March 19, 2010 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. Quote
Artjom Posted March 19, 2010 Author Report Posted March 19, 2010 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); ?> Quote
Artjom Posted March 19, 2010 Author Report Posted March 19, 2010 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> Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.