Jump to content

mark1million

Moderators
  • Posts

    2283
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by mark1million

  1. I have had a look at the code and its this line, <?php /** * phpVMS - Virtual Airline Administration Software * Copyright (c) 2008 Nabeel Shahzad * For more information, visit www.phpvms.net * Forums: http://www.phpvms.net/forum * Documentation: http://www.phpvms.net/docs * * phpVMS is licenced under the following license: * Creative Commons Attribution Non-commercial Share Alike (by-nc-sa) * View license.txt in the root, or visit http://creativecommons.org/licenses/by-nc-sa/3.0/ * * @author Nabeel Shahzad * @copyright Copyright (c) 2008, Nabeel Shahzad * @link http://www.phpvms.net * @license http://creativecommons.org/licenses/by-nc-sa/3.0/ */ /* FSPassengers, Copyright © Daniel Polli http://www.fspassengers.com */ Debug::log("FSPAX DEBUG", 'fspax'); Debug::log(print_r($_POST, true), 'fspax'); Debug::log(serialize($_POST), 'fspax'); # Check for connection if($_POST['FsPAskConnexion'] == 'yes') { # Validate pilot: $_POST['UserName'] = DB::escape($_POST['UserName']); $pilotid = PilotData::parsePilotID($_POST['UserName']); $pilotdata = PilotData::GetPilotData($pilotid); if(!$pilotdata) { echo '#Answer# Error - Username don\'t exist or wrong password;'; return; } # Give it what it wants # Derive the config from the main config settings echo "#Answer# Ok - connected;"; echo 'Weight='.Config::Get('WeightUnit').' Dist='.Config::Get('DistanceUnit').' Speed='.Config::Get('SpeedUnit').' Alt='.Config::Get('AltUnit').' Liqu='.Config::Get('LiquidUnit'); echo '#welcome#'.Config::Get('WelcomeMessage').'#endwelcome#'; } if($_POST['FsPAskToRegister'] == 'yes') { $comment = ''; # Get the pilot id: $pilotid = PilotData::parsePilotID($_POST['UserName']); # Get the flight ID $flightinfo = SchedulesData::getProperFlightNum($_POST['FlightId']); $code = $flightinfo['code']; $flightnum = $flightinfo['flightnum']; preg_match('/^([A-Za-z]*) - .*/', $_POST['DepartureIcaoName'], $aptinfo); $depicao = $aptinfo[1]; # Make sure it exists if(!OperationsData::getAirportInfo($depicao)) { OperationsData::RetrieveAirportInfo($depicao); } preg_match('/^([A-Za-z]*) - .*/', $_POST['ArrivalIcaoName'], $aptinfo); $arricao = $aptinfo[1]; # Make sure it exists if(!OperationsData::getAirportInfo($arricao)) { OperationsData::RetrieveAirportInfo($arricao); } # Find a flight using just the flight code $sched = SchedulesData::findFlight($flightnum); # Can't do it. They completely screwed this up if(!$sched) { echo "#Answer# Error - Invalid flight ID;"; return; } $code = $sched->code; $flightnum = $sched->flightnum; $aircraft = $sched->aircraft; if($depicao != $sched->depicao || $arricao != $sched->arricao) { $comment = 'phpVMS Message: Arrival or Departure does not match schedule. '; } # Get the time, don't care about seconds preg_match('/^(\d*)\d*)\d*)/', $_POST['TotalBlockTime'], $time); $flighttime = $time[1].'.'.$time[2]; # Get the fuel used $fuelused = floatval($_POST['StartFuelQuantity']) - floatval($_POST['EndFuelQuantity']); # Form the log: $log = ''; foreach($_POST as $name=>$value) { if($name == 'FsPAskToRegister' || $name == 'UserName' || $name == 'Password') { continue; } $log .= "$name=$value<br />".PHP_EOL; } $comment .= 'FSPassengers Flight. No aircraft entered'; $data = array( 'pilotid'=>$pilotid, 'code'=>$code, 'flightnum'=>$flightnum, 'depicao'=>$depicao, 'arricao'=>$arricao, 'aircraft'=>$aircraft, 'route' => '', 'flighttime'=>$flighttime, 'landingrate'=>$_POST['TouchDownVertSpeedFt'], 'submitdate'=>'NOW()', 'load'=>$_POST['NbrPassengers'], 'fuelused'=>$fuelused, 'source'=>'fspax', 'comment'=>$comment, 'log'=> $log ); Debug::log($data, 'fspax'); $ret = ACARSData::FilePIREP($pilotid, $data); if(!$ret) { echo "#Answer# Error - ".PIREPData::$lasterror; exit; } echo "#Answer# Ok - Saved;"; } $comment .= 'FSPassengers Flight. No aircraft entered';
  2. I shouldn't be so lazy really, thats the trouble always looking for a faster way to get things done
  3. Its entered in the comments of the log when the pirep is sent.
  4. Oh well never mind, as you say don't ask don't get. Don't know who added your -1 point but it wasn't me.
  5. Yep sure is Its a great addition to the va, my guys use it all the time. Credit to Dave.
  6. Hey Guys, I done a quick search about the comment from fspax "no aircraft found", couldn't find anything. If there a mod to stop that comment being entered everytime?
  7. What i do as a quick remedy is add a hr html tag when i reply, that makes it a bit easier to distinguished threads.
  8. The more i browse that skin the more i like its clean lines and professional looking design. Now where is that link
  9. Top job, nice looking site, where is that skin? couldn't find it last night when i was looking, mind you after quite a few Vodka's im not surprised
  10. My site has been running for over a year now with the Obsess Blue template, maybe ill update it to the Virgin one seeing as i have a couple of days still off work, as for the ad it brings in revenue so its staying
  11. Don't worry fixed it the p needed changing to a div
  12. Suggestion 2 google a vb addition program source code
  13. What my site? I used jquery menu tabs with their own css using the same js that loads with the site originally.
  14. HI Guys is there a fix for this as i would like to hide the log on page load and only display if clicked.
  15. Are you looking on the acars live map? that map wont show the route, if you go in to your schedules and view details then they will show also completed pireps will show the route if any.
  16. Sometimes the names change which is why the airacs are released to keep up with the additions / deletions, download the latest sql navdata from Jeffs site and see what that produces. Im currently looking at solutions from Navigraph to monthly update my airacs but they just wont bloody speak to me, yet!!!!
  17. Hello, Just add the route to the schedules
  18. Nice i need to replace my nav bas with drop downs and remove some of it from the side, looks good.
  19. Don't worry, I spent about a week looking for mine as well
  20. email_registrationaccepted.tpl
  21. I dont know but you could take an educated guess at, <li><strong>Total Money: </strong><?php echo FinanceData::FormatMoney($userinfo->payrate) ?></li><br /> Yeh i have just tested that and it works.
  22. Does it not already show there? anyway, <li><strong>Total Money: </strong><?php echo FinanceData::FormatMoney($userinfo->totalpay) ?></li><br />
  23. What i did was export my current fleet then exit the sql file and reupload.
  24. easily done, just do 1234560 then the 0 will never get deleted
×
×
  • Create New...