Auto Accept/Reject Pirep

Hello finaly i finished it and sharing witht he comunity

Are tired of accepting or even rejecting pireps ? Then do not worry Auto Accept/Reject Pirep is here to help you

It has a admin interface so you will be able to add

  1. The VA’s admin pilot admin that declines the PIREP

  2. Function that searches the pirep log for custom criteria and decline the pirep

  3. Functionality that adds the reason why it was declined in the PIREP’s Comments.

  4. Custom Reason why the pirep was decliened

For Example Your Pirep has been rejected because you " Custom Text"

  1. Function that send an e-mail to admin and or to pilot when pirep rejected

  2. It is compartible with Simpilot’s Plugin Manager

You can see a demo of the admin page at www.baggelis.com/phpvms

Login with the demo admin account and find the settings page under Pilot Reports (PIREPS) -> Auto Pirep

You can download it from here http://baggelis.com/autopirep0.zip

Screenshots Below

post-271-0-05610000-1390511470.png

post-271-0-59071600-1390511486.png

This looks great, and ill test it tomorrow!

Hello I do not know if it is a mistake or not … It says here that the Pireps has been accepted but the comment says it was rejected? …

http://www.baggelis.com/phpvms/index.php/pireps/viewreport/231

Sincerely

That is a leftover from when i was trying the module

I shall delete this pirep

lying problem

http://www.baggelis.com/phpvms/index.php/pireps/viewreport/247

Indeed there was a problem by accepting the pireps with a bigger rate of landing

you will find an updated version in the link that i provided you before or you can update the function by downloading [PirepAcData.class.php](< base_url >/applications/core/interface/file/attachment.php?id=1266) and replacing the one that is in core/common

I also deleted the mistaken pireps from my beta site

Sorry for the trouble

No trouble at all, thanks to you … Yours sincerely

when i try to add the sql i get this error 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘TYPE=MyISAM AUTO_INCREMENT=38’ at line 9

any ideas what could be wrong?

Hi can you try with this sql ? also are you installing manualy or with simpilots plugin manager ?

[AutoPirep.zip](< base_url >/applications/core/interface/file/attachment.php?id=1268)

im installing it manualy

i just tried the new one and got

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘INSERT INTO phpvms_autopirep (id, criteria_description, created_by, `ena’ at line 12

This one should work i changed the mysql version

[AutoPirep.zip](< base_url >/applications/core/interface/file/attachment.php?id=1269)

sorry still getting the first error its strange 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘TYPE=MyISAM’ at line 9

Here we go again 1 more to try

[AutoPirep.zip](< base_url >/applications/core/interface/file/attachment.php?id=1270)

That worked perfectly thank you for your help

No problem i will update the installation ass well as it seems it isn’t working in all mysql versions

Hi.

Cool module!

I have got rid of the default criteria because we don’t need them however it will not auto-accept any of the PIREPS.

Should it accept the PIREPS automatically or is there something I have to do in the settings to get them to auto-accept.

Thanks!

Make sure you have added a valid pilot id in format VBA004

and replace your PirepAcData.class.php with this one [PirepAcData.class.php](< base_url >/applications/core/interface/file/attachment.php?id=1271)

i didnt thought of using it without a criteria so didnt saw that there was a problem when there was none

with this one you should be ok if not tell me

I have also updated the donwload

Best regards and sorry for the trouble

What if my pilot ID’s are HAxxx?

my Pilot ID is in format VLIxxxx

it doesnt approve pireps using kACARS and CAVACARS

maybe I have it at the false line PirepData Class?

public static function updateFlightReport($pirepid, $pirepdata, $recalc_finances = true) {
    if (!is_array($pirepdata)) {
	    return false;
    }
    if ($pirepdata['depicao'] == '' || $pirepdata['arricao'] == '') {
	    return false;
	  PirepAcData::search($pirepid);
 }
    $pirepinfo = self::getReportDetails($pirepid);
    if(isset($pirepdata['fuelused']) && isset($pirepdata['fuelunitcost'])) {
	    $pirepdata['fuelprice'] = $pirepdata['fuelused'] * $pirepdata['fuelunitcost'];
    }
    if(isset($pirepdata['flighttime'])) {
	    $flighttime_stamp = str_replace('.', ':', $pirepdata['flighttime']) . ':00';
	    $pirepdata['flighttime'] = str_replace(':', ',', $pirepdata['flighttime']);
    }
    # Recalculate finances if these fields are set...