Sava Posted July 29, 2012 Report Posted July 29, 2012 Leave of Absence v1.0 (Updated April 13th 2013) Note: Update v0.9 - > v1.0 (view changelog: https://github.com/savamarkovic/phpvms_loa#changelog ) about: phpVMS addon for pilots to submit a LoA request that is stored in a database and an option for staff to view, delete and edit all the LoA requests through the admin panel. The addon checks if the requested leave lenght is longer than the specified number of days. It uses the date of submission as a start date. When the LoA requests are submitted, both the users and the admin will get an email. Developed by: Sava Markovic http://www.airserbiavirtual.com Developed on: phpVMS v2.1.934 stable php 5.3.1 mysql 5.0.5 apache 2.2.14 License: Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License Installation: All installation instructions and update info can be found here: https://github.com/savamarkovic/phpvms_loa#loa-module-v10 Screenshots http://i.imgur.com/LYeU0.jpg http://i.imgur.com/V55qI.jpg http://i.imgur.com/nq92W.jpg http://i.imgur.com/yX9vy.jpg Download: The addon can be found and downloaded here: https://github.com/s...ovic/phpvms_loa Enjoy! 5 Quote
Moderators joeri Posted July 29, 2012 Moderators Report Posted July 29, 2012 i just tried to enter this date 05-08-2012 and in the admin i get folowing 0000-00-00 so i think thats a small bug to fix :-) and then also the email send out to the user with the loa Quote
Sava Posted July 29, 2012 Author Report Posted July 29, 2012 Reserved for updates or other info. Quote
magicflyer Posted July 30, 2012 Report Posted July 30, 2012 Wow, very nice idea. I will test it and send you my feedback, thanks! Quote
magicflyer Posted July 30, 2012 Report Posted July 30, 2012 Amazing, works like a charm. Thank you for your contribution. It is definitively useful! Quote
Sava Posted July 30, 2012 Author Report Posted July 30, 2012 Thank you for the kind words, Magicflyer. I am just trying to give back to the community. Enjoy! Quote
Moderators joeri Posted July 30, 2012 Moderators Report Posted July 30, 2012 it this changed from the one i have? Quote
Sava Posted July 30, 2012 Author Report Posted July 30, 2012 Yes, please download the latest version. It includes emailing to admins and I have fixed some potential security risks. Quote
Sava Posted August 2, 2012 Author Report Posted August 2, 2012 Just some information. I didn't get any time to work with the addon on fixing the date format issues lately due to other things but I will try and do it as soon as I can. I encourage all of you to try the addon and leave feedback! Also, all suggestions for further addons can be left here: http://forum.phpvms.net/topic/7649-any-addon-ideas/ Quote
mattia Posted August 9, 2012 Report Posted August 9, 2012 hI Sava, i have this error "There is already a LoA request with your Pilot ID". when i submit a new Absence Request but i dont have any request Quote
Sava Posted August 9, 2012 Author Report Posted August 9, 2012 Are you sure that there isn't a request? The addon comes with one request already in there to show the functionality.Check the actual table in phpmyadmin. I have tried out the addon on my test site and it works perfectly. Also, check the Hub Transfer thread, I have updated it. Quote
mattia Posted August 9, 2012 Report Posted August 9, 2012 hi, yes yes i'm sure , my phpmyadmin table is empty , look the photo attach P.S MANY THANKS FOR THE HUB TRANSFER Quote
Sava Posted August 9, 2012 Author Report Posted August 9, 2012 Edit: Go to core/common/LoAData.class.php Change the first method so it is like this: public function CheckPilotID ($pilotid) { $query = "SELECT * FROM loa WHERE pilotid ='$pilotid'"; $sql = mysql_query($query); $count = mysql_num_rows($sql); //this is added return $count; //$sql changed to $count } That should fix the issue. Quote
Jakes Posted August 15, 2012 Report Posted August 15, 2012 Hi there, I have this error after installing this mod: Notice: The template file "/home/jdsarcco/public_html/uvsaaf//core/templates/loa/loa_index.tpl" doesn't exist in/home/jdsarcco/public_html/uvsaaf/core/classes/TemplateSet.class.php on line 248 well, the problem is the double forward slash in the URL before the first CORE, but I dont know where to fix it? Cheers Quote
Sava Posted August 15, 2012 Author Report Posted August 15, 2012 That is not the problem. You haven't installed the templates correctly. Please make sure that you have the loa_index.tpl file inside core/templates/loa. Quote
Jakes Posted August 15, 2012 Report Posted August 15, 2012 That is not the problem. You haven't installed the templates correctly. Please make sure that you have the loa_index.tpl file inside core/templates/loa. Hi, I have double checked it, and all are in the locations as instructed. I also have a similar error with the admin page Quote
Jakes Posted August 15, 2012 Report Posted August 15, 2012 If you look at the error url it have something to do with the path to the tpl file. It have two forward slashes instead of only one. "/home/jdsarcco/public_html/uvsaaf//core/templates/loa/loa_index.tpl" Quote
Sava Posted August 15, 2012 Author Report Posted August 15, 2012 As I said, that shouldn't matter and that type of error (line 248) is associated with .tpl files not being installed correctly. (Read here: http://forum.phpvms.net/topic/3513-about-simpilot/) I can't help much without direct access to the files etc. but it is an issue on your side, as it is working well on many other VAs. Also, make sure that you have downloaded the latest version from the GitHub. Quote
Jakes Posted August 15, 2012 Report Posted August 15, 2012 My apologies, I have made the folder name in the templates folder, LoA ,instead of loa. All fixed now. Thanks for the great add on! Quote
Sava Posted August 15, 2012 Author Report Posted August 15, 2012 You are welcome! I hope you will enjoy the addon! Quote
Jakes Posted August 20, 2012 Report Posted August 20, 2012 Hi there, Is there a way to automatically mark the pilot as on Leave when he/she submit a LoA form? Also, in addition to that, then exclude the pilots marked as on Leave from the automatic retire function? Best Regards, Jakes Quote
Sava Posted August 20, 2012 Author Report Posted August 20, 2012 Is there a way to automatically mark the pilot as on Leave when he/she submit a LoA form? - Nope, the way I have coded is that all the requests go to the admin panel for approval. then exclude the pilots marked as on Leave from the automatic retire function? -Nope, that would require changing of core files etc. I don't have much time these days to do any coding, but if I have time in the future, I will look into this. Quote
Industrialshadow Posted September 1, 2012 Report Posted September 1, 2012 Hi i become the following failure when i request a LoA Warning: mysql_query() [function.mysql-query]: Access denied for user 'www-data'@'localhost' (using password: NO) in /www/htdocs/w00dac26/lausitzair/core/common/LoAData.class.php on line 23 Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in/www/htdocs/w00dac26/lausitzair/core/common/LoAData.class.php on line 23 Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in/www/htdocs/w00dac26/lausitzair/core/common/LoAData.class.php on line 24 but its working and stay in the adminpanel And then i become this failure when i will delete the LoA Warning: mysql_query() [function.mysql-query]: Access denied for user 'www-data'@'localhost' (using password: NO) in /www/htdocs/w00dac26/lausitzair/core/common/LoAData.class.php on line 61 Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /www/htdocs/w00dac26/lausitzair/core/common/LoAData.class.php on line 61 Warning: mysql_affected_rows() [function.mysql-affected-rows]: A link to the server could not be established in /www/htdocs/w00dac26/lausitzair/core/common/LoAData.class.php on line 62 Warning: mysql_affected_rows() [function.mysql-affected-rows]: A link to the server could not be established in /www/htdocs/w00dac26/lausitzair/admin/modules/LoA/LoA.php on line 63 can anybody help me? Thx Quote
Sava Posted September 1, 2012 Author Report Posted September 1, 2012 Are you sure that you have used the sql file to create the db structure needed? Quote
Industrialshadow Posted September 2, 2012 Report Posted September 2, 2012 yes in my phpmyadmin panel i have use the import Quote
Txmmy83 Posted September 2, 2012 Report Posted September 2, 2012 Sava what is Realistic Value to work for a LOA Policy 14 days or more? Quote
Sava Posted September 3, 2012 Author Report Posted September 3, 2012 I am not sure if I understand you. You can specify the leave length in the core/modules/LoA/LoA.php file 1 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.