Leave Of Absence v0.9

On 7/3/2018 at 6:19 PM, gio1961 said:

The loa.sql file is missing, which you can download from here: https://github.com/carriercomm/phpvms_loa

Use the loa.sql file to create the table necessary for the module to work. You can do this by using phpmyadmin.

Thank you that table has now been added to my DB, however im having a few issues & none of the above answers or fix’s look like any of the code i have, ill attach pictures so you can see.

I hope you can help me.

Kind Regards Harry 

Anyone have a way i can fix this system? i cant seem to get it to work properly i get these errors

Deprecated: mysql_query(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/deltavi1/public_html/core/common/LoAData.class.php on line 60

Warning: mysql_query(): Access denied for user ‘deltavi1’@‘localhost’ (using password: NO) in /home/deltavi1/public_html/core/common/LoAData.class.php on line 60

Warning: mysql_query(): A link to the server could not be established in /home/deltavi1/public_html/core/common/LoAData.class.php on line 60

Deprecated: mysql_affected_rows(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/deltavi1/public_html/core/common/LoAData.class.php on line 61

Warning: mysql_affected_rows(): Access denied for user ‘deltavi1’@‘localhost’ (using password: NO) in /home/deltavi1/public_html/core/common/LoAData.class.php on line 61

Warning: mysql_affected_rows(): A link to the server could not be established in /home/deltavi1/public_html/core/common/LoAData.class.php on line 61

Deprecated: mysql_affected_rows(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/deltavi1/public_html/admin/modules/LoA/LoA.php on line 64

Warning: mysql_affected_rows(): Access denied for user ‘deltavi1’@‘localhost’ (using password: NO) in /home/deltavi1/public_html/admin/modules/LoA/LoA.php on line 64

Warning: mysql_affected_rows(): A link to the server could not be established in /home/deltavi1/public_html/admin/modules/LoA/LoA.php on line 64

On 1/16/2020 at 3:59 AM, SmarticleCo said:

Anyone have a way i can fix this system? i cant seem to get it to work properly i get these errors

Deprecated: mysql_query(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/deltavi1/public_html/core/common/LoAData.class.php on line 60

Warning: mysql_query(): Access denied for user ‘deltavi1’@‘localhost’ (using password: NO) in /home/deltavi1/public_html/core/common/LoAData.class.php on line 60

Warning: mysql_query(): A link to the server could not be established in /home/deltavi1/public_html/core/common/LoAData.class.php on line 60

Deprecated: mysql_affected_rows(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/deltavi1/public_html/core/common/LoAData.class.php on line 61

Warning: mysql_affected_rows(): Access denied for user ‘deltavi1’@‘localhost’ (using password: NO) in /home/deltavi1/public_html/core/common/LoAData.class.php on line 61

Warning: mysql_affected_rows(): A link to the server could not be established in /home/deltavi1/public_html/core/common/LoAData.class.php on line 61

Deprecated: mysql_affected_rows(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/deltavi1/public_html/admin/modules/LoA/LoA.php on line 64

Warning: mysql_affected_rows(): Access denied for user ‘deltavi1’@‘localhost’ (using password: NO) in /home/deltavi1/public_html/admin/modules/LoA/LoA.php on line 64

Warning: mysql_affected_rows(): A link to the server could not be established in /home/deltavi1/public_html/admin/modules/LoA/LoA.php on line 64

bump

Hey guys, does anyone left from this topic has the latest updated version? FlyAlaska link is dead.

 

Any info/help would be appreciated

 

Thanks

4 hours ago, William said:

Hey guys, does anyone left from this topic has the latest updated version? FlyAlaska link is dead.

 

Any info/help would be appreciated

 

Thanks

https://github.com/Cloudxtreme/phpvms_loa

10 hours ago, CarlosEduardo2409 said:

https://github.com/Cloudxtreme/phpvms_loa

Yes, thanks, but that’s not much help. Already have that and was looking for something that’s a bit more up to date.

1 hour ago, William said:

Yes, thanks, but that’s not much help. Already have that and was looking for something that’s a bit more up to date.

 

That should be version 1.0 - and is probably the most current version.

What is it that you feel needs to be more current? This version is easily converted from tpl to php template files. It’s working well in phpVMS 5.5.2 and phpVMS 5.5.2.72 without error.

Hey ProAvia, thanks for the response. 

 

Yes, a cleaned up version of V1 is what we have on the site now and I resolved most of the errors, but I still have a couple of function errors I wanted to get rid off. 

 

For instance when I try to delete a submitted LOA, it throws an error saying mysqli_query expecting a value and not finding it and as a consequence does not delete the request from the DB or the Admin panel.

I’m on my phone now, but I can be more clear in the errors I mentioned when I get to the computer.

 

Thanks   

5 hours ago, William said:

Hey ProAvia, thanks for the response. 

 

Yes, a cleaned up version of V1 is what we have on the site now and I resolved most of the errors, but I still have a couple of function errors I wanted to get rid off. 

 

For instance when I try to delete a submitted LOA, it throws an error saying mysqli_query expecting a value and not finding it and as a consequence does not delete the request from the DB or the Admin panel.

I’m on my phone now, but I can be more clear in the errors I mentioned when I get to the computer.

 

Thanks   

 

Yes, listing the error would help figure out what may need to be changed.

 

Be sure to list

  • phpVMS version
  • PHP version
  • MySQL/MariaDB version
  • Exact errors you are seeing

Hello,

I am also looking for a more updated version of this module, but it is the only one here in the forum, I installed it and it gives some kind of error (LoA requests do not appear in the administrative panel either) and I wrote to the author of the module and He never gave an answer.
 

Thank you

2 hours ago, VIELMA16 said:

Hello,

I am also looking for a more updated version of this module, but it is the only one here in the forum, I installed it and it gives some kind of error (LoA requests do not appear in the administrative panel either) and I wrote to the author of the module and He never gave an answer.
 

Thank you

 

The link listed a few posts above IS the most updated version. You will need to covert to from tpl to php.

 

After you convert it - if you still get an error, try Googling the error. Or post the error here and maybe someone will help you out.

2 minutes ago, ProAvia said:

 

El enlace enumeró algunas publicaciones anteriores ES la versión más actualizada. Deberá pasar de tpl a php.

 

Después de convertirlo, si aún recibe un error, intente buscar el error en Google. O publique el error aquí y tal vez alguien lo ayude.

 

Deprecated: Non-static method LoAData::CheckPilotID() should not be called statically in /home/level/public_html/phpvms/core/modules/LoA/LoA.php on line 66

Fatal error: Uncaught Error: Call to undefined function mysql_query() in /home/level/public_html/phpvms/core/common/LoAData.class.php:22 Stack trace: #0 /home/level/public_html/phpvms/core/modules/LoA/LoA.php(66): LoAData::CheckPilotID(‘1’) #1 /home/level/public_html/phpvms/core/classes/MainController.class.php(218): LoA->submit() #2 /home/level/public_html/phpvms/index.php(70): MainController::RunAllActions() #3 {main} thrown in /home/level/public_html/phpvms/core/common/LoAData.class.php on line 22

1 hour ago, VIELMA16 said:

 

Deprecated: Non-static method LoAData::CheckPilotID() should not be called statically in /home/level/public_html/phpvms/core/modules/LoA/LoA.php on line 66

Fatal error: Uncaught Error: Call to undefined function mysql_query() in /home/level/public_html/phpvms/core/common/LoAData.class.php:22 Stack trace: #0 /home/level/public_html/phpvms/core/modules/LoA/LoA.php(66): LoAData::CheckPilotID(‘1’) #1 /home/level/public_html/phpvms/core/classes/MainController.class.php(218): LoA->submit() #2 /home/level/public_html/phpvms/index.php(70): MainController::RunAllActions() #3 {main} thrown in /home/level/public_html/phpvms/core/common/LoAData.class.php on line 22

 

What is line 66 in /core/modules/Loa/LoA.php?

 

What is line 22 in /core/common/LoAData.class.php?

phpVMS version?

PHP version?

MySQL/MariaDB version?

 

Hey ProAvia,

Here are me and William’s errors in admin:

Deprecated: mysql_affected_rows(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/tstamer/public_html/crew/admin/modules/LoA/LoA.php on line 63
Warning: mysql_affected_rows(): Access denied for user ‘’@‘localhost’ (using password: NO) in /home/tstamer/public_html/crew/admin/modules/LoA/LoA.php on line 63
Warning: mysql_affected_rows(): A link to the server could not be established in /home/tstamer/public_html/crew/admin/modules/LoA/LoA.php on line 63

 

And here is that file with line 63 noted:

 

Thanks
 

class LoA extends CodonModule { public $title = "Leave of Absence Admin"; public function HTMLHead() { $this-\>set('sidebar', 'loa/loa\_admin\_sidebar.php'); } public function NavBar () { echo '\<li\>\<a href="'.SITE\_URL.'/admin/index.php/LoA"\>LoA Admin\</a\>\</li\>'; } public function index () { $version = '1.0'; $leaves = LoAData::GetAllRequests(array()); $this-\>set('all\_leaves', $leaves); $this-\>render('loa/loa\_admin\_index.php'); $this-\>check($version); } public function viewLOA() { $id = $this-\>get-\>id; $getinfo = LoAData::GetInfoByID($id); $this-\>set('info', $getinfo); $this-\>render('loa/loa\_admin\_view\_request.php'); } public function confirmDeleteLOA() { $id = $this-\>get-\>id; $getinfo = LoAData::GetInfoById($id); $this-\>set('info', $getinfo); $this-\>render('loa/loa\_admin\_confirm\_delete\_request.php'); } public function deleteLOA() { $id = $this-\>get-\>id; $getinfo = LoAData::DeleteLoA($id); Line 63-\>if (mysql\_affected\_rows() == -1) { $this-\>set('message', 'The LoA Reqest hasn\'t been deleted from the database for some reason. This isn\'t suppose to happen. Check the phpVMS forums for support.'); $this-\>render('loa/loa\_admin\_delete\_request.php'); } else { $this-\>set('message', 'The LoA Reqest has been successfuly deleted from the database.'); $this-\>render('loa/loa\_admin\_delete\_request.php'); } } 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 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\>'; } } }

 

Have a look at my post again and also provide answers to the other 4 questions.

 

After we have all that info, we should be able to assist you further.

 

Whoops, sorry!

 

phpvms 5.5.2
mysql 5.7.30-cll-lve
php 5.6

The exact errors are in my post above:

  • Deprecated: mysql_affected_rows(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/tstamer/public_html/crew/admin/modules/LoA/LoA.php on line 63
  • Warning: mysql_affected_rows(): Access denied for user ‘’@‘localhost’ (using password: NO) in /home/tstamer/public_html/crew/admin/modules/LoA/LoA.php on line 63
  • Warning: mysql_affected_rows(): A link to the server could not be established in /home/tstamer/public_html/crew/admin/modules/LoA/LoA.php on line 63

The code for /home/tstamer/public_html/crew/admin/modules/LoA/LoA.php is also in my post, with Line 63 noted out. 

As a matter of fact with the changes I made, the module works as it should. The only thing we cannot do is delete the LOA requests from within Admin.

 

That’s when the error is thrown (at line 63) so we have to delete them directly in the DB. I didn’t get around to fix that yet.

9 hours ago, djtiger76 said:

Whoops, sorry!

 

phpvms 5.5.2
mysql 5.7.30-cll-lve
php 5.6

The exact errors are in my post above:

  • Deprecated: mysql_affected_rows(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/tstamer/public_html/crew/admin/modules/LoA/LoA.php on line 63
  • Warning: mysql_affected_rows(): Access denied for user ‘’@‘localhost’ (using password: NO) in /home/tstamer/public_html/crew/admin/modules/LoA/LoA.php on line 63
  • Warning: mysql_affected_rows(): A link to the server could not be established in /home/tstamer/public_html/crew/admin/modules/LoA/LoA.php on line 63

The code for /home/tstamer/public_html/crew/admin/modules/LoA/LoA.php is also in my post, with Line 63 noted out. 

 

What version of the module do you have? Where did you get it from?

 

In local.config around line 23, post the complete DBASE_TYPE line

 

It’s mysqli

I was actually asking

After I get his response, I may have a solution which might benefit both of you.