Jump to content
Sava

Leave Of Absence v0.9

Recommended Posts

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!

  • Like 5

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Thank you for the kind words, Magicflyer. I am just trying to give back to the community. Enjoy! :)

Share this post


Link to post
Share on other sites

Yes, please download the latest version. It includes emailing to admins and I have fixed some potential security risks. :)

Share this post


Link to post
Share on other sites

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/

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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. :)

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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"

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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!

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

I am not sure if I understand you.

You can specify the leave length in the core/modules/LoA/LoA.php file :)

  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×