Jump to content

Recommended Posts

Posted

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

Posted

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.

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

Posted

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 :)

Posted

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!)

Posted

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.

Posted

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)

Posted

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.

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