Jump to content

TB1

Members
  • Posts

    31
  • Joined

  • Last visited

Posts posted by TB1

  1. Hey guys!

    We don't use ACARS for my VA but I was wondering if there is a way of taking waypoints from the route assigned to that particular flight and then displaying them on the route map on the PIREP page rather than on the ACARS map as I've already seen.

    Please reply if you can help!

    Thanks,

    Theo.

  2. Hey guys,

    I am trying to design some code for the welcome back section on the Pacific skin so that it comes up with a pilot's booked flight if he has one.

    Currently I have got this far:

    <i STYLE="float:left;">Welcome back, <a href="<?php echo url('profile'); ?>" ><?php echo Auth::$userinfo->firstname . " " . Auth::$userinfo->lastname ;?></a>! 
    <?php
    if($bid)
    {
    echo 'You have an upcoming flight: <?php echo $bid->code . $bid->flightnum; ?>';
    
    } 
    
    elseif(!$bid)
    
    {
    echo 'You have no upcoming flights.';
    
    } 
    ?></i>
    

    The problem is, the code is always saying 'You have no upcoming flights' even if there is one booked for that pilot.

    Anyone know what I need to do to get the bidded flight number to appear in place of the 'You have no upcoming flights' when there is one?

    Thanks!

  3. Hello guys,

    I just wanted to share with you some code I have running on our logging site.

    For this to work you need Zumeweb's Pacific skin, stuartpb's Airport Information Addon and Vansers VFleetTracker added.

    This bit of code will display flights that have been bidded on on a table form with some cool links to the modules listed above.

    When there is a flight that has been bidded on something like this will appear:

    tanLwrL.png

    If no flights have been bidded on then this will appear: (not the latest flights table, the thing below that).

    xKQnG4O.png

    Here is the code:

    <?php
    $lastbid = SchedulesData::GetAllBids();
    if (count($lastbid) > 0)
    { ?>
    
    <div class="row-fluid">
    <div class="span12">
    <div class="box">
    <table width="100%" border="0" bordercolor="#FFFFFF">
    <h3><center>Upcoming Departures</h3>
    </div>
    
    <style type="text/css">
    table th { text-align: center; color:black; font-weight:bold;}
    table td { text-align: center; }
    </style>
    <thead>
    <tr>
    <style type="text/css">
    { text-align: center; }
    </style>
    <th><div align="center">Flight Number</div></th>
    <th><div align="center">Pilot</div></th>
    <th><div align="center">Departure</div></th>
    <th><div align="center">Arrival</div></th>
    <th><div align="center">Flight Duration</div></th>
    <th><div align="center">Aircraft</th>
    <th><div align="center">Registration</div></th>
    </tr>
    </thead>
    <tbody>
    <?php
    
    foreach($lastbids as $lastbid)
    {
    ?>
    
    <?php
    $flightid = $lastbid->id
    ?>
    
    <td height="25" width="10%" align="center"><span><a href="<?php echo SITE_URL?>/index.php/schedules/details/<?php echo '' . $flightid . '';?> "><?php echo $lastbid->code; ?><?php echo $lastbid->flightnum; ?></span></td>
    <?php
    $params = $lastbid->pilotid;
    
    $pilot = PilotData::GetPilotData($params);
    $pname = $pilot->firstname;
    $psurname = $pilot->lastname;
    ?>
    <td height="25" width="10%" align="center"><span><a href="<?php echo SITE_URL?>/index.php/profile/view/<?php echo '' . $params . ''; ?>"><?php echo $pname; ?> <?php echo $psurname; ?></span></td>
    <td height="25" width="10%" align="center"><span><?php echo '<a href=" '.SITE_URL.'/index.php/airports/get_airport?icao='.$lastbid->depicao.'">'.$lastbid->depicao.'</a>';?></span></td>
    <td height="25" width="10%" align="center"><span><?php echo '<a href=" '.SITE_URL.'/index.php/airports/get_airport?icao='.$lastbid->arricao.'">'.$lastbid->arricao.'</a>';?></span></td>
    <td height="25" width="10%" align="center"><span><?php echo $lastbid->flighttime; ?> hours</span></td>
    <td height="25" width="10%" align="center"><span><a href="<?php echo SITE_URL?>/index.php/vFleetTracker/view/<?php echo '' . $lastbid->registration . ''; ?>"><?php echo $lastbid->aircraft; ?></a></td>
    <td height="25" width="10%" align="center"><span><a href="<?php echo SITE_URL?>/index.php/vFleetTracker/view/<?php echo '' . $lastbid->registration . ''; ?>"><?php echo $lastbid->registration; ?></a></td>
    
    </tr>
    </div>
    </div>
    </div>
    <?php
    }
    } else { ?>
    <div class="row-fluid">
    <div class="span12">
    <div class="box">
    <table width="100%" border="0" bordercolor="#FFFFFF">
    <h3><center>There Are No Upcoming Departures!</h3>
    </div>
    <?php
    }
    ?>
    </tbody>
    </table>
    </div>
    

    For this to work you need to paste this into your frontpage_recentbids.tpl file. Remember the links will not work unless you have the modules mentioned above installed.

    Enjoy!

    • Like 1
    • Thanks 1
  4. Hi.

    Cool module!

    I have got rid of the default criteria because we don't need them however it will not auto-accept any of the PIREPS.

    Should it accept the PIREPS automatically or is there something I have to do in the settings to get them to auto-accept.

    Thanks!

×
×
  • Create New...