CPC900 Posted January 10, 2010 Report Share Posted January 10, 2010 I just want to add to the "pilots_list.tpl" where the pilot last landed at after the total hours are listed. Now, I can obviously add <th>Last Location</th> for the option in the table but how/where to I get that data from?? I am a bit confused how I would code that?! I want to pull the Last entry in pireps:arricao in the database for the pilot, but I am at a loss for how to code the line pertaining to it. I was thinking: <td><?php echo PilotData::GetFieldValue($pireps->arricao, 'Last Location'); ?></td> But that is obviously stupid Quote Link to comment Share on other sites More sharing options...
faraz Posted January 10, 2010 Report Share Posted January 10, 2010 I used This Code : <?php if(!$report) { echo $pilot->hub ; } ?> <?php echo $report->arricao ; ?> </td> Quote Link to comment Share on other sites More sharing options...
CPC900 Posted January 10, 2010 Author Report Share Posted January 10, 2010 So that code was used in your 'pilots_list.tpl'??? Quote Link to comment Share on other sites More sharing options...
faraz Posted January 10, 2010 Report Share Posted January 10, 2010 Yes. i use that Code In pilots_list !! <th bgcolor=#F2F2F2>Location</th> <td bgcolor=#FFFFFF width=10% height=5 align=center><font face=Tahoma color=#7E7E7E size=2><?php if(!$report) { echo $pilot->hub ; } ?> <?php echo $report->arricao ; ?> </td> Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted January 11, 2010 Administrators Report Share Posted January 11, 2010 If you do a search, this has come up before. I will search it tomorrow too Quote Link to comment Share on other sites More sharing options...
faraz Posted January 11, 2010 Report Share Posted January 11, 2010 HI That code is not working ? Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted January 11, 2010 Administrators Report Share Posted January 11, 2010 http://forum.phpvms.net/index.php?topic=243.msg4915#msg4915 Quote Link to comment Share on other sites More sharing options...
AFVA | Mitchell Posted January 11, 2010 Report Share Posted January 11, 2010 Is it possible to get the last airport landed at BY aircraft? So it will be like: <?php echo OperationsData::GetLastAirport($aicraftreg) Thanks in advance! Mitch Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted January 12, 2010 Administrators Report Share Posted January 12, 2010 http://forum.phpvms.net/index.php?topic=1685.msg11736#new Quote Link to comment Share on other sites More sharing options...
CPC900 Posted January 17, 2010 Author Report Share Posted January 17, 2010 Sorry for beating a dead horse, but...... I was wrong about Faraz's code. It only ends up showing the Hub that the pilot belongs to. Is there a way to add the Last airport the pilot landed at?? Did this get added, or no?? Sorry to ask again. Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted January 17, 2010 Administrators Report Share Posted January 17, 2010 If you do a search the code is out there Quote Link to comment Share on other sites More sharing options...
CPC900 Posted January 17, 2010 Author Report Share Posted January 17, 2010 I saw the code for showing where the aircraft last landed at, but not the pilots last arricao?! I will look again...... Quote Link to comment Share on other sites More sharing options...
CPC900 Posted January 17, 2010 Author Report Share Posted January 17, 2010 http://forum.phpvms.net/index.php?topic=243.msg4915#msg4915 I am pretty sure you are referring to this thread, but I sill can't get it to display correctly. I want to add this function to my "pilots_list.tpl"?! Quote Link to comment Share on other sites More sharing options...
faraz Posted January 17, 2010 Report Share Posted January 17, 2010 HI why $pirep->arricao doesn't show pilot location in Pilot page ( Roster ) ? ?> <?php echo $report->arricao ; ?> Quote Link to comment Share on other sites More sharing options...
CPC900 Posted January 17, 2010 Author Report Share Posted January 17, 2010 Ok, here is what I have. It only shows the Hub of the pilot. What am I missing?! I am a bit slow on this one. :-[ <h3><?php echo $title?></h3> <?php if(!$allpilots) { echo 'There are no pilots!'; return; } ?> <table id="tabledlist" class="tablesorter"> <thead> <tr> <th>Pilot ID</th> <th>Name</th> <th>Rank</th> <th>Flights</th> <th>Hours</th> <th>Last Location</th> </tr> </thead> <tbody> <?php foreach($allpilots as $pilot) { ?> <tr> <td width="20%" nowrap><a href="<?php echo url('/profile/view/'.$pilot->pilotid);?>"> <?php echo PilotData::GetPilotCode($pilot->code, $pilot->pilotid)?></a> </td> <td> <img src="<?php echo Countries::getCountryImage($pilot->location);?>" alt="<?php echo Countries::getCountryName($pilot->location);?>" /> <?php echo $pilot->firstname.' '.$pilot->lastname?> </td> <td><img src="<?php echo $pilot->rankimage?>" alt="<?php echo $pilot->rank;?>" /></td> <td><?php echo $pilot->totalflights?></td> <td><?php echo Util::AddTime($pilot->totalhours, $pilot->transferhours); ?></td> <td align=center><?php if(!$report) { echo $pilot->hub ; } ?> <?php echo $report->arricao ; ?> </td> <?php } ?> </tbody> </table> Quote Link to comment Share on other sites More sharing options...
CPC900 Posted January 18, 2010 Author Report Share Posted January 18, 2010 ? Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted January 18, 2010 Administrators Report Share Posted January 18, 2010 http://forum.phpvms.net/index.php?topic=1973 Also, if you searched: http://forum.phpvms.net/index.php?topic=1670.msg10220#msg10220 http://forum.phpvms.net/index.php?topic=243 http://forum.phpvms.net/index.php?topic=1116.msg6528#msg6528 Quote Link to comment Share on other sites More sharing options...
CPC900 Posted January 18, 2010 Author Report Share Posted January 18, 2010 Thanks Nabeel!! I had some trouble grasping that one. I have never claimed to be that smart! ;D Quote Link to comment Share on other sites More sharing options...
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.