Jump to content

Pilot list to date of join


Blu-Express VA

Recommended Posts

Hi,

i've problem, how to change the order from DESC to ASC in my pilot list?, because i change this:

$query="SELECT * FROM phpvms_pilots ORDER BY joindate DESC";

with:

$query="SELECT * FROM phpvms_pilots ORDER BY joindate ASC";

in my pilot list,

but the rank image no view!,

this is my code :

<h3><font color="#152F60"><?php echo $title?></h3></font>

<?php
       if(!$allpilots)
       {
               echo 'There are no pilots!';
               return;
       }
?>

<table width="98%" border="0" cellspacing="0">
<thead>
<tr>
       <th id="sample">Pilot ID</th>
       <th id="sample">Name</th>
       <th id="sample">Rank</th>
       <th id="sample">Flights</th>
       <th id="sample">Hours</th>
       <th id="sample">Status</th>
   <th id="sample">IVAO</th>
   <th id="sample">VATSIM</th>

</tr>
</thead>
<tbody>
<?php
$query="SELECT * FROM phpvms_pilots ORDER BY joindate ASC";
$list=DB::get_results($query);
foreach ($list 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><div align="center"><?php
   If ($pilot->retired == 0)
         { echo '<img src="http://www.bluepanoramava.joomlafree.it/green-status.png" />'; }
   else
         { echo '<img src="http://www.bluepanoramava.joomlafree.it/red-status.png" />'; }
?></div></td>
<td><?php
$fieldvalue = PilotData::GetFieldValue($pilot->pilotid, 'IVAO ID');
if($fieldvalue != '')
{
  echo '<a href="http://www.ivao.aero/members/person/details.asp?ID='.$fieldvalue.'" target="_blank"><center><center><img src="http://www.bluepanoramava.com/lib/skins/brilliancev1/images/yesvat.png" width="20" height="18" border="0" alt="IVAO ID" /></center></a>';
}
else
{
echo '<center><img src="http://www.bluepanoramava.com/lib/skins/brilliancev1/images/novat.png" width="20" height="18" border="0"/></center></a>';
}
?>
</td>
<td><?php
$fieldvalue = PilotData::GetFieldValue($pilot->pilotid, 'VATSIM ID');
if($fieldvalue != '')
{
  echo '<a href="http://www.vataware.com/pilot.cfm?cid='.$fieldvalue.'" target="_blank"><center><img src="http://www.bluepanoramava.com/lib/skins/brilliancev1/images/yesvat.png" width="20" height="18" border="0" alt="Vatsim ID" /></center></a>';
}
else
{
echo '<center><img src="http://www.bluepanoramava.com/lib/skins/brilliancev1/images/novat.png" width="20" height="18" border="0"/></center></a>';
}
?>
<?php
?></td>
<?php
}

?>
</tbody>
</table>

Thanks in advance ;)

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