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
The VA’s admin pilot admin that declines the PIREP
Function that searches the pirep log for custom criteria and decline the pirep
Functionality that adds the reason why it was declined in the PIREP’s Comments.
Custom Reason why the pirep was decliened
For Example Your Pirep has been rejected because you " Custom Text"
Function that send an e-mail to admin and or to pilot when pirep rejected
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
MC1028
January 23, 2014, 11:28pm
2
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
gio1961
January 24, 2014, 11:38am
5
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
gio1961
January 24, 2014, 12:33pm
7
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)
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
TB1
January 25, 2014, 10:07am
17
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
TB1
January 25, 2014, 6:47pm
19
What if my pilot ID’s are HAxxx?
Txmmy83
January 25, 2014, 7:26pm
20
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...