Jump to content

Hub Roster Help


flyalaska

Recommended Posts

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

Link to comment
Share on other sites

Only thing I can think of, it is not reading the JS file. Also try commenting out the 1.4.2 jquery file and replace it with:

<script type="[url=""]text/javascript[/url]" src="[url="view-source:http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"]http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js[/url]"></script>
<script type="[url=""]text/javascript[/url]" src="[url="view-source:http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.0/jquery-ui.min.js"]http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.0/jquery-ui.min.js[/url]"></script>

Link to comment
Share on other sites

  • 2 weeks later...

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