Jump to content

Kyle

Moderators
  • Posts

    2282
  • Joined

  • Last visited

Posts posted by Kyle

  1. Hello all,

    As you may noticed that I'm assisting with phpVMS v7 development and trying to make it developer friendly and working on a document how it would all come together for add on modules. Also, this was mentioned to me by someone about making my add-ons compatible for v7, so I opened up a poll to see what you guys would like to see which modules from KJRDev to be compatible with v7. I want to determine to see what demands there are for each add-on module I made.

    I'm currently not working on any new modules until phpVMS v7 is fully stable and released as I'm busy with assisting the development of phpVMS v7, a top-secret project (;)), other projects with work & life commitments.

     

    Let me know what you think!

     

    Cheers!

  2. Hey everyone,

    Despite the fact that my add-ons have been outdated, and I just don't see the need that it won't ever be updated since phpVMS v4 is on the horizon and I'm now shifting my focus on phpVMS v4, assisting Nabeel with development and testing. I might be converting those add-ons into phpVMS v4, you'll never know, it might just happen! :lol:

    I have moved all of my phpVMS Add-On Modules over to a new GitHub Organization. You now can find them at https://github.com/KJRDev. The reason why I'm making the move is to allow easier Team access in the future.

    Second of all, Vansers Addons is now KJRDev to provide better services in the future, such as freeware modules and possibility payware (still debating on this) and even more services (stay tuned! B)), and I'm currently working on a website for KJRDev at the moment!

    All for now!

  3. Give this a whirl, not tested. Let me know if it's working. ;-)

     

    <h3><?php echo $title ;?></h3>
    <?php
    # Grab the airlines we have in the system.
    $airlines = OperationsData::getAllAirlines(true);
    # Now let's loop the airlines.
    foreach ($airlines as $airline)
    {
        $pilots = PilotData::findPilots(['code' => $airline->code]);
        if(!$pilots)
        {
            echo '<tr><td align="center" colspan="5">There are no pilots!</td></tr>';
            return;
        }
        else
        {
    ?>
    <h4><?php echo $airline->name;?></h4>
    <table width="100%">
    <table id="tabledlist" class="tablesorter">
    <thead>
    <tr>
        <th>Pilot ID</th>
        <th>Name</th>
        <th>Rank</th>
        <th>Flights</th>
        <th>Hours</th>
    </tr>
    </thead>
    <?php
    foreach($pilots as $pilot)
    {
    ?>
    <tr>
        <td align="center"><a href="<?php echo url('/profile/view/'.$pilot->pilotid);?>">
                <?php echo PilotData::GetPilotCode($pilot->code, $pilot->pilotid)?></a>
        </td>
        <td width="1%" nowrap>
            <img src="<?php echo Countries::getCountryImage($pilot->location);?>"
                alt="<?php echo Countries::getCountryName($pilot->location);?>" />
    
            <?php echo $pilot->firstname.' '.$pilot->lastname?>
        </td>
        <td align="center"><img src="<?php
        $rank = PilotListData::rank($pilot->rank);
        echo $rank->rankimage?>" alt="<?php echo $pilot->rank;?>" /></td>
        <td align="center"><?php echo $pilot->totalflights?></td>
        <td align="center"><?php echo Util::AddTime($pilot->totalhours, $pilot->transferhours); ?></td>
    <?php
    }
    }
    ?>
    </table>
    <?php
    }
    ?>

     

    • Like 1
  4. Sorry, for the late response.

    Here's the code how you would get the pilot list... ;)

    <?php $hubpilots = HubStats::Pilots(KATL);?>
    <?php if(!$hubpilots)
    {
     echo 'There are no pilots in this hub!';
     return;
    }
    else
    {
    ?>
    <table id="tabledlist" class="tablesorter">
    <thead>
    <tr>
    <th>Pilot ID</th>
    <th>Name</th>
    <th>Rank</th>
    <th>Flights</th>
    <th>Hours</th>
    </tr>
    </thead>
    <tbody>
    <?php
    foreach($hubpilots 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>
    <?php
    }
    ?>
    </tbody>
    </table>
    <?php
    }
    ?>
    

  5. Is there a way to code something to pull flights that are created by the pilots when they use the charter button on ACARS? Like a long list of the routes and a/c they flew so that other pilots can use that as a tool to choose a flight?

    It's something that you would have to request to the ACARS Developer.

  6. Awesome! How about if I want to get the entire roster of pilots within this region? would it be the same?

    Here's the counting function for the pilots...

    <?php echo (HubStats::CountPilots(KATL) + HubStats::CountPilots(KBOS) + HubStats::CountPilots(KSEA));?>
    

    Cheers! ;)

×
×
  • Create New...