Auto accept pireps

Hello i m looking for help ! I like to make an auto accept pirep system, if someone got a code to this please sheare the code with me.

Thank you!

anyone ?

There are a couple of ways to do this ->

1 - [bEST WAY] open PIREPData.class.php and find line 783

".PIREP_PENDING.",

and change to

".PIREP_ACCEPTED.",

This will mark any filed PIREP as accepted. Just remember that it will get overwritten in updates and you will have to change it again.

2 - You could also mess with the settings in app.config.php

namely this section

define('PIREP_PENDING', 0);
define('PIREP_ACCEPTED', 1);
define('PIREP_REJECTED', 2);
define('PIREP_INPROGRESS', 3);

although I wouldnt recommend it, as a matter of fact, forget i said it…

1 Like

thank you simpilot

how can that be done with the Beta Versions?

seems that the file has changed since official release version since your code doesnt stand on line 783 any longer

Anyone know a trick around this area now since that line is no longer in the specified file in option #1?

Are you looking in the “Common” folder? I have the latest version and it’s there.

I have the file, but not that line of code. I am using Simpilot’s phpVMS Extended.

I’m not sure how to do so on the extended version. You would have to ask Simpilot. However, you can replace the current file with the attached one.

[index.php](< base_url >/applications/core/interface/file/attachment.php?id=1117)

I have the file, but not that line of code. I am using Simpilot’s phpVMS Extended.

On my version on GutHub here -> https://github.com/DavidJClark/phpVMS_extended/blob/master/core/common/PIREPData.class.php#L709

You will find the line you need at line 709

$pirepdata['accepted'] = PIREP_PENDING;

change to

$pirepdata['accepted'] = PIREP_ACCEPTED;

Thanks Sim. I appreciate it.

this will be definatly used by my VA when Staff is away on summer vacation