I am having a little trouble getting my hub roster to paginate. Here is the hub page in question - http://www.flyaka.com/index.php/Anchorage
I have no problem paginating my other tables.
This is the hub roster code:
<!-- Hub Roster -->
<div class="box">
<?php $pilots = PilotData::getAllPilotsByHub('PANC'); ?>
<?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="mytable"width="100%" border="0" cellspacing="0" cellpadding="0" class="aka_table">
<tr>
<tr>
<th width="112"><div align="center"><u>Pilot ID</u></div></th>
<th width="345"><u>Pilot Name</u></th>
<th width="210"><u>Rank</u></th>
<th width="170"><u>Hours</u></th>
<th width="190"><u>Flights</u></th>
</tr>
<?php
foreach ($pilots as $pilot) {
?>
<tr>
<td align="left"><div align="center"><a href="<?php echo url('/profile/view/'.$pilot->pilotid);?>">
<?php echo PilotData::GetPilotCode($pilot->code, $pilot->pilotid)?></a></div></td>
<td><div align="center"><?php echo $pilot->firstname.' '.$pilot->lastname?></div></td>
<td><div align="center"><?php echo $pilot->rank;?></div></td>
<td><div align="center"><?php echo $pilot->totalhours; ?></div></td>
<td><div align="center"><?php echo $pilot->totalflights; ?></div></td>
</tr>
<?php
}
?>
</table>
<script type="text/javascript">
$(document).ready(function() {
$('#mytable').dataTable( {
"sPaginationType": "full_numbers"
} );
} );
</script>
</div>
<div class="clear"></div>
<!-- Hub Roster -->
Any help would be appreciated
For the ones who have a Wordpress and would like to have your recent post on your phpvms site. Here is how I do it.
http://feed2js.org/index.php?s=build
Than you will need to know your RSS feed url.
http://example.com/?feed=rss
http://example.com/?feed=rss2
http://example.com/?feed=rdf
http://example.com/?feed=atom
If you are using custom permalinks, you should be able to reach them through this usage:
http://example.com/feed/
http://example.com/feed/rss/
http://example.com/feed/rss2/
http://example.com/feed/rdf/
http://example.com/feed/atom/
I am using /?feed=rss2. Make sure that you preview it first. Place the code where you want to display the post.