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.
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.
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
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.
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…
That works! thanks
Glad it worked out.
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!
You have done something wrong i think..Try reinstalling everything and make sure you have the files in their positions…
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.
Make sure you remove and reinstall the db too. Also make sure the tables are set correctly.
Yeah I did that too, I don’t know what is going on
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?
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.
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???
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.
In my pilots list i got active/inactive status how to add a pilot on LOA ?
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
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
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 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?