Jump to content

Felipe

Members
  • Posts

    47
  • Joined

  • Last visited

Posts posted by Felipe

  1. Hello, guys!

    The code works only for the logged pilots. But I would like to set it on the pilot_public_profile.tpl. So, basically, I need the "$pilot->pilotid" to pull the data from the DB. I've changed all the queries, but it is not working out. Would you please give me some tips?

    As an example, I did this in all queries of all the functions...

    $sql = '... p.accepted = 1 AND p.pilotid = '.$pilot->pilotid.' ORDER...'';
    return DB::get_results($sql);
    }
    

    ... instead of...

    $sql = '... p.accepted = 1 AND p.pilotid = '.Auth::$userinfo->pilotid.'
    ORDER B......'';
    
    return DB::get_results($sql);
    }
    

  2. Try to check your foreach() on the frontpage_recentbids.tpl.

    Mine is this way and it works fine:

    <table class="table table-condensed">
       <thead>
     <tr>	 
      <th>Voo</th>
      <th>Trecho</th>
      <th>Piloto</th>
     </tr>
       </thead>   
    <tbody>
    <?php
    foreach($lastbids as $lastbid)
    {
    ?>
     <tr>
      <td><?php echo $lastbid->code . $lastbid->flightnum; ?></td>
      <td><?php echo $lastbid->depicao; ?> - <?php echo $lastbid->arricao; ?></td>
    <?php
     $params = $lastbid->pilotid;
     $pilot = PilotData::GetPilotData($params);
     $pname = $pilot->firstname;
     $psurname = $pilot->lastname;
    ?>
      <td><a href="http://vai.aero/index.php/profile/view/<?php echo $lastbid->pilotid; ?>"><?php echo $pname; ?> <?php echo $psurname; ?></a></td>
     </tr>	 
      <?php
      }
      ?>
    </tbody>
    </table>
    

    • Like 1
  3. <?php MainController::Run('FrontBids', 'RecentFrontPage', x); ?>
    

    Change the "x" for the number of bids you want to show. Mine, for example, is 10. But I suggest you to fill it with a number that fits better to your layout. ;)

    • Like 1
  4. I think your interception was pointless and somewhat aggressive. But, anyway... That's exactly what I said before: if you land on airport A with the aircraft X, the ones who are not in A too should not be able to book flights with an aircraft that actually is standing in A. That seems obvious, doesn't it? And it is exactly what I meant in the previous post. Sorry if I did not make myself understood. Probably because English is not my native language...

  5. 1. The first time you open the module it will set your location and the aircraft to your HUB.

    2. The pilot, then, have a choice of available aircraft at their location.

    3. Then the pilot gets to another page to bid on their flight where they can see the details of the flight clicking the flight ID.

    4. The pilot places the bid.

    5. The aircraft that they chose is now locked in all schedules with the same aircraft.

    6. As soon as a bid is placed, all the bookings and searches disappear until the bid is removed.

    7. Other pilots won't be able to bid on any schedules that have the same aircraft.

    Hello, Mr. Khorrami!

    This new release of yours looks great! I think it matches what would be considered "as real as it gets". In my VA, for example, we still have only 11 aircrafts (our fleet increases based on our pilot's quantity). It is quite strange to look at the ACARS Map and see two pilots flying the same aircraft. So I think your addon has arrived on a good time.

    I just have something to point out... Let's consider all the 7 steps in order. Ok... I landed in the airport A and the aircraft becomes available again.

    Let's suppose there is another pilot in airport B. He bids a flight from the aircraft I just flown. Is it possible on your addon?

    If yes, my suggestion is to code something that could allow bids for the schedules of this aircraft only for those pilots who are also standing in airport A.

    if you've watched this peculiarity in your code, then for me it's perfect. Congratulations!

    I'll just wait for your answer to update in my VA since I already use your version 1.0. ;)

  6. Hello, everyone!

    I'm having problem with the charset using this add-on. My language is portuguese. It has accents into some words. This, for example, should be...

    não tão bom, mas no momento não há diferença
    

    ... and it is being shown as...

    n?o ? t?o bom, mas no momento n?o h? diferen?a
    

    It has to be something inside the add-on, because on other parts of my site and add-ons it does not happen. Does anybody know how to solve it? It would be very appreciated.

  7. I did it and also added the function getSchedulesBidsExpired()

    And still my expired bid are being deleted but the schedules are not being updated to zero on bidid column.

    I've tried yours and Kyle's tips and nothing works for me.

    Now I'm trying my own way... Let's see what happens... :(

  8. Hello, Piuozorio!

    It's great from hear the solution from you. I'll take a time tonight to check it and if it works for me I'll let you know.

    By the way, I'm watching your badge and it says Eficiência 93%. By chance, has your VA developed a FOQA system based on phpVMS?

    Thank you very much for your help!

  9. I'm facing the same problem as you, Manuel.

    I'm still trying to fix it. By this time I am looking for grants to start repairing this issue.

    For the time being, what I've realized is that bidid field in the schedules table in the database should be updated to zero when bids expires and maintainance.php does its job. And this is not happening... That's is our problem.

    Whenever I get something, I'll post in here. The problem is I'm just a newbie in php programming... :rolleyes:

  10. After a long time reading a lot of topics herein, finally I found something that lead me to the right path and now I share here.

    If you run a cron, go to admin/maintainance.php and if you keep it as original, jump to line 44 and swap it to "true", as below:

    if(Config::Get('CLOSE_BIDS_AFTER_EXPIRE') === true)
    

    After I did it, I changed my cron to run every minute, just to have some tests, and now expired bids are being deleted automatically. :)

  11. Here is like I'm using in my VA. But remember this code has some costumization.

    <a href="http://www.vatsim.net/fp/?1=I&2=<?php echo $schedule->code.$schedule->flightnum; ?>&3=<?php echo $acft_fsinn; ?>&4=0450&5=<?php echo $schedule->depicao;?>&6=<?php echo str_replace(":", "", $schedule->deptime); ?>&7=<?php echo $schedule->flightlevel; ?>&8=<?php echo strtoupper($schedule->route); ?>&9=<?php echo $schedule->arricao;?>&10a=<?php printf('%02d', $hr); ?>&10b=<?php printf('%02d', $min); ?>&11=<?php echo "{$schedule->notes}"; ?>&11a=V&12a=<?php printf('%02d', $fob_hr); ?>&12b=<?php printf('%02d', $fob_min); ?>&13=<?php echo $altn_ap ?>&14=<?php echo $_SESSION['piloto']; ?>+ICAO" target="_blank">Registrar</a>
    

×
×
  • Create New...