Fspax scoring

Hello,

i try to work out a scoring system using fspax pireps and this is what i have done so far:

  1. created 2 fields in the db table “_pireps”, named “bonus” and “penalty”

  2. added the following code to the /acars/fspax.php:

$data = array( ‘pilotid’=>$pilotid,

‘code’=>$code,

‘flightnum’=>$flightnum,

‘leg’=>$leg,

‘depicao’=>$depicao,

‘arricao’=>$arricao,

‘aircraft’=>$aircraft,

‘route’ => ‘’,

‘flighttime’=>$flighttime,

‘landingrate’=>$_POST[‘TouchDownVertSpeedFt’],

‘submitdate’=>‘NOW()’,

‘load’=>$_POST[‘NbrPassengers’],

‘fuelused’=>$fuelused,

‘bonus’=>$_POST[‘BonusPoints’],

‘penalty’=>$_POST[‘PenaltyPoints’],

‘score’=>$score,

‘source’=>‘fspax’,

‘comment’=>$comment,

‘log’=> $log);

So, i suppose in every fspax pirep, the bonus and penalty values should be added. But no…when exporting a pirep, these values are not inserted in the pirep db.

Any help please?

Jeff is correct, right now it doesn’t look at the fields passed. Unless you’re using beta

Thank you both guys!! now i am really comfused…this is the fspax.php i use. Where to put the code that Jeff posted?

[fspax(2).php](< base_url >/applications/core/interface/file/attachment.php?id=353)

Thank you again Jeff!

Now it works, but only for the bonus. Penalty is not inserted.

Both db field name and post name are correct. The only thing i noticed is that a comma is missing after “…POST[‘PenaltyPoints’]”. Could it be the cause?

No that’s fine because its defining a dictionary array and thats the last element. Make sure PenaltyPoints is the correct name

Yup i think i found the error. Fspax export PenalityPoints, not PenaltyPoints…i hope it will work now

Gotta love it when they mispell in the app