Convert to php variable - acarsmap.php

In the acarsmap.php file a text appears as we can use a series of variables to put in the HTML, ok. But I would like from acarsmap.php to call a function that I have in php but passing one of those variables to it, I don’t see the way to do it. Can anybody help me?

I thought that maybe I could do it if I manage to convert <%=flight.pilotid%> it to a php $ variable, then I pass that variable in the function and that’s it, but I don’t know how to convert it.

 

    Variable:                            
    <%=flight.pilotid%>

 

I’m usign 5.5.2.72 simpilot/php7.2

You should be able to modify this function in PHP:

https://github.com/DavidJClark/phpvms_5.5.x/blob/master/core/modules/ACARS/ACARS.php#L60

 

which is read here:

https://github.com/DavidJClark/phpvms_5.5.x/blob/master/lib/js/acarsmap.js#L65

 

and it should allow you to use the templating tags.

1 Like

PHPVMS 5.5.2.72 is a modified version made by @ProAvia 

What exactly do you want to do? The variable you listed should work as it is by default there. If there is nothing in the function calling to that column in the db table then it won’t work.

On 9/12/2020 at 1:34 AM, web541 said:

You should be able to modify this function in PHP:

https://github.com/DavidJClark/phpvms_5.5.x/blob/master/core/modules/ACARS/ACARS.php#L60

 

which is read here:

https://github.com/DavidJClark/phpvms_5.5.x/blob/master/lib/js/acarsmap.js#L65

 

and it should allow you to use the templating tags.

Thank you very much, it is just what I was looking for. once again thanks for the contribution.