Txmmy83 Posted September 3, 2012 Report Posted September 3, 2012 figured it out thanks I have read few pilot operational manuals in my case BAVVirtual and your own VA Air Serbia and some other but near all have the 30 days clause 1 Quote
ATAvCEO Posted November 1, 2012 Report Posted November 1, 2012 Sava, I really like this addon, not sure of your time frame on adding a small touch to this already great addon, but it would be nice to be able to Approve the LOA Request via a button and to send an email to the Pilot requesting the LOA, via the View page. Thinking have an Approve button below the Information provided in the View page and when you click on that button it pulls a form up to enter your comments concerning the LOA Request approval and a send button to send that info to the requesting Pilot via email. Thanks for your great addons. Greatly appreciated I am sure by all here. Quote
Sava Posted November 1, 2012 Author Report Posted November 1, 2012 I will try and add this as soon as I can. Quote
Sava Posted April 13, 2013 Author Report Posted April 13, 2013 I have updated the module to v1.0. All of you who have the old version, it's best to just reinstall everything. Details available here: https://github.com/savamarkovic/phpvms_loa#loa-module-v10 Added version checker - Checks current version to the current one specified on the server. Modified Date Choser - The date is now selected from a dropdown menu as opposed to being typed in. Date Format Modified - The displayed data formats now use the phpVMS DATE_FORMAT variable and the times are now saved as a unix timestamp as opposed to a date string. Direct Method Access Prohibited - Added checks to stop load loading of page if the form was not submitted. Moved Emailing functions to a separate method in the class Pilot Names in the Admin CP now pulled from the pilots table, not the LoA table. Names are no longer stored in the LoA table. 1 Quote
Steve Bartlett Posted April 16, 2013 Report Posted April 16, 2013 I get these two errors: In the LOA application itself (That pilots complete): Fatal error: Class 'LoAData' not found in /home/vforg/public_html/core/modules/LoA/LoA.php on line 66 Here is the code for Line 66: $pilotid_check = LoAData::CheckPilotID($data['pilotid']); On the Admins side: Fatal error: Class 'LoAData' not found in /home/vforg/public_html/admin/modules/LOA/LOA.php on line 35 Here is the code for line 35: $leaves = LoAData::GetAllRequests(array()); I have not changed anything, all I did was slide the folders into the respective areas and used the los.sql to set up the sql side. 1 Quote
Sava Posted April 16, 2013 Author Report Posted April 16, 2013 I just realized I haven't added that file to the repository somehow. I'll add it tomorrow morning UTC when Im back on my PC. Accept my apologies. Quote
Steve Bartlett Posted April 17, 2013 Report Posted April 17, 2013 I just realized I haven't added that file to the repository somehow. I'll add it tomorrow morning UTC when Im back on my PC. Accept my apologies. Was this added? 1 Quote
asunyer90 Posted April 18, 2013 Report Posted April 18, 2013 I have the same error. Missing loaclass... Quote
Steve Bartlett Posted April 19, 2013 Report Posted April 19, 2013 Just in case you forgot, I don't see anything new in the files Quote
Sava Posted April 19, 2013 Author Report Posted April 19, 2013 Should be uploaded now. Sorry for the delay, I've been really busy. Just download the entire .zip again and FTP it overwriting any existing files/dirs. https://github.com/savamarkovic/phpvms_loa Quote
Steve Bartlett Posted April 20, 2013 Report Posted April 20, 2013 Great thank you! There seems to be two issues, I did a test LOA request and got back this on the pilots end: Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in /home/vforg/public_html/core/common/LoAData.class.php on line 24 Your leave of absence request has been submitted. You will recieve an email confirming your details. There is no further action required on your part. On the Admin side, it says there is no LOA Requests, even though I just did one. I loaded all of the files as requested, and I even did the loa.sql Quote
Strider Posted April 20, 2013 Report Posted April 20, 2013 I am not getting any error, but nothing shows up in the db, or in the admin side. It sends the email, but does not insert the data. I think you are missing a file or something, as the form's action tries to get it to send via /loa/submit, yet I cannot find that file anywhere. Quote
Sava Posted April 20, 2013 Author Report Posted April 20, 2013 Can you try deleting everything from LoAData.class.php and paste the following instead: https://raw.github.com/savamarkovic/phpvms_loa/master/core/common/LoAData.class.php I seem to have made a mixup with the files... 1 Quote
Steve Bartlett Posted April 20, 2013 Report Posted April 20, 2013 Well, instead of line 24, now it is on line 25 and still not seeing any LOA requests on the admin side. Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in /home/vforg/public_html/core/common/LoAData.class.php on line 25 Your leave of absence request has been submitted. You will recieve an email confirming your details. There is no further action required on your part. Thank you! Quote
Sava Posted April 20, 2013 Author Report Posted April 20, 2013 You have done something wrong i think..Try reinstalling everything and make sure you have the files in their positions... Quote
Steve Bartlett Posted April 20, 2013 Report Posted April 20, 2013 Okay, I just finished doing that. I deleted all the files for LOA on my server, and I am still getting that Line 25 error when I apply for an LOA and no LOA's on the Admin side. Quote
Strider Posted April 21, 2013 Report Posted April 21, 2013 Make sure you remove and reinstall the db too. Also make sure the tables are set correctly. Quote
Steve Bartlett Posted April 22, 2013 Report Posted April 22, 2013 Yeah I did that too, I don't know what is going on Quote
OA01 Posted June 9, 2013 Report Posted June 9, 2013 I thought, Ooo... great mod but it doesn't want to play! Everything works OK pilot side, emails sent & received and it populates the DB. Just nothing but this error on the admin side? Leave of Absence Admin There are no LoA requests. Warning: fgetcsv() expects parameter 1 to be resource, boolean given in /home2/orangea1/public_html/admin/modules/LoA/LoA.php on line 83 Warning: fclose() expects parameter 1 to be resource, boolean given in /home2/orangea1/public_html/admin/modules/LoA/LoA.php on line 84 Any ideas? Quote
Sava Posted June 10, 2013 Author Report Posted June 10, 2013 Should be fixed now. The error is because the connection to the file checking for updates was deleted during the maintenance of the site I am doing. I reuploaded the file, and the error should disappear now. Quote
OA01 Posted June 11, 2013 Report Posted June 11, 2013 Well that made the error message go away but now I get "There are no LoA requests. - Your version of this module is up to date. Wohooooo! ) " I made the LoA request and it is in the DB??? Quote
OA01 Posted July 22, 2013 Report Posted July 22, 2013 I found the solution myself. Open //core/common/LoAData.class and locate the following: public function GetAllRequests () { $table = TABLE_PREFIX; $sql = "SELECT loa.pilotid, loa.start, loa.end, loa.reason, phpvms_pilots.pilotid, phpvms_pilots.firstname, phpvms_pilots.lastname FROM loa JOIN phpvms_pilots ON loa.pilotid = phpvms_pilots.pilotid"; $ret = DB::get_results($sql); return $ret; And replace it with this: public function GetAllRequests () { $table = ".TABLE_PREFIX."; $sql = "SELECT loa.pilotid, loa.start, loa.end, loa.reason, pilots.pilotid, pilots.firstname, pilots.lastname FROM loa JOIN pilots ON loa.pilotid = pilots.pilotid"; $ret = DB::get_results($sql); return $ret; Now the admin function works OK. Quote
Kapitan Posted February 6, 2014 Report Posted February 6, 2014 In my pilots list i got active/inactive status how to add a pilot on LOA ? Quote
Moderators mark1million Posted February 18, 2014 Moderators Report Posted February 18, 2014 Sava, a good addition to this would be to approve the request and once approved they get added to a defined group ie leave, i have different groups and would need to add them to the group once approved. Hope you understand what im trying to say Quote
FSX30HD Posted February 28, 2014 Report Posted February 28, 2014 I thought, Ooo... great mod but it doesn't want to play! Everything works OK pilot side, emails sent & received and it populates the DB. Just nothing but this error on the admin side? Leave of Absence Admin There are no LoA requests. Warning: fgetcsv() expects parameter 1 to be resource, boolean given in /home2/orangea1/public_html/admin/modules/LoA/LoA.php on line 83 Warning: fclose() expects parameter 1 to be resource, boolean given in /home2/orangea1/public_html/admin/modules/LoA/LoA.php on line 84 Any ideas? For hosting have flag fopen=0 I make this to LoA.php module: protected function check ($version) { $version_to_check = $version; // make the cURL request $curl = curl_init('http://www.savamarkovic.com/loa.csv'); curl_setopt($curl, CURLOPT_FAILonerror, true); curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false); curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); $read = curl_exec($curl); if ($read[0] > $version_to_check && $read[2] == "1") { $critical = TRUE; } // If its 1, set ciritcal to true if ($read[0] > $version_to_check) { $update = TRUE; } // Anything other than 1 set update to true if ($read[0] == $version_to_check) { echo '<p id="success">Your version of this module is up to date. Wohooooo! )</p>'; }else if ($critical) { echo '<h4>CRITICAL UPDATE FOUND!</h4>'; echo '<p id="error">There is a critical update available! Here is the information associated with the update. <br/><b>Version: '.$read[0].' - '. $read[1].' <br /></b>Please send an email to ceo@airserbiavirtual.com to receive the updated version.</p>'; }else if ($update){ echo '<h4>NON CRITICAL UPDATE FOUND!</h4>'; echo '<p id="error" style="background:#fffca7;border-color:orange">There is NON critical update available! Here is the information associated with the update. <br/><b>Version: '.$read[0].' - '. $read[1].' <br /></b>Please send an email to ceo@airserbiavirtual.com to receive the updated version.</p>'; } } I use Curl method can help someone Regards Fred Quote
jusromaine Posted October 12, 2014 Report Posted October 12, 2014 I get this is admin center There are no LoA requests. Warning: fgetcsv() expects parameter 1 to be resource, boolean given in /home/deltaair/public_html/admin/modules/LoA/LoA.php on line 83 Warning: fclose(): supplied argument is not a valid stream resource in /home/deltaair/public_html/admin/modules/LoA/LoA.php on line 84 Not too sure on this? pilot side looks great Quote
Longhaul444 Posted November 16, 2014 Report Posted November 16, 2014 I get this is admin center There are no LoA requests. Warning: fgetcsv() expects parameter 1 to be resource, boolean given in /home/deltaair/public_html/admin/modules/LoA/LoA.php on line 83 Warning: fclose(): supplied argument is not a valid stream resource in /home/deltaair/public_html/admin/modules/LoA/LoA.php on line 84 Not too sure on this? pilot side looks great I get the same error. My line 83 is this: $read = fgetcsv ($fp); line 84 is this: fclose ($fp); // Closes the connection that section looks like this: protected function check ($version) { $version_to_check = $version; $url = 'http://www.savamarkovic.com/loa.csv'; $fp = @fopen ($url, 'r') or $message = "The updater checking service is currently offline"; //If the server is unreachable $read = fgetcsv ($fp); fclose ($fp); // Closes the connection if ($read[0] > $version_to_check && $read[2] == "1") { $critical = TRUE; } // If its 1, set critical to true if ($read[0] > $version_to_check) { $update = TRUE; } // Anything other than 1 set update to true if ($read[0] == $version_to_check) { echo '<p id="success">Your version of this module is up to date. Wohooooo! )</p>'; }else if ($critical) { echo '<h4>CRITICAL UPDATE FOUND!</h4>'; echo '<p id="error">There is a critical update available! Here is the information associated with the update. <br/><b>Version: '.$read[0].' - '. $read[1].' <br /></b>Please send an email to ceo@airserbiavirtual.com to receive the updated version.</p>'; }else if ($update){ echo '<h4>NON CRITICAL UPDATE FOUND!</h4>'; echo '<p id="error" style="background:#fffca7;border-color:orange">There is NON critical update available! Here is the information associated with the update. <br/><b>Version: '.$read[0].' - '. $read[1].' <br /></b>Please send an email to ceo@airserbiavirtual.com to receive the updated version.</p>'; } Pilot side is wonderful, admin side isn't working. All files are located correctly, and database reads correctly. Suggestions? Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.