JustinRomaine Posted February 22, 2012 Report Share Posted February 22, 2012 Looking for one that I can Just show the hubs. Like have the hub with the pilots that are there. Show the PDF File of the runways etc.. and the latest flights from and to that hub. and have diffrent link for each hub. Can it be done. Thanks Quote Link to comment Share on other sites More sharing options...
Jeff Posted February 22, 2012 Report Share Posted February 22, 2012 I manually did mine to show all that using the Pages in the Admin Center. If you like, I can post the code(s) for the pilots list for a particular hub, then you can use that for your pages. Quote Link to comment Share on other sites More sharing options...
Txmmy83 Posted February 22, 2012 Report Share Posted February 22, 2012 yes please post the codes I am interested too Quote Link to comment Share on other sites More sharing options...
Jeff Posted February 22, 2012 Report Share Posted February 22, 2012 <h3> Pilots based in Amsterdam</h3> <?php $pilots = PilotData::getAllPilotsByHub('EHAM'); ?> <?php if(!$pilots) { echo 'There are no pilots in that hub, so there must be at least one pilot so the hub can run.'; return; } ?> <table id="tabledlist" class="tablesorter" cellpadding="1" cellspacing="0" width="100%"> <thead> <tr> <th style="background-color: #FF0000; color: #FFF;">Pilot ID</th> <th style="background-color: #FF0000; color: #FFF;"width="200px"><div align="left">Name</div></th> <th style="background-color: #FF0000; color: #FFF;"><div align="left">Rank</div></th> <th style="background-color: #FF0000; color: #FFF;"><div align="left">Flights</div></th> <th style="background-color: #FF0000; color: #FFF;"><div align="left">Hours</div></th> <th style="background-color: #FF0000; color: #FFF;"><div align="left">Last Flight</div></th> <th style="background-color: #FF0000; color: #FFF;"><div align="left">Joined</div></th> </tr> </thead> <tbody><?php foreach($pilots as $pilot) { /* To include a custom field, use the following example: <td> <?php echo PilotData::GetFieldValue($pilot->pilotid, 'VATSIM ID'); ?> </td> For instance, if you added a field called "IVAO Callsign": echo PilotData::GetFieldValue($pilot->pilotid, 'IVAO Callsign'); */ // To skip a retired pilot, uncomment the next line: //if($pilot->retired == 1) { continue; } ?> <tr> <td width="1%" 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><?php echo date(DATE_FORMAT, strtotime($pilot->lastpirep));?></td> <td><?php echo date(DATE_FORMAT, strtotime($pilot->joindate));?></td> <?php } ?> </tbody> </table> Quote Link to comment Share on other sites More sharing options...
JustinRomaine Posted February 23, 2012 Author Report Share Posted February 23, 2012 Thanks do I just make a page and put the code in it. And make a link that would work wouldn't it? Quote Link to comment Share on other sites More sharing options...
Jeff Posted February 23, 2012 Report Share Posted February 23, 2012 Yeah. I actually have a lot more info about the hub in there, but this is a start for you. Quote Link to comment Share on other sites More sharing options...
Virtualei Posted February 23, 2012 Report Share Posted February 23, 2012 Hi there, I did something similar but had the problem that if one of my hub managers changed something on the page through the admin centre it messed up the code that i had added via the cpanel. Is there a way to avoid this?? Thanks Quote Link to comment Share on other sites More sharing options...
Txmmy83 Posted February 23, 2012 Report Share Posted February 23, 2012 Hi there, I did something similar but had the problem that if one of my hub managers changed something on the page through the admin centre it messed up the code that i had added via the cpanel. Is there a way to avoid this?? Thanks I expirienced the same especially if you use inline style definitions when someone modify later which I wanted to do by myself layout will mix up I don't have a better solution at the moment as direct edit on the server which is a bit of a problem when an airline hand that task away to its hub manager or whatever the position in a VA is called (since hand over of FTP and server login data = not good idea! only do if you really trust in your hub manager and even then I as admin would think twice if I want to give a member that much competence!) Quote Link to comment Share on other sites More sharing options...
Txmmy83 Posted February 23, 2012 Report Share Posted February 23, 2012 Yeah. I actually have a lot more info about the hub in there, but this is a start for you. thank you very much Quote Link to comment Share on other sites More sharing options...
Jeff Posted February 23, 2012 Report Share Posted February 23, 2012 You'll have to use an FTP program like FileZilla (or similar) to edit the .htm pages since they contain php codes, then upload them back to the site. Quote Link to comment Share on other sites More sharing options...
JustinRomaine Posted March 2, 2012 Author Report Share Posted March 2, 2012 thanks jeff works and looks great i browed your code. if you dont mind. Quote Link to comment Share on other sites More sharing options...
Jeff Posted March 2, 2012 Report Share Posted March 2, 2012 That's what it's there for Quote Link to comment Share on other sites More sharing options...
JustinRomaine Posted March 2, 2012 Author Report Share Posted March 2, 2012 Thanks this is what I'm working on right now just not sure about it let me know what you think still a work in progress. http://deltaairlinesva.net/index.php/pages/hubatl Quote Link to comment Share on other sites More sharing options...
mseiwald Posted March 2, 2012 Report Share Posted March 2, 2012 You get just Not allowed....you are not allowed permission to access this page. You'll have to make it viewable for the public, not only registered members (null) Quote Link to comment Share on other sites More sharing options...
JustinRomaine Posted March 3, 2012 Author Report Share Posted March 3, 2012 o sorry one sec. Havent tryed it not loged in lol. Im going to do away with it ive been doing it in dreamweaver then just updateing it that way etc but when i whent in the admin and made it public it changed something it wont work anymore and its makeing me mad so im just going to do away with it. thanks thou. Quote Link to comment Share on other sites More sharing options...
5SA CEO Posted March 5, 2012 Report Share Posted March 5, 2012 HI, I put this code on to one of my pages and worked great, it did show all pilots not just the active ones, how can I change it to show only active pilots? Thanks Quote Link to comment Share on other sites More sharing options...
Jeff Posted March 5, 2012 Report Share Posted March 5, 2012 It's there in the code to uncomment the code to not show retired pilots. Quote Link to comment Share on other sites More sharing options...
5SA CEO Posted March 6, 2012 Report Share Posted March 6, 2012 Thanks Jeff, I did not not see it at first but got it done, I'm just a novice at this but learning quite a bit. once again thanks. Quote Link to comment Share on other sites More sharing options...
Jeff Posted March 7, 2012 Report Share Posted March 7, 2012 No problem. Glad that you have it working. 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.