Jump to content

Kairon

Members
  • Posts

    88
  • Joined

  • Last visited

Everything posted by Kairon

  1. Hello, You want to make a module for the pilots to book flights, the last place we landed? Explain better, I'll see if I can help you.
  2. Kairon

    income

    Yes, on the VA Central for example.
  3. Yes my code was: If the distance is smaller than 0 or negative, for example: -1, -5. Percent = 100
  4. Test it $flights = ACARSData::GetACARSData(); if(!$flights) $flights = array(); $this->acarsflights = array(); foreach($flights as $flight) { if($flight->route == '') { $flight->route_details = array(); } else { $flight->route_details = NavData::parseRoute($flight->route); } $c = (array) $flight; // Convert the object to an array $c['pilotid'] = PilotData::GetPilotCode($c['code'], $c['pilotid']); $totaldistance = round(SchedulesData::distanceBetweenPoints($flight->deplat, $flight->deplng, $flight->arrlat, $flight->arrlng)); $percomplete = ABS(number_format(((($totaldistance - $flight->distremain) / $totaldistance) * 100), 2)); if($percomplete <= '0'){ $percomplete = '100'; } else { $percomplete = $percomplete; } $c['percomplete'] = $percomplete;
  5. I know what it is, is that if the DEP and ARR ICAO is equal, the distance is equal to 0. So php can not divide a 0 value in "Flight Completed". I need you to put your code "percomplete" so I can solve your problem.
  6. You can do so before the awards of the script you put it: This would <div style="width:900px;"> You award script... </div>
  7. It was a string in php, so I removed this part: $userinfo = Auth::$userinfo Thank you for your attention Naabel.
  8. Does anyone know what this error may be? I had to migrate from hosting after login it appears: Warning: unserialize() expects parameter 1 to be string, object given in /home/europask/public_html/core/classes/SessionManager.class.php on line 76 Line 76: return unserialize($_SESSION[$key]); Check Install: phpVMS Virtual Airline Administration Software Install Check phpVMS Build Number: 2.1.934 Checking PHP version [OK] PHP version is 5.2.17.x ASP Tags [OK] ASP-style tags are disabled Checking connectivity... [OK] Can contact outside servers Checking for SimpleXML module... [OK] SimpleXML module exists! OK,'No errors found! :huh:
  9. This error happens when the password, the user or host your database is wrong. The only solution is to review the data to access the database and make sure they are correct.
  10. You must create a function to it, I will create for you, wait.
  11. Hello Jeff, Thanks for your reply, but it is not. It is set when each should receive for their rating PIREPS. This is really a bug that is happening. Anybody else got any answers?
  12. Hello, I'm having a problem with the payments of the pilots, when the pilot sends the PIREP, the pilotpay is always 0.00. I have a basic knowledge in php, could someone tell me where the file responsible for calculating the pilotpay? If you tell me what is the file, or how to fix this bug, I'll be grateful.
  13. Here ---> getAllAircraft($onlyenabled=true)
  14. You can do this: Search this: AwardsData::AddAwardToPilot($this->post->pilotid, $this->post->awardid); Add this after in: admin/modules/PilotAdmin/PilotAdmin.php # Send an email to the admin that a PIREP was submitted $sub = "Add Award for you"; $message="Dear; {$pilot->firstname} {$pilot->lastname}, <p>" ."Contrulations! Add award for you...<p>"; $email = Config::Get('EMAIL_NEW_AWARD'); if(empty($email)) { $email = $pilot->email; } Util::SendEmail($email, $sub, $message); Sorry for my bad english Thumbs up
  15. Better late than never! To view the total distance of the flight the pilot add: $c['totaldistance'] = OperationsData::getAirportDistance($c['depicao'], $c['arricao']); This file in core / modules / ACARS.php To view when he flown add: $depapt = OperationsData::GetAirportInfo($c['depicao']); $arrapt = OperationsData::GetAirportInfo($c['arricao']); $c['distflown'] = round(SchedulesData::distanceBetweenPoints($c['lat'], $c['lng'], $depapt->lat, $depapt->lng)); This is the core / modules / ACARS.php To use indicate the total miles use this: <%=flight.totaldistance%> To show how many miles the pilot flown use this: <%=flight.distflown%> On your tpl "acarsmap.tpl" Any questions just ask me, I'm an expert in editing acarsmap I am bad English ... Thumbs up on me!
  16. Is to do this, but I find it hilarious. At least in my country it does not work like that, and flight times is not to be displayed as a prize, the pilot must do the procedures correctly. Buy a flight to later add the hours in flight times of the pilot is hilarious. I do not recommend friend.
  17. Hello I activated a few days the Auto Accept Pireps, only noticed it has some bug. Link of Auto Accept Pirep When the driver sends the flight the flight arrives right and so on. But the hours and the flight the pilot does not count in his statistics, is there any way to solve this problem?
  18. Yes! I'll give you a hint: You enter the system with a flight number and then another with AAL243 number, after add flight AAL243A then you edit the flight AAL243A for AAL243. it's easy:)
  19. I wonder how to update the ACARS Map from 10 to 10 seconds, so I can use? Example: 0.10 Thanks :)
  20. Better late than never , see if it is: <h3>Roster</h3> <p> <table width="100%"> <tr bgcolor="#FF0000" align="center"> <th height="30px" bgcolor="#FF0000"><font color="#FFFFFF">Callsign</font></th> <th height="30px" bgcolor="#FF0000"><font color="#FFFFFF">Name</font></th> <th height="30px" bgcolor="#FF0000"><font color="#FFFFFF">Total Flights</font></th> <th height="30px" bgcolor="#FF0000"><font color="#FFFFFF">Total Hours</font></th> <th height="30px" bgcolor="#FF0000"><font color="#FFFFFF">Rank</font></th> <th height="30px" bgcolor="#FF0000"><font color="#FFFFFF">Hub</font></th> </tr> <?php $query="SELECT * FROM phpvms_pilots ORDER BY joindate DESC"; $list=DB::get_results($query); foreach ($list as $pilot) { $callsign = PilotData::GetPilotCode($pilot->code, $pilot->pilotid); echo '<tr bgcolor="#F5F5F5" align="center"><td height="25px">'.$callsign.'</td> <td height="25px">'.$pilot->firstname.' '.$pilot->lastname.'</td> <td height="25px">'.$pilot->totalflights.'</td> <td height="25px" >'.$pilot->totalhours.'</td> <td height="25px">'.$pilot->rank.'</td> <td height="25px" width="15%">'.$pilot->hub.'</td> </tr>'; } echo '</table>' ?>
×
×
  • Create New...